Btw, mkws works GREAT with Plan9 mk. You just replace the bin/mkws script with a mkfile. It’s drop in! Just create a mkfile in the bin directory, name it mkws and use a mk shebank like #!/usr/local/plan9/bin/mk -f.

#!/usr/local/plan9/bin/mk -f

URL=//example.com
SHARE=share

THEMEFILES=$SHARE/l.upphtml\
    $SHARE/s.uppcss\

TPLFILES=`{find . -maxdepth 1 -name "*.upphtml" | cut -c3-}
HTMLFILES=${TPLFILES:%.upphtml=%.html}

$URL:V: sitemap.xml $HTMLFILES

%.html:Q: %.upphtml $THEMEFILES
    echo Making $target
    pp $SHARE/l.upphtml ${target%.html}.upphtml $URL > $target

sitemap.xml:Q: $HTMLFILES $SHARE/sitemap.uppxml
    echo Making $target
    pp $SHARE/sitemap.uppxml $URL > $target

clean:VQ:
    echo "$HTMLFILES" sitemap.xml | xargs -n1 echo "Removing"
    rm -f $HTMLFILES sitemap.xml

There, your web site builds only when assets are out of date!`

⤋ Read More

Participate

Login to join in on this yarn.