A homepage generator written in Rust

"Hagen" is a generator for static homepages, written in Rust.

Minimal example setup

hagen.yaml

~~~yaml rules: - selectorType: layout template: "{{ frontMatter.layout }}" outputPattern: "{{ metadata.parent }}/{{ metadata.name }}.html"

assets: - dir: assets to: assets ~~~

templates/default.hbs

~~~handlebars {{compact.site.info.title}}

{{context.pageTitle}}

{{ expand ( markdownify context.content) }}
~~~

content/site.yaml

~~~yaml info: title: Example site clain: Just testing. ~~~

content/index.md

~~~markdown

layout: default

pageTitle: Page Title

Foo Bar

Welcome to my test. ~~~

Variables

Different contexts have different variables. All values are JSON based.

Page

full
The full content tree.
compact
The compacted content tree. Containing only content sections.
context
The content of the point selected from the content tree.
output
The output information.
path
The path of the output page.
site_url
The base site URL.