Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Show a Markdown file rendered in the browser. The `markdown` program as well as `base64` must be installed. Assumes, that `x-www-browser` is correctly configured.
#!/bin/bash
MDFILE=$1
x-www-browser $(markdown "$MDFILE" | base64 -w0 | \
cat <(echo -n "data:text/html;charset=UTF-8;base64,") -)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment