anchor

This site is built by anchor, a static site generator for AsciiDoc written in Common Lisp. It exists to demonstrate the thing rather than to describe it: every page here came out of the generator it is about.

There is more about this site, and the posts are listed in one place. The default layout builds a chronological index and nothing else, so a link to an undated page is one you write yourself.

anchor makes one commitment. The build operates on documents rather than on strings. Titles, dates, excerpts, headings and link targets are read from the parsed document, and a link or image target is resolved on the node before anything renders. Nothing regexes the output, because there is no pass over the output to regex.

The rest follows from that and is not a separate feature. There is no front matter, because the document is the metadata. There is no excerpt marker, because an excerpt is a subtree. Checking that every image on this site exists is a walk of a tree, not a parse of the HTML.

Documents, not strings

A static site generator has to answer questions about a document. What is its title? When was it written? What does it link to? What should the excerpt on the front page say?

There are two places to get those answers from. One is the document. The other is the HTML you just rendered from it.