3 ms·
I use this to generate my site: #!/usr/bin/env bash for file in `find . -name '*.md'`; do output=${file::-3}.html if [[ `date -r "$fil
by demindiro 4y ago
I use this to generate my site:
#!/usr/bin/env bash
for file in `find . -name '*.md'`; do
output=${file::-3}.html
if [[ `date -r "$file" "+%s"` -le `date -r "../$output" "+%s"` ]]
then
echo "Skipping $file"
continue
fi
mkdir -p ../$(dirname $output)
echo Generating $output from $file
cat << EOF > ../$output
<!DOCTYPE html>
`cat head.html`
<body>
`cat navigation.html`
<main>
`pandoc $file`
</main>
<footer>
<span>The content on this page is licensed under the CC BY-ND 4.0</span>
<a style="float:right" href="/md/$file">Source</a>
</footer>
</body>
EOF
done;