markdown-hub.el is a Markdown Hub publisher for Emacs. It uses Markdown Hub as a Docker container.
markdown-hub.el and Markdown Hub are based on syohex/emacs-realtime-markdown-viewer.
- Docker
- Emacs 24.4 or later
- websocket.el 1.4 or later
-
Put
markdown-hub.el
somewhere in yourload-path
. -
Add the following code into your .emacs:
(autoload 'markdown-hub-mode "markdown-hub" nil t) (autoload 'markdown-hub-browse "markdown-hub" nil t)
(Pull the Docker image of Markdown Hub in advance: docker pull papaeye/markdown-hub
)
- Open a Markdown file.
- Run
M-x markdown-hub-browse
to open the Markdown Hub preview page. It starts the Docker container of Markdown Hub if it is not running. - Run
M-x markdown-hub-mode
to enable Markdown-Hub mode in the Markdown buffer. Now you can experience live Markdown preview in the Markdown Hub preview page.
To use with boot2docker, add the following code into your .emacs:
(setq markdown-hub-hostname 'boot2docker)