Org-mode & Hugo's features

Hello,

latest additions like support for org-mode (as well as multi-lingual feature) in Hugo, makes me enthusiastic to migrate from Nikola, but wonder whether org-mode is a first-class citizen in Hugo like markdown, iow. whether things like shortcodes work equally well when one is using org-mode?

A big Yes.

1 Like

What about AsciiDoc & rst markups?

All of the markups support shortcodes.

AsciiDoc and RST isn’t “first class citizens” because they depend on external programs to work, i.e. they need extra setup and is slower.

BlackFriday, MMark and the Org-Mode renderer is native Go code … so … fast.

I’m testing org-mode support with v0.20-DEV-560ED6E, but it looks that:

hugo new post/test.org

still creates test.org file with the TOML-formatted front-matter, so I wonder if it is possible to create new content with org-mode headers in the markup considering that Hugo already can parse such files?

No need to say that the ability to have uniform syntax across the whole content of org-mode files is great advantage over using other markups (asciidoc, markdown, rst) where one has to mix markup with the TOML frontmatter.

The archetype feature needs a revision for more than one reason.

But you can try to set markdown = org in front matter for the archetype file. The suffix in the new command has no logical usage other than the end resulting file name.

In 0.20?

cat archetypes/default.md +++ markdown = org +++

hugo new blog/t.org ERROR 2017/03/20 11:17:02 Error processing archetype file /home/gour/prj/hugo/net/archetypes/default.md: (2, 12): keys cannot contain new lines Error: (2, 12): keys cannot contain new lines

Any hint?

That is in general, iow. same when one use rst/asciidoc?

No…

I think the best way to create new Org sources for Hugo is by using emacs.
I’ve collected some lines of code to achieve that.

Hope that helps.