Written on 2024 Aug 08
Notes for how to setup this website. Unfortunately or fortunately, no static site generators (ssg) are used. Maybe in the future hugo, 11ty, or even zola might be used. But for now, since the notes are minimal and I do not see myself churning out 10 bajillion notes, this setup is simple and should suffice.
There are four dependencies:
And three places of interest
Inside the Makefile there are these variables
NOTES = $(wildcard notes/*.md)
OUTPUT = $(NOTES:.md=.html)
NOTES_TEMPLATE = templates/notes.html
HTML_TEMPLATE = templates/template.html
CSS_TEMPLATE = style.css
NOTES
is where the directory of where .md file should be
searched. Currently the OUTPUT
is in the same directory and
converts the markdown in to html files.
The templates files are self explanatory. Html template and css
templates for the notes, and the NOTES_TEMPLATE
for the
landing page.
Note the NOTES_TEMPLATE
is actually not a pandoc
template but a custom template defined specifically for inserting hrefs.
It has an element {NOTES}
which is then sed’ed with the
appropriate links.
The Makefile only has three targets
Calling all
converts any changed .md files into .html
files. notes
regenerates the links for the notes landing
page. clean
, well, cleans… the files.
So the steps for publishing are
make
make notes
if the links got deleted, added, or
changedThat is about it… fairly simple… let us see how long this lasts.