nilFM

eureka

eureka is a simple static site generator based on Devine Lu Linvega's generator for the new version of 100r.co. It renders this site.

eureka simply reads files in inc/ and applies a template around them, giving them a <header>, <nav>, and <footer>. The <nav> content is also located in inc/meta.nav.htm, and, contrary to 100r.co's engine, special rules are applied when templating around it to render the landing page (index.html).

Filenames in inc/ can be referenced and linked to in other files there by surrounding them with curly brackets:

{page name}

The actual file name should have underscores between the words but the reference should use spaces. If you put a forward-slash before the filename (but inside the brackets), the file will be injected as a section in the page:

{/page name}

In addition to those file injection/linking references implemented by Devine, there are esoteric templating formats I came up with for eureka. This one creates arbitrary hyperlink text:

{*href|text}

This one makes hyperlinked image (ie, an image inside an anchor hyper-referencing itself)

{:anchorid|imgsrc|alttext}
and one for images with a hyperlink destination different than the image source:
{?anchorid|href|imgsrc|alttext}

This one is for embedding an mp3 player:

{_audiosrc}

All of these make embedding links and media into a page much more streamlined and less tedious than having to deal with raw html for everything.

eureka also defines additional constants to make management easier:
ABOUT for front page content to be displayed between the <header> and <nav>,
SITEROOT to customize where the rendered HTML is placed, and
MAINCSS and FRONTCSS to differentiate styles used for the landing page and the rest of the site.

There isn't much else to it, and that's the way I like it!