-
Notifications
You must be signed in to change notification settings - Fork 0
Description
A quick fix for now (compile posts and write
/wordslinks page by hand)
Eventually you might want dynamic sections, asides, and so on (use Zola or 11ty)
See issue #5 for a fully-fledged static site builder (but perhaps YAGNI)
Current compiler problems
- The Ozaria page gets messy (mixing Markdown and html)
- Dynamic content is harder to add (where Elm lang would be useful)
- Project folders aren't the best laid out (try and simplify wherever possible)
Compiling with Pandoc
Compiling every single file is annoying with Pandoc, so you can use a bash script:
for file in ./source/*.md; do
pandoc --template=./source/pandoc-template.html -c ../static/styles.css -s "$file" -o "./build/$(basename "$file" .md).html";
doneFor the sitemap here's a good start (" quotes are optional for spaces in filename). You'd also need to read the file YAML data and output title (instead of $filename). Use Python or Elm?
for file in *.html; do
filename="$(basename "$file" .html)";
echo "<li><a href=\"$filename\">$filename</a></li>";
doneYou can also concatenate multiple files with
pandoc --template=./source/pandoc-template.html --css=./static/styles.css ./partials/*.md ./partials/metadata.yaml -s -o ./build/output.htmlPandoc is fine, but trying to use it to compile multiple blog files seems to call for code that I don't really understand. Might be best to find a simple tool that I don't have to think about, with better template language than Pandoc.