4 ms·
As much as it pains me, org-mode is no better than Markdown when it comes to standards or implementations. There's basically just one de facto implementation of
by sondr3 8y ago
As much as it pains me, org-mode is no better than Markdown when it comes to standards or implementations. There's basically just one de facto implementation of it, and it has no specification or standard. There are parsers out there, but all of them are lacking one or more of the parts that make org-mode so great. Markdown shines with its simplicity, org-mode shines with its extensibility. Want to use it like a Jupyter Notebook? No problem. Want to use it as a spreadsheet? No problem. Want to write academic papers and export it to LaTeX? No problem. Want to use it outside of Emacs? Well...
I've been looking for and at solutions for using org-mode as the markup language for a static site generator, and none of the ones I find do what I want. org-mode has a builtin exporter that can build whole websites, but it is very barebones. The only real solution I know of is Hakyll with Pandoc, which is what I'm playing with right now.
I wish we had something like CommonMark for org-mode, but the overlap of people who use org-mode and don't use Emacs is probably extremely small, so it's not like there will be competing implementations outside of Emacs.
- kqr 8y agoSorry, probably missing something obvious: what prevents you from using Emacs instead of pandoc to convert Org to HTML in whatever pipeline you have going already?
- lucideer 8y agoThat's beside the point. If the argument is: "Emacs has better standardisation than Markdown" (which is what the article purports), that argument is invalid if it depends on always using a single implementation. That's not how standards work. i.e. If your answer to anyone's problem using Org is "what prevents you from using Emacs", then that ain't standardisation.
- kqr 8y agoI think we're in violent agreement. The submitted article mischaracterises the level of standardisation around the Org format. My comment was written with the intention of seeing if I could help with the specific problem the GP mentioned, since it seemed like the GP had overlooked a possible solution. I should have been more clear about that, sorry.
- sondr3 8y agoMostly that Emacs only exports to HTML without any context of the content, in a blog you'd like to extract the metadata which org-mode doesn't, it just exports the whole buffer as HTML. I've been thinking about writing a blogging engine in pure Emacs Lisp, but I'm not sure if I'm that crazy yet :)
- kqr 8y agoIf at some point you want to feel what it's like to be that crazy, there's a chance you'll find that it's actually not that crazy at all! When I created the current iteration of my website[1], I started out just adding some custom export formatting advice to the default ox functions. I couldn't resist add some additional functionality, though, and it takes refreshingly little work: There's one function that iterates through the Org source files and uses the built-in Org functions to query the files for tags, title, date, and so on. The result is memoised in a list, and then various other functions iterate through that list to generate index page, tag listing, and so on. [1]: https://two-wrongs.com/ https://two-wrongs.com/
- sondr3 8y agoNow this is intriguing to me, do you have any pointers for a setup like this?
- zelly 8y agoorg has a static site generator built in. Takes a lot of configuration though: https://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html https://orgmode.org/worg/org-tutorials/org-publish-html-tuto...
- kaushalmodi 8y agoBeetleB already mentioned ox-hugo above. I happened to stumble across this thread (because Org mode!) and I am also the ox-hugo author. I started working on ox-hugo exactly to have an Org export solution that exports the content + meta-data. If you look at the screenshots on the ox-hugo homepage (linked in BeetleB's comment), you'll see what I mean. Ask me anything about it.
- BeetleB 8y ago>I've been looking for and at solutions for using org-mode as the markup language for a static site generator, and none of the ones I find do what I want. I do exactly this via Pelican. I wrote a Pelican plugin to handle org files. Behind the scenes, it merely uses pandoc to convert to rst, and Pelican handles rst quite well. No major issues so far. Email me if you want the code. Note that my solution assumes one org file per post. I've been working on an equivalent of ox-hugo[1] for Pelican, and I can share that as well. It's still in alpha (I break compatibility all the time) - but it works well enough that I'm using it as my primary way of writing posts. Having all your posts in one org file is fantastic. It's still the same concept - it extracts a subtree into an org file, and uses pandoc to convert to rst. [1] https://ox-hugo.scripter.co/ https://ox-hugo.scripter.co/