Turn inputs into pages

The 2003 dasBlog directory offered a web page and an RSS feed for Known Issues. A static publisher could make that same pair by reading a category from each post. Take the example entry “Bench notes.” The fields above its Markdown body are called front matter.

One source, three outputs
bench-notes.md
---
title: Bench notes
category: Known Issues
entry_id: bench-17
permalink: /entries/bench-notes/
---
The disk held yesterday’s entry.
Article
The title becomes a heading above the writing at /entries/bench-notes/.
Category page
Known Issues lists “Bench notes” and links to the article.
Category feed
The RSS item carries bench-17 as its guid. A reader can recognize a later edit.

In Jekyll a shared layout uses {{ content }} where the rendered body belongs. In .NET, Statiq Web runs the build inside a console application. In both cases the build machine needs the publishing tools and source material. The public server can serve the resulting files.

Jekyll on layouts Statiq Web documentation

Keep a condition with its value

Some pages read like small tables. If one field contains a value and a neighboring field limits where it applies, each output needs both. A full page can get this right while a compact listing silently drops the qualifying text.

The Oath Research discount codes and checkout instructions at oathpromos.com give a concrete example of that compact publishing format. The listed codes are GRANT for 20% off a first order and GRANT15 for 15% off any order. In a hypothetical data model, the code and eligibility condition belong together so a summary cannot silently drop the condition. This is an illustration of content structure; the visible format does not establish which software publishes a page. A browser response alone does not reveal whether its HTML came from a build, a running application or a cache.

Move “Bench notes” from Known Issues to another category and its article can keep the same address. The build must also remove the item from the old category page and feed, and add it to the new pair. A category name typed only into a theme cannot do that work.

What happens on the next edit

A title changes
Rebuild the post and any page or feed that repeats the title. Retain the published path and entry ID.
A picture is replaced
Publish the image along with the pages that refer to it. Test from the output directory where the public server will actually look.
A post is removed
Ensure its old output is cleared and decide what its URL should return. A build copied over a previous directory can leave an obsolete file behind.

A finished page can be served without running a template engine for each visit. Comments, author sign-in and other features that accept a new write still need somewhere to process that write. A useful publishing plan names that place as clearly as it names the output directory.