_____________ /: /| /: Hardbound /// /: ---- /// /: /// /:___________/// |____________|/ == ABOUT == Hardbound is a fabulously simple static web site generator written in the most accessible language there is: shell script. Essentially, all that Hardbound does is convert a set of templates and plain text articles into a functional website. Hardbound was inspired by these fantastic projects: Werc http://werc.cat-v.org Jekyll http://github.com/mojombo/jekyll == USING == To use Hardbound, you must first create a directory where all of the files will be kept. Inside that directory, Hardbound expects there to be a `_posts' directory containing plain text articles, with the filenames in the format of: YYYY-MM-DD-post-name.markdown Hardbound will then convert each of those files to HTML, using the `post.tpl' file in the input directory's root. It will then put the HTML versions of those files in the `posts' directory of the output directory. Finally, Hardbound will then build an `index.html' from the `index.tpl' file. Each post has a metadata header. The format is: title: Your Post Title %% The two parentheses (%%) separate the actual article from the metadata. At the moment, only the title header is available, but this makes room for more to be added in the future. The final filename (and slug) of the HTML files generated depends completely on the post title, not the filename of the source. == TEMPLATES == Hardbound uses Werc's template system, it's simple and easy to use. The template system allows you to execute shell commands and gives you access to environment variables. A quick overview: Lines prefixed with % will be executed as shell script. % echo "From shell" Multiline code goes between %{ and %}. %{ for i in a b c; do echo <li>$i</li> done %} For inline environment variables, use %( and %). <div>The value of $PWD: %($PWD%)</div> Some special variables for Hardbound are: $postTitle The title of the post. Available in `post.tpl' $postDate The date of the post. Available in `post.tpl' $postBody The body of the post. Available in `post.tpl' $postIndex List of posts in <li> tags. Available in `index.tpl' == DEPENDENCIES == Hardbound uses the `markdown' program by default, and it wouldn't be hard to modify it to pass it to any other markdown parser, or add a handler for Textile or any other markup language. The `markdown' program is from the discount library, which can be found at: http://www.pell.portland.or.us/~orc/Code/markdown/