Browse Source

Add capture templates for blogs / presentations

main
parent
commit
af8f9d6443
  1. 31
      README.org
  2. 16
      init.el

31
README.org

@ -584,6 +584,26 @@ Configure the default capture template for daily entries.
:head "#+TITLE: %<%Y-%m-%d>\n"))) :head "#+TITLE: %<%Y-%m-%d>\n")))
#+end_src #+end_src
** Blogging
https://github.com/kaushalmodi/ox-hugo
+ Configure for =one-post-per-file=
#+begin_src emacs-lisp
(use-package ox-hugo
:after ox)
#+end_src
Creaate a capture template for blog posts in the =posts= sub directory.
#+begin_src emacs-lisp
(add-to-list 'org-roam-capture-templates
'("b" "blog" plain (function org-roam-capture--get-point)
"%?"
:file-name "posts/${slug}"
:head "#+TITLE: ${title}\n#+HUGO_BASE_DIR: ../\n#+HUGO_SECTION: ./\n"))
#+end_src
** Presentations ** Presentations
Produce high quality presentations that work anywhere with =HTML/JS= via the =reveal.js= package. Produce high quality presentations that work anywhere with =HTML/JS= via the =reveal.js= package.
@ -593,5 +613,16 @@ https://github.com/hexmode/ox-reveal
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package ox-reveal (use-package ox-reveal
:after ox
:custom (org-reveal-root "https://cdn.jsdelivr.net/reveal.js/3.9.2/")) :custom (org-reveal-root "https://cdn.jsdelivr.net/reveal.js/3.9.2/"))
#+end_src #+end_src
Create a capture template for presentations stored in the =slides= sub directory.
#+begin_src emacs-lisp
(add-to-list 'org-roam-capture-templates
'("s" "slides" plain (function org-roam-capture--get-point)
"%?"
:file-name "slides/${slug}"
:head "#+TITLE: ${title}\n"))
#+end_src

16
init.el

@ -239,5 +239,21 @@
:file-name "daily/%<%Y-%m-%d>" :file-name "daily/%<%Y-%m-%d>"
:head "#+TITLE: %<%Y-%m-%d>\n"))) :head "#+TITLE: %<%Y-%m-%d>\n")))
(use-package ox-hugo
:after ox)
(add-to-list 'org-roam-capture-templates
'("b" "blog" plain (function org-roam-capture--get-point)
"%?"
:file-name "posts/${slug}"
:head "#+TITLE: ${title}\n#+HUGO_BASE_DIR: ../\n#+HUGO_SECTION: ./\n"))
(use-package ox-reveal (use-package ox-reveal
:after ox
:custom (org-reveal-root "https://cdn.jsdelivr.net/reveal.js/3.9.2/")) :custom (org-reveal-root "https://cdn.jsdelivr.net/reveal.js/3.9.2/"))
(add-to-list 'org-roam-capture-templates
'("s" "slides" plain (function org-roam-capture--get-point)
"%?"
:file-name "slides/${slug}"
:head "#+TITLE: ${title}\n"))
Loading…
Cancel
Save