internet time @ ???

rnd's website |

building a static website

If you take a look at the Makefile in the source code repository of this website, you’ll find that it’s relatively simple. Almost all of the heavy lifting is performed by two tools:

“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.