I showed you my source code, pls respond
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.8 KiB

4 years ago
4 years ago
  1. #+TITLE: Reveal
  2. #+AUTHOR: Christopher James Hayward
  3. #+EMAIL: chris@chrishayward.xyz
  4. #+PROPERTY: header-args:emacs-lisp :tangle reveal.el :comments org
  5. #+PROPERTY: header-args :results silent :eval no-export
  6. #+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil
  7. #+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
  8. Create high-quality, portably presentations with ~reveal.js~[fn:1].
  9. * Config
  10. Integrate ~reveal.js~[fn:1] with Emacs using the ~ox-reveal~[fn:2] package. Configure it to use a CDN to produce presentations that are not dependent on any locally installed software. An important caveat here is that the paths to images must be absolute URLs. I get around this by hosting all of the images myself, meaning I can load the presentations in any web browser.
  11. #+begin_src emacs-lisp
  12. (use-package ox-reveal
  13. :after ox
  14. :custom (org-reveal-root "https://cdn.jsdelivr.net/npm/reveal.js"))
  15. #+end_src
  16. * Shortcuts
  17. Add a capture tempalte for quickly creating slide presentations with the desired markup and configuration already applied.
  18. #+begin_src emacs-lisp
  19. (with-eval-after-load 'org-roam
  20. (add-to-list 'org-roam-capture-templates
  21. '("s" "Slides" plain (function org-roam-capture--get-point)
  22. "%?"
  23. :file-name "docs/slides/${slug}"
  24. :unnarrowed t
  25. :head
  26. "
  27. ,#+TITLE: ${title}
  28. ,#+AUTHOR: Christopher James Hayward
  29. ,#+EMAIL: chris@chrishayward.xyz
  30. ,#+REVEAL_ROOT: https://cdn.jsdelivr.net/npm/reveal.js
  31. ,#+REVEAL_THEME: serif
  32. ,#+EXPORT_FILE_NAME: ${slug}
  33. ,#+OPTIONS: reveal_title_slide:nil
  34. ,#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil
  35. ,#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
  36. ")))
  37. #+end_src
  38. * Footnotes
  39. [fn:1] https://revealjs.com
  40. [fn:2] https://github.com/hexmode/ox-reveal