Why do I keep seeing people that use #Emacs #OrgMode with an external static website generator, usually Hugo, to make a website? Is there something wrong with the org-publish subsystem that comes with org-mode? It seems to work well to me.

Or maybe there's nothing wrong per se with org-publish, but Hugo is somehow better? I can't really imagine Hugo is more extensible than org-publish, but maybe it's better in some other way?

@oantolin
Ive used Jekyll since 2016.

I don't need html. I don't need to build a site framework or css. I can publish directly as org or MD.

I publish to statichost.eu directly from my repo. It fetches it and builds it and publishes it.

I can also create posts from an entire org file or from a single entry which is what I do.

I use static host.eu because codeberg services in this realm are sketchy, or not recommended, or take away from resources they don't seem to have.

It never occured to me that org publish could create a website as easily as this. How do you do it?

@Zenie You mentioned converting single headings to a blog posts, which is a bit harder to do with org-publish; but if you want to put each blog post in a separate file, this configuration is enough:

(setq org-publish-project-alist
'(("blog"
:base-directory "posts/"
:base-extension "org"
:publishing-directory "public/"
:recursive t
:publishing-function org-html-publish-to-html
:auto-sitemap t)))

With that configuration you can just choose "Publish" from the Org Exporter menu to publish the project called "blog".

I think Org does not come with a function that you can use for a single-heading-->blog-post workflow, you'd have to write your own function to use for the :publishing-function key in place of org-html-publish-to-html. It wouldn't be too hard. (Or you can just put your entire blog in one webpage like I do. :P)

@oantolin
Ah I see. That's essentially what I do. I use publish to write my posts to /posts or wherever they go. I have the usual org publish definitions.

It just happens that publish is writing the markdown into a Jekyll project that then generates a static website.

Org-jekyll, or org-hugo is just an export function for org-publish. Posts get yaml headers created from the org drawers...

@oantolin I should say that it is what I do. We are both using org publish. But in different ways.

It's just that my org publish function is set to org-publish-jekyll instead of html. It writes markdown.