60 lines
2.6 KiB
Raw Normal View History

2022-07-24 14:15:32 +00:00
the kids in the basement are gonna play some rpg in on the listserv
2022-07-26 14:12:48 +00:00
## about
this is an iteration on my usual pandoc static site generator
## order
2022-09-24 22:28:11 +00:00
instead of relying on literally naming files `` and `` so they are concatenated in the correct order[^order], this repo introduces `basement.order`
2022-07-26 14:12:48 +00:00
in the file, you can `ls ./**/**` to list all files, and then order them in the way that is most pleasing to you
2022-07-31 01:40:41 +00:00
NOTE: you will of course need to update `basement.order` each time you add a document to the source.
2022-09-24 22:28:11 +00:00
[^order]: this is the strategy i employed in *forest*. it worked okay, but left something to be desired. namely, the flexibility to insert new files at random locations, or to rearrange existing files, without having to rename a bunch of files. i'm not sure this current solution is the best one. but it is an improvement i think. <>
2022-07-26 14:12:48 +00:00
## documents
documents are markdown with yaml frontmatter. they are compiled into:
- html with spoilers for game ref
2022-07-26 22:08:23 +00:00
- 'public' html sans spoilers for players
2022-07-26 14:12:48 +00:00
- rss feed for syndicated documents
## metadata
every markdown document includes yaml frontmatter metadata
- title (string): title of the document. mostly for rss item id
2022-07-26 22:08:23 +00:00
- created (date): date of creation. probably needs to be in `date -R` format.
- updated (date): date of most recent update. mostly of rss. probably needs to be in `date -R` format.
2022-09-24 22:28:11 +00:00
- public[^bool] (bool) (optional): spoiler-free content
- syndicated[^bool] (bool) (optional): should this document be included in the rss feed?
2022-07-26 14:12:48 +00:00
title: notes
created: 2022-07-24
updated: 2022-07-25
2022-07-26 22:08:23 +00:00
public: yes
syndicated: yes
2022-07-26 14:12:48 +00:00
2022-09-24 22:28:11 +00:00
[^bool]: These are not true booleans. Pandoc templates cannot evaluate the value of a field. Only its presence. This could say `public: astronauts` or `syndicated: spaghetti`. You can only set these flags on and off by including or omitting the field entirely. This is probably not the way you would expect it to work, so watch out. Incidentally, this is the same way that the stateless templating engine *mustache* works. Pandoc templates bring so little to the table that it might be easier in the future to just use recfiles instead of markdown+yaml, and pipe it through mustache or recfmt.
## macros
you can define macros in `/macros` and then include them in your documents to be expanded while building.
i arbitrarily adopted a "zxMACRONAME" naming convention because an all-caps macro name is *probably* safe, but is even safer with a random `zx` in front of it.
also it gives you good autocompletion if all your macros have the same prefix / namespace.