main
Dozens B. McCuzzins 2022-09-24 18:28:11 -04:00
parent 584c3e014f
commit 7888e0b04a
1 changed files with 7 additions and 5 deletions

View File

@ -8,12 +8,14 @@ this is an iteration on my usual pandoc static site generator
## order ## order
instead of relying on literally naming files `0001-me-first.md` and `0002-me-second.md` so they are concatenated in the correct order, this repo introduces `basement.order` instead of relying on literally naming files `0001-me-first.md` and `0002-me-second.md` so they are concatenated in the correct order[^order], this repo introduces `basement.order`
in the file, you can `ls ./**/**` to list all files, and then order them in the way that is most pleasing to you in the file, you can `ls ./**/**` to list all files, and then order them in the way that is most pleasing to you
NOTE: you will of course need to update `basement.order` each time you add a document to the source. NOTE: you will of course need to update `basement.order` each time you add a document to the source.
[^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. <https://git.tilde.town/dozens/forest/>
## documents ## documents
documents are markdown with yaml frontmatter. they are compiled into: documents are markdown with yaml frontmatter. they are compiled into:
@ -31,10 +33,8 @@ fields:
- title (string): title of the document. mostly for rss item id - title (string): title of the document. mostly for rss item id
- created (date): date of creation. probably needs to be in `date -R` format. - 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. - updated (date): date of most recent update. mostly of rss. probably needs to be in `date -R` format.
- public (bool)[^1]: spoiler-free content - public[^bool] (bool) (optional): spoiler-free content
- syndicated (bool)[^1]: should this document be included in the rss feed? - syndicated[^bool] (bool) (optional): should this document be included in the rss feed?
[^1]: 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.
example: example:
@ -47,3 +47,5 @@ public: yes
syndicated: yes syndicated: yes
--- ---
``` ```
[^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.