Based on this blog.
This guide shows you how to setup emacs to render a README.md very similarly to how github will do it; except it also works offline. There are no dependencies that can't be easily installed via the package manager on ubuntu.
- Install emacs24, the markdown mode, and pandoc. You may need the packages
- Get a style sheet that resembles the github style from this gist and store it. I put it in
- Configure emacs: in
(add-to-list 'auto-mode-alist '("README\\.md\\'" . gfm-mode)) (setq markdown-command "pandoc -c file:///home/beaujean/.emacs.d/github-pandoc.css --from markdown_github -t html5 --mathjax --highlight-style pygments --standalone")
Now test the setup. Create a markdown file, enter these lines
Save, then select
Export & view from the
within emacs. Your result should look like
When editing in emacs, I find it comfortable to regularly export via
C-c C-c e and have firefox reload the page on demand using the Auto Reload extension