Setting up this website

This website was generated from Markdown using the tool lowdown to generate HTML. A simple Makefile was used to generate the HTML and install to my web server file directory.

.SUFFIXES: .md .html
.PHONY: all clean install

DEST != find . -name "*.md" | sed 's/\.md$/\.html/'

all: $(DEST)

clean:
    find . -name "*.html" -delete

install:
    find . -name "*.html" -exec install -CD -g daemon -m 644 -o www {} /var/www/htdocs/{} \;
    install -C -g daemon -m 644 -o www style.css /var/www/htdocs/style.css

# Rule to convert md to html
.md.html:
    lowdown -s -o $@ $<
    # Fix source code highlighting. This make the Makefile take much longer
    # due to python startup time
    python3 code_hl.py $@
    # Set lang attribute to English.
    sed -i 's/<html>/<html lang="en-US">/' $@
    # Wrap tables with a div so that we can use CSS to enable scrolling on
    # overflow
    sed -i 's/<table>/<div class="tablediv"><table>/' $@
    sed -i 's;</table>;</table></div>;' $@

Some notes: