Permalink
Browse files

more on templates

  • Loading branch information...
1 parent 1bb48a5 commit 8c0f20fe97a0befeedb1a206b71ee43f7ca79e5e @nuex committed Sep 22, 2011
Showing with 12 additions and 4 deletions.
  1. +12 −4 README.md
View
@@ -43,13 +43,15 @@ A typical Zodiac project will look something like this:
Each markdown page can have its own meta file. The only requirement is that the meta file is in the same directory as the page, has the same name as the page and has the `.meta` file extension.
-The optional `global.meta` file contains data that is available to all of your site's pages, like a site_title.
+The optional `global.meta` file contains data that is available to all of your site's pages, like a site title.
Page metadata will always override global metadata of the same key.
-### Layouts
+### Templates
-A `main.layout` file should look something like this:
+Templates come in two forms: markdown files with an `.md` extension or layout files with a `.layout` extension. Metadata can be bound to templates by using the `{{key}}` notation in your markdown and layout files. A `main.layout` file could look something like this:
+
+`{{{yield}}}` is a special tag that renders the markdown page content within the layout. `{{{yield}}}` can only be used in the `main.layout` file.
<!DOCTYPE html>
<html lang="en">
@@ -93,6 +95,12 @@ The `helpers.awk` file is an awk script that can make custom data available to y
Just be sure to set the data array in the load_helpers() function at the top of the script to make your custom data available to the template.
-### License
+## FUTURE
+
+- multiple layout support
+- mustache support
+- partials/snippets
+
+## LICENSE
MIT

0 comments on commit 8c0f20f

Please sign in to comment.