3 ms·
I developed the ox-hugo[1] Emacs package, which allows exporting multiple posts (even the website structural pages like Home page, About page, etc.) from a sing
by kaushalmodi 8y ago
I developed the ox-hugo[1] Emacs package, which allows exporting multiple posts (even the website structural pages like Home page, About page, etc.) from a single Org file.
So here's the elevator pitch:
- ox-hugo is an Emacs package that exports from Org mode to Markdown format that's compatible with Hugo (https://gohugo.io https://gohugo.io) / Blackfriday + automagically converts natural* Org metadata to TOML/YAML front-matter.
- To understand what I mean by "natural" Org metadata, see this table[2].
- ox-hugo works with Hugo. I let each tool to do what they are best at:
(i) Org mode deals with the rich markup (Org macros, INCLUDE, TOC, keywords, Org Babel, NoWeb, property/tag inheritance, etc.) and Emacs/Elisp processing, and
(ii) Hugo deals with all the "Web stuff" in super-fast fashion (roughly 500 pages in less than a second [depends on your theme efficiency too]): Markdown->HTML conversion, generation of list pages, taxonomy pages, RSS/Atom/JF2/.. feeds, minification, cache busting, page generation using JSON/TOML/.. data, etc.
- I prefer having most of the posts be exported from a single Org file (my blog[6] source[3]). So ox-hugo definitely supports that. It also supports the conventional flow of exporting each Org file to a single post too (I use that style too, for my "notes" posts).
- The ox-hugo doc site[1] is dog-fooded by ox-hugo itself. Here's the single Org file[4] that holds the content for the entire site.
--> Here are few Real World Examples[5] of people using ox-hugo + Hugo.
== Refs ==
[1]: https://ox-hugo.scripter.co/ https://ox-hugo.scripter.co/
[2]: https://ox-hugo.scripter.co/doc/org-meta-data-to-hugo-front-matter/#for-subtree-based-exports https://ox-hugo.scripter.co/doc/org-meta-data-to-hugo-front-...
[3]: https://gitlab.com/kaushalmodi/kaushalmodi.gitlab.io/blob/master/content-org/scripter-posts.org https://gitlab.com/kaushalmodi/kaushalmodi.gitlab.io/blob/ma...
[4]: https://raw.githubusercontent.com/kaushalmodi/ox-hugo/master/doc/ox-hugo-manual.org https://raw.githubusercontent.com/kaushalmodi/ox-hugo/master...
[5]: https://ox-hugo.scripter.co/doc/examples/ https://ox-hugo.scripter.co/doc/examples/
[6]: https://scripter.co/ https://scripter.co/
PS: Your user name sounds a bit familiar. So I apologize if I have already mentioned ox-hugo to you.
- sus_007 8y ago+1 , really nice integration. I use it daily for my blog. Kudos to you. (:
- peatmoss 8y agoThank you for the write up and for the tool. I’ll be checking this out. I can’t remember anyone mentioning ox-hugo to me before, but that may be more an indictment of my memory :-)
- colelyman 8y agoI really enjoy using ox-hugo to blog as well, it works very well and does everything that I need it to do! @kaushalmodi did a great job developing it