#!/bin/sh template () { echo "" echo "" echo "" echo "" echo "" echo "$1" : "${inicio:=}" if test "$inicio" != true; then echo "☚ Volver al inicio" fi if test -n "$2"; then echo "
" echo "

$1

" echo "

Último cambio:

" echo "
" fi } markdown () { # TODO: hacky cmark --unsafe "$1" \ | sed "s/\1<\/a>/g' } outdir=build mkdir -p $outdir # Autocopiarnos :) cp ./*.sh ./*.md ./*.css ./*.png ./*.mp4 ./*.svg ./*.html "$outdir" index="$outdir/index.html" inicio=true header=false template "nulo.in" > "$index" markdown index.md >> "$index" for file in *.md; do test "$(basename "$file")" = index.md && continue title="$(basename "$file" .md)" outfile="$outdir/$title.html" template "$title" "$file" > "$outfile" markdown "$file" >> "$outfile" done for file in *.gen; do title="$(basename "$file" .gen)" outfile="$outdir/$title.html" template "$title" "$file" > "$outfile" "./$file" >> "$outfile" done