Skip to content

azliu0/azliu

Repository files navigation

azliu.cc

powered by SvelteKit and Tailwind CSS

development

run the website with

yarn install
yarn dev

by default, logs won't show up, because they must be processed and generated with the script. to do this, run

python3 scripts/compile.py

raw logs should be written as md files in the logs folder.

rendering logs

logs are roughly rendered in two steps:

  • raw markdown is compiled and formatted using a python script, which lives in scripts/compile.py (see here). the approximate functionality of this script is to parse the raw markdown, ensure that it is formatted correctly, and add things like links for headers and a table of contents.
  • the output of the script is compiled into a format that Svelte can use by mdsvex.

using a script to do the first step could be viewed as overkill, but I wasn't able to find a better solution or library that does this for me.

another note is that logs are technically rendered as "dynamic" routes, meaning that they are not hardcoded. the site is still deployed as a static website through Svelte's static site generation (see here).

rss feed

the script to generate the rss feed for the logs (see here) can be run with

python3 scripts/rss.py