Dotfiles, utilities, and other apparatus.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

28 lines
1.1 KiB

# This was originally used to generate https://p1k3.com/notes-on-notes
#
# See https://p1k3.com/2019/3/3/ ( or ../../archives/2019/3/3 )
# for a description of how I arrived at the contents of this entry.
#
# In summary, Pandoc generates the index from index.md and shortlinks.md, with
# some filtering of the abstract syntax tree by filter.py. template.md defines
# a template for the rendered HTML output. The resulting index file is then
# rendered like usual by wrt.
#
# For Pandoc, you can get a working version from Apt:
#
# sudo apt-get install pandoc
#
# ...but may want a newer release (2.7 or higher) for the --id-prefix feature
# and smart quotes to work as expected. At this writing, a static build can be
# retrieved from:
#
# https://github.com/jgm/pandoc/releases
#
# For filter.py, you'll need pandocfilters installed for Python 3:
#
# pip3 install pandocfilters
#
# This is rife with hacks, but was a good learning exercise.
index: filter.py index.md Makefile template.md
cat index.md | pandoc --toc --id-prefix=notes-on-notes- --metadata pagetitle="notes on notes" --template=template.md --filter=./filter.py -f markdown -t html -o index.html