Source for tarng.com
- Use Homebrew to install
python3
andfswatch
(only necessary for live reload locally). - Use
pip
(python3 -m pip install ...
) to installmisaka
(Markdown parsing),PyYaml
(frontmatter extraction since misaka doesn't support it), andJinja2
(templating), as well ashttpwatcher
.
cd source
./watch
httpwatcher
./watch
will watch thesource/
directory for any changes, rebuild (python3 gensite.py
) and refresh any tabs in Safari (lol sorry not sorry) with local files open.- Run
httpwatcher
directly in bash/zsh/fish.
You may need to run ./restore_mtime.sh
since git clone doesn't persist the creation time of each file, which effects the gensite.py
's automatic date adding for certain content.
/
source/
content/ - all markdown files
templates/ - all templates
base.html - basic wrapper with <head>, <meta> to be extended
gensite.py
<generated html files here>