rnd's website logobuilding a static website

This static website (meaning it uses no server-side scripting and all pages are served as-is) is built using a relatively simple Makefile script. Almost all of the heavy lifting is performed by two tools:

  • "theme" from the "discount" Markdown parser

  • "cpp", the C preprocessor

"theme" transforms pages, written in Markdown with an occasional piece of raw HTML, into full-fledged webpages with the use of a simple template system. The only additional rule is "style", inserted so that individual pages could have their own CSS styles if they need it.

The C preprocessor, so far, is only used on the CSS style. It uses a bunch of good old #define macros to predefine colors, so that changing the website's color palette is easier.

The blog pages use an additional script that reads the contents of each page, finds their date (usually the 3rd line of the file prefixed with a % sign) and contents and, if there's also a <!-- cut --> tag, uses it to make a description of each post.

In addition, the dc directory contains versions of every page compiled to use a limited subset of HTML/CSS -- which theoretically would work on web browsers supplied with the Sega Dreamcast.

In addition, the job of uploading the website's contents is handled using GitLab's Continuous Integration functionality. Whenever a new commit is made, GitLab runs a series of jobs to build, test and deploy the website.

Follow me on Mastodon This page made with Vim Best viewed in Firefox