#

Use this command in your GitLab pipe to publish your README as HTML

#

curl -L md2html.germs.dev | bash

#

See example rendered page

#
# Install dependencies
apt update
apt install --yes pandoc curl

# Get CSS and put it in site dir
curl -L md2html.germs.dev/style.css --create-dirs --output public/style.css

# Create 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

# Report error should pandoc fail
cp README.md public/index.txt
echo pandoc error > public/index.html

# Generate the HTML
pandoc README.md --css=style.css --standalone --highlight-style=tango -o public/index.html

#