Unfortunately, this is exactly what I'd like to do. Does anyone have cool examples of this alternate workflow?
I liked the thoroughness of "why I made this project" in its README.
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) / 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/
[2]: https://ox-hugo.scripter.co/doc/org-meta-data-to-hugo-front-...
[3]: https://gitlab.com/kaushalmodi/kaushalmodi.gitlab.io/blob/ma...
[4]: https://raw.githubusercontent.com/kaushalmodi/ox-hugo/master...
[5]: https://ox-hugo.scripter.co/doc/examples/
[6]: https://scripter.co/
PS: Your user name sounds a bit familiar. So I apologize if I have already mentioned ox-hugo to you.
I can’t remember anyone mentioning ox-hugo to me before, but that may be more an indictment of my memory :-)
Looks interesting though.
Next time I feel like I want to write a blog I'll just put it on wordpress.com or so.
[1]: https://getgrav.org/ [2]: http://picocms.org/
[0] https://blog.getpelican.com/
[1] https://github.com/getpelican/pelican-plugins/tree/master/or...
https://orgmode.org/worg/org-blog-wiki.html
I've been using v1 of o-blog for a while, and it works ok: http://notes.secretsauce.netMaybe the other options are better, I don't know. Would definitely be interested in hearing people's personal experiences.
If you are open to trying out Hugo, see if my above comment[1] regarding ox-hugo.
``` $ emacs --batch -q -l src/my-web.el -f org-publish-all Cannot open load file: No such file or directory, htmlize ```
I tried and succeeded in installing htmlize. But still ran into this issue. How do I resolve this?
Now run emacs:
~/web$ emacs --batch -q -l src/htmlize.el\
-l src/my-web.el -f org-publish-all
See https://gitlab.com/sadiq/sadiq.gitlab.io/blob/master/.gitlab...You can simply download/clone the complete repo[1] and run the above command from its root directory.
[0] https://github.com/hniksic/emacs-htmlize/blob/master/htmlize...
One of these days, I'm going to see if I can get something similar working on GitLab (which I've started using and admit to liking better at the moment). I think it should be easy, if a bit expensive (for them) because I should be able to set up a docker image with Emacs and export the HTML to generate a static page.
P.S. Anyone interested in the content of my blog post -- I got stalled trying to reason about the purpose of "this/self", but I've unstuck myself and should be finishing it up soon.
The project seems to be dead (or stable!?), but I keep using it because I made some small tweaks to the default theme, which resulted in a clean looking website.
Maybe I'll switch to vanilla org-mode for static website generation in the future since I seem to always be in the mood to remove dependencies from my emacs config these days.
That's a bit of a pickle.
There's also Arthur Malabarba's extension[2] to ox-jekyll that's a much more complete solution.
[1] https://gist.github.com/andreareina/37c634f102f819db8e49828f...
[2] http://endlessparentheses.com/how-i-blog-one-year-of-posts-i...
aw, it's not boring! Don't sell yourself short!