Publishing as files

A small site needs a way to turn written content into pages. It does not necessarily need a running application to answer every page request.

RiantCMS keeps content in Markdown, layouts in Leaf templates, and images and downloads alongside the site sources. A local Swift build step produces the published HTML, assets, and sitemap. The server then serves those files.

Keep the publishing boundary visible

The sources and the published output have different jobs. Markdown and templates are edited and versioned. Generated output is replaced by the next build.

That distinction also applies to downloads: a deliberately published resource belongs in the site sources so that a later deployment can reproduce it. A file added only to the remote output directory can disappear when that directory is synchronized again.

Reuse a pipeline without sharing every layout

A blog and a small set of standalone pages can use the same renderer and deployment tools while keeping their own templates and URL structure. The blog needs post lists, tags, and feeds. A personal homepage can use a smaller set of pages and navigation.

This site uses that standalone-pages path. The RiantStudio Blog uses the post-oriented path. Neither needs a browser application framework to present the generated pages.

Keep the server’s job small

Generating locally removes the need for a production page-rendering process for this site. It does not remove the need to maintain the web server, TLS, access controls, or the deployment process.

More about RiantCMS · The original RiantCMS article · All notes