Skip to content

Instantly share code, notes, and snippets.

@zinovyev
Created February 27, 2017 04:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zinovyev/16eca599d2cc33e60d9789c158d85ef8 to your computer and use it in GitHub Desktop.
Save zinovyev/16eca599d2cc33e60d9789c158d85ef8 to your computer and use it in GitHub Desktop.
Pandoc proper html file generation. Example: `htmldoc README`.
#! /usr/bin/env bash
pandoc "$1.md" -o "$1.html"
echo -e "<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>$1</title></head><body>\n$(cat $1.html)\n</body></html>" > "$1.html"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment