Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add example config file, readme edits
  • Loading branch information
nuex committed Oct 24, 2011
1 parent 7dcff44 commit 5905ec0
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
@@ -1,4 +1,4 @@
# zodiac - a static site generator # zodiac


ZODIAC is a static website generator powered by sh and awk. The core features of zodiac are: ZODIAC is a static website generator powered by sh and awk. The core features of zodiac are:


Expand All @@ -8,7 +8,7 @@ ZODIAC is a static website generator powered by sh and awk. The core features of
* a simple, easy to use templating system * a simple, easy to use templating system
* supports custom helpers written in awk * supports custom helpers written in awk
* configuration, meta, helpers, etc. can be added as you need them * configuration, meta, helpers, etc. can be added as you need them
* convert your markup using any external command that accepts a unix pipe (smu, asciidoc, discount, rst2html, etc) * convert your markup using any external command that accepts a UNIX-style pipe (smu, asciidoc, discount, rst2html, etc)


## SYNOPSIS ## SYNOPSIS


Expand Down Expand Up @@ -72,7 +72,7 @@ Page metadata will always override global metadata of the same key.


Templates come in two forms, page templates and layout templates. Metadata can be bound to templates by using the `{{key}}` notation in your pages and layout files. Templates come in two forms, page templates and layout templates. Metadata can be bound to templates by using the `{{key}}` notation in your pages and layout files.


Page templates can have any extension that zodiac can convert. Out of the box, page templates can have `md`, `htm`, or an `html` extension. Other extensions can be supported if they are configured in the `.zod/config` file in the project directory. Page templates can have any extension that zodiac can convert. Out of the box, page templates can have an `md`, `htm`, or `html` extension. Other extensions and markup types can be supported if they are configured in the `.zod/config` file in the project directory.


The `main.layout` file wraps HTML content around a page template. A `main.layout` file could look something like this: The `main.layout` file wraps HTML content around a page template. A `main.layout` file could look something like this:


Expand Down Expand Up @@ -125,8 +125,7 @@ Just be sure to set the data array in the `load_helpers()` function at the top o
For more control over the parsing and conversion process, a `.zod/config` file can be created within your project directory. Here is a sample config: For more control over the parsing and conversion process, a `.zod/config` file can be created within your project directory. Here is a sample config:


[parse] [parse]
htm htm,html
html


[parse_convert] [parse_convert]
md smu md smu
Expand Down
47 changes: 47 additions & 0 deletions example/site/.zod/config
@@ -0,0 +1,47 @@
; This is an example zodiac configuration file
; A line starting with a `;` is a comment and is ignored.

; The `parse` section is for page templates that will not be converted to
; HTML via an external utility.
;
; [parse]
; extension,extension
; extension
; ...
;


; [parse]
; htm
; html


; The `parse_convert` section is for page templates that will be converted
; to HTML via an external utility.
;
; By default, page templates with the `md` extension are piped through the
; built-in awk implementation of Markdown.
;
; [parse_convert]
; extension,extension command
; extension command
; ...


; [parse_convert]
; md,markdown discount
; txt asciidoc -s -


; The `ignore` section is for patterns that zodiac will ignore when
; searching the project directory. Ignored files will not be parsed or
; copied to the target directory.
;
; [ignore]
; pattern
; pattern
; ...


; [ignore]
; Makefile

0 comments on commit 5905ec0

Please sign in to comment.