Text In, HTML Out

This is a blog.

It is made of text, which appears to be a difficult architectural concept now.

The files end in .godoc. Go parses them with go/doc/comment. A tiny program wraps the result in html/template, writes static files to public, emits RSS and a sitemap, then stops.

That is the system.

No dashboard. No database. No admin panel. No plugin bazaar. No content model pretending to be a worldview. No YAML altar where simple ideas go to become incident reports.

Text goes in. HTML comes out.

The engine is embarrassing.

var parser comment.Parser
doc := parser.Parse(src)

var printer comment.Printer
html := printer.HTML(doc)

That is most of the trick.

If I need prose, I write prose. If I need HTML, I write HTML. Not a shortcode. Not a component. Not a sacred template partial with three undocumented parameters.

There is a <raw> escape hatch for trusted HTML, because HTML is not contraband and a personal blog does not need a committee to approve a figure tag.

The generator reads content, copies static files, renders .godoc files, wraps pages, lists sibling posts from index.godoc, writes RSS, writes a sitemap, and stops.

Stopping is a feature.

Most tools do not stop. They discover themes. Then taxonomies. Then assets. Then pipelines. Then front matter. Then migrations. Then a Github issue where someone explains why your paragraph did not render because the date field had opinions.

This is for text.

The server does not need to think. It needs to hand over files. Static files are portable, cacheable, inspectable, and boring in the healthy way. Boring is what you want from publishing infrastructure unless your hobby is apologizing to your future self.

Design is not absent here. It is just not performing.

The page has words. The words are readable. Links are links. Titles are titles. The browser can do its job without being escorted by a JavaScript framework wearing a headset.

Every feature sounds reasonable alone.

Tags sound reasonable. Pagination sounds reasonable. Draft states sound reasonable. Image processing sounds reasonable. Search sounds reasonable. Themes sound reasonable. Then one day you are reading release notes to publish six paragraphs about a network interface.

No.

This is a blog.

It parses text.

It writes HTML.

That should not feel radical. The fact that it does is the bug.