[Emacs] Add ox-hugo, remove ox-gfm
This commit is contained in:
parent
a1138a9ff9
commit
d2cbdc3289
@ -3472,6 +3472,41 @@ files.
|
||||
(setq preview-org-html-refresh-configuration 'save))
|
||||
#+end_src
|
||||
|
||||
**** Hugo
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Packages-Configuration-Org-mode-Exporters-Hugo-ca3473613aj0
|
||||
:END:
|
||||
I manage [[https://blog.phundrak.com][my blog]] with [[https://gohugo.io/][Hugo]]. Although it natively supports the org
|
||||
format, it’s not great compared to its markdown support. So, instead,
|
||||
let’s directly export our org files as markdown files and let Hugo do
|
||||
the rest of the job for us!
|
||||
#+begin_src emacs-lisp
|
||||
(use-package ox-hugo
|
||||
:defer t
|
||||
:after ox
|
||||
:straight t)
|
||||
#+end_src
|
||||
|
||||
I also have a function for publishing my blog once I exported my
|
||||
articles with ~ox-hugo~. It will compile blog into a ~public/~ directory
|
||||
and copy its content over to my remote server.
|
||||
#+begin_src emacs-lisp
|
||||
(defun phundrak/blog-publish ()
|
||||
"Publish my blog through Hugo to my remote server."
|
||||
(interactive)
|
||||
(let* ((default-directory (expand-file-name "~/org/blog"))
|
||||
(public-path (concat default-directory "/public"))
|
||||
(target-path "/rsync:Tilo:/home/phundrak/www/phundrak.com/blog"))
|
||||
(compile "hugo")
|
||||
(let ((files (mapcar (lambda (file)
|
||||
(f-relative file public-path))
|
||||
(f-files public-path nil t))))
|
||||
(dolist (file files)
|
||||
(copy-file (concat public-path "/" file)
|
||||
(concat target-path "/" file)
|
||||
t nil t)))))
|
||||
#+end_src
|
||||
|
||||
**** LaTeX
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Packages-Configuration-Org-mode-File-export-LaTeXg2b5fl6184j0
|
||||
@ -3555,22 +3590,6 @@ add their extension like so:
|
||||
(add-to-list 'org-latex-logfiles-extensions ext t))
|
||||
#+end_src
|
||||
|
||||
**** Markdown
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Packages-Configuration-Org-mode-File-export-Markdown-g2vh5vz095j0
|
||||
:END:
|
||||
There’s not really any unified Markdown specification, meaning
|
||||
everyone can pretty much do whatever they want with the syntax and
|
||||
still call it Markdown. Great… But something I appreciate is Github
|
||||
supports some extra HTML to make our files extra spicy! And lucky me,
|
||||
there’s a package for exporting my org files to Github-flavored
|
||||
Markdown!
|
||||
#+begin_src emacs-lisp
|
||||
(use-package ox-gfm
|
||||
:after (ox org)
|
||||
:straight (:build t))
|
||||
#+end_src
|
||||
|
||||
**** Reveal.js
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: Packages-Configuration-Org-mode-File-export-Reveal-js-mzijhel099j0
|
||||
|
Loading…
Reference in New Issue
Block a user