Skip to content

Instantly share code, notes, and snippets.

@JohnL4
Last active October 8, 2018 18:46
Show Gist options
  • Save JohnL4/d18162af5f9f1f511df9fde712754769 to your computer and use it in GitHub Desktop.
Save JohnL4/d18162af5f9f1f511df9fde712754769 to your computer and use it in GitHub Desktop.
Live updates of org-mode files
In emacs lisp (emacs 25.2.1; org-mode 9.1.2):
(add-hook 'org-mode-hook
(lambda ()
(add-hook 'after-save-hook 'org-html-export-to-html nil t)
))
In org-mode file (having downloaded live.js from https://livejs.com):
#+HTML_HEAD: <script src="/live.js"></script>
At command line, in directory containing live.js:
python3 -m http.server
Exports on port 8000.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment