Site

Building a website is a very open-ended task I've approached a few times without much lasting success. First was writing a static site generator to learn compiler-style programming in Haskell, then writing plain HTML by hand for a while. I don't have much experience with the web, and really not much regular interest, so this most recent attempt tries to use the website construction itself as a reason to write about tools and ideas I am interested in.

This current iteration uses the m4 macro processor to implement an ad-hoc markup language, closer to raw HTML than Markdown in cumbersomeness.

Commented Page Example

dnl everything from `dnl` to newline is deleted from the output,
dnl allowing comments and line joins.

dnl the bulk of the website is held behind the expansion of macros.
dnl these are words prefixed with `__' to avoid collision, like
define(__title, Page title)
dnl macros can expand to anything, like page-specific CSS
define(__style, {
h2 { border-bottom: 3px solid white; }
})
dnl or include macros for page setup and formatting options
include(lib/stdlib.m4)
include(lib/prelude.m4)
dnl the stdlib macro for a first-level header:
__h1(Header 1)

dnl or some source code:
__code(dnl
#define RETURN 0
#include <stdio.h>

int main(int ac, char* av[]) {
    printf("hello!");
    return RETURN;
}
)dnl

dnl this format has some nice properties, like
__ul(dnl
__li(dnl
following the rough structure of a C program,
define, include, declaration and material
)dnl
__li(dnl
depending on only POSIX standardized tool
with diverse implementations
)dnl
__li(allowing embedding other code directly as regular literals)
__li(dnl
being shallow embedding, with ability to cut boilerplate,
of output formats
dnl)
__li(dnl
being output format agnostic,
with __a(gemini, https://en.wikipedia.org/wiki/Gemini_(protocol))
backend in progress
)dnl
)dnl
include(lib/postlude.m4)
Compiling, define the target html, and run the processor:
$ m4 -D_T=html page.m4 > page.html
Thank you to Technomancy who made me aware of this general approach.

Insptiration

A perpetually incomplete list of people who've inspired this technical and presentation effort