Skip to content

Instantly share code, notes, and snippets.

@kiwanami
Last active July 17, 2019 02:23
Show Gist options
  • Save kiwanami/89ddcb9462cc90d46802 to your computer and use it in GitHub Desktop.
Save kiwanami/89ddcb9462cc90d46802 to your computer and use it in GitHub Desktop.
goemon と pandoc で md リアルタイムプレビュー
# ~/lib/goemon.yml と適当なCSSを準備。
# mdのファイルのある場所で以下のコマンドで起動。
# webサーバーはpythonでなくてもwebrickでもnginxでも何でも。
goemon -c ~/lib/goemon.yml python2.7 -m SimpleHTTPServer
# Generated by goemon -g
livereload: :35729
tasks:
- match: '*.md'
commands:
- pandoc --self-contained --toc -f markdown -o ${GOEMON_TARGET_NAME}.html -c ~/lib/github-markdown.css ${GOEMON_TARGET_FILE}
- sed -i -e 's/<\/head>/<script src="http:\/\/localhost:35729\/livereload.js"><\/script><\/head>/' ${GOEMON_TARGET_NAME}.html
- :livereload /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment