▲dfr

Based on dylanaraps website, this site is plain HTML and CSS, no JS.

Its purpose is to serve as a personal knowledge hub for me, my public notes, and maybe an occasional post.

The code that generates this site is a bash script of roughly 20 LOC:

style=$(<styles.css)
templ='<!DOCTYPE html><html lang=en><head><meta name="description" content="dfr-web"/><meta charset="UTF-8"><link href="data:image/png;base64," rel=icon type="image/png"><title>&#9650;dfr</title><meta name=viewport content="width=device-width"><style>'"$style"'</style></head><body><main>{{content}}</main></body></html>'
webring=$(<logos/webring.svg)
merveilles=$(<logos/merveilles.svg)
github=$(<logos/github.svg)
twitter=$(<logos/twitter.svg)
footer='<footer><a aria-label="Webring" href="https://webring.xxiivv.com/#random" target="_blank" rel="noopener">'"$webring"'</a><a aria-label="Merveilles" rel="me" href="https://merveilles.town/@dfr">'"$merveilles"'</a><a aria-label="Github" href="https://github.com/blayhem">'"$github"'</a><a aria-label="Twitter" href="http://twitter.com/blayhem">'"$twitter"'</a></footer>'

for md in src/*.md; do
    file_name=${md##*/}

    [[ $file_name != index.md ]] &&
        home="<a href='/'>&#9650;dfr</a>"

    minify --type html \
        <<< "${templ/'{{content}}'/${home}$(pandoc "$md")$footer}" \
        > ".site/${file_name/%.md/.html}"

    home=
done

For the full script including image processing (plus styles and license) head to ~dfr/05ee7b6.