Last active
July 17, 2019 02:23
-
-
Save kiwanami/89ddcb9462cc90d46802 to your computer and use it in GitHub Desktop.
goemon と pandoc で md リアルタイムプレビュー
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/lib/goemon.yml と適当なCSSを準備。 | |
# mdのファイルのある場所で以下のコマンドで起動。 | |
# webサーバーはpythonでなくてもwebrickでもnginxでも何でも。 | |
goemon -c ~/lib/goemon.yml python2.7 -m SimpleHTTPServer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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