#!/bin/bash # Run without installing # curl -L turpin.cloud/md2html | bash # Install dependencies apt update apt install --yes pandoc curl # Write footer with pipe info echo >> README.md echo "___" >> README.md echo "- $CI_PIPELINE_CREATED_AT \"$CI_COMMIT_TITLE\"" >> README.md echo "- CI_JOB_URL=[$CI_JOB_URL]($CI_JOB_URL)" >> README.md # Get CSS and put it in site dir curl -L https://turpin.cloud/style.css --output style.css # Make publishing dir and start to populate it mkdir public cp README.md public/index.txt # Report error should pandoc fail echo pandoc error > public/index.html # Generate the HTML cp style.css public/ pandoc README.md --metadata date="$(date)" --css="style.css" --standalone --toc --toc-depth=2 --highlight-style=tango -o public/index.html