squeeze

A static site generator that can put the toothpaste back in the tube.
git clone https://git.mulligrubs.me/squeeze
Log | Files | Refs | README | LICENSE

generate_html.sh (470B)


      1 #!/usr/bin/env sh
      2 
      3 echo "$1"
      4 
      5 swipl --traditional --quiet -l parse_entry.pl -g "consult('$2/site.pl'), generate_entry('$2/source/$1')." |
      6 	# Unwrap block-level elements that have erroneously been wrapped in <p> tags.
      7 	sed "s|<p><details|<details|g" |
      8 	sed "s|</summary></p>|</summary>|g" |
      9 	sed "s|<p></details></p>|</details>|g" |
     10 	sed "s|<p><figure|<figure|g" |
     11 	sed "s|</figure></p>|</figure>|g" |
     12 	# Smarten punctuation.
     13 	smartypants \
     14 	> "$2/output/${1%%.md}.html"