[HN Gopher] Babel is why I keep blogging with Emacs
       ___________________________________________________________________
        
       Babel is why I keep blogging with Emacs
        
       https://orgmode.org/worg/org-contrib/babel/
        
       Author : ibobev
       Score  : 145 points
       Date   : 2025-10-02 18:06 UTC (4 hours ago)
        
 (HTM) web link (entropicthoughts.com)
 (TXT) w3m dump (entropicthoughts.com)
        
       | BeetleB wrote:
       | Heh. I write my blog posts in org mode, and have a way to get
       | Pelican[1] to read them. It doesn't support executing Babel
       | source blocks on export - I should probably add that feature to
       | my package.[2]
       | 
       | [1]https://getpelican.com/
       | 
       | [2]https://blog.nawaz.org/posts/2022/Dec/reintroducing-opel-
       | put...
        
         | zenmac wrote:
         | have not seen pelican before, but went with zola. IMHO a binary
         | distro is just much cleaner than the pip/uv/npm/yarn approach.
         | And it is fast, and can auto rendered rss/atom.
        
           | BeetleB wrote:
           | I stuck to Pelican because it's Python, and thus easy for me
           | to write plugins.
           | 
           | And of course, it can do Atom/RSS.
        
         | vunderba wrote:
         | I started my blog with Pelican before migrating over to Astro.
         | I enjoyed Pelican (Python based static site generator) for the
         | most part but the theme system wasn't to my liking.
        
       | NeutralForest wrote:
       | I used to use org-mode with hugo but it got annoying, I didn't
       | like how I needed to structure my org files, it kind of forced me
       | into some structure. Now I use Zola with Markdown. I'm losing in
       | power but it's so much simpler tbh.
        
         | Arubis wrote:
         | If you ever happen to go back, https://ox-hugo.scripter.co/ has
         | a couple different options for supported structures. I use it
         | for https://dylanfitzgerald.net without much issue.
        
       | dima55 wrote:
       | I blog with emacs using the long-abandoned o-blog generator.
       | Anybody have something better? Using the org-mode exporter, with
       | working org-babel and equations and all that. This article
       | doesn't go into the details.
        
         | EnigmaCurry wrote:
         | > Anybody have something better?
         | 
         | I wrote this to publish Org docs to S3 -
         | https://github.com/EnigmaCurry/s3-publish.el - I wanted
         | something extremely lightweight, not even wanting to commit
         | things to git like I normally would and waiting for CI to build
         | something. Uploading html directly to S3 means it gets
         | published in <1s from push.
        
           | sandinmyjoints wrote:
           | That's neat! For org, if it had an option to generate the
           | HTML file name from slugifying the org file name instead of
           | the salted hash, it could be fantastic for rapid lightweight
           | blogging.
        
           | kstrauser wrote:
           | o-blog in the parent comment reminded me that I use to use a
           | similarly named SSG called blogofile, and what do you know.
           | Small world.
        
       | thecsw wrote:
       | I was in the same boat for many years! Having started using org-
       | mode for my website in 2018 [1] (just add index.org to the path
       | to see the source), it grew into this massive pile of obscure gen
       | and with my limited comfort level with lisp, turned into a scary
       | smelling concoction of dozens of perl/sed/sh scripts that
       | modified the output to fit my needs and have them do something
       | fancy.
       | 
       | But then, really, sat down for about 48 hours on a lonely weekend
       | when everyone was away and wrote a simple static site generator
       | [2] that takes exact same files and produces output that I fully
       | understand e2e, becoming the project I'm most proud of.
       | 
       | There are so many other generators I tried (hugo, jekyll, rails,
       | asciidoctor, org-publish, astro), rolling up your own gives a
       | sense of a stable foundation. Love your website! So clean. One
       | thing that I'm thinking of adding (though I haven't touched my
       | generator that much, I consider it "complete") is the dynamic
       | execution of source code blocks.
       | 
       | [1] https://sandyuraz.com
       | 
       | [2] https://github.com/thecsw/darkness
        
       | agentultra wrote:
       | I mean that 2000 lines, I assume, is going to only be that many
       | lines because it will have 20-50k lines of dependencies under it.
       | 
       | It's not a bad idea to understand the software you use. A matter
       | of where you want to spend your time. Learning about the org-mode
       | internals is also a valid choice.
        
       | ashton314 wrote:
       | I write my blog (https://lambdaland.org) entirely in Emacs now.
       | It's Hugo, but I use ox-hugo [1] to convert from org-mode to
       | markdown and Hugo converts it to HTML.
       | 
       | What I like about this: everything else I do is in org-mode
       | anyway, so this fits my brain. I also have some nice org-mode
       | tooling to make things like footnotes, margin notes, etc. look
       | really nice.
       | 
       | A little convoluted, sure, but I've seen worse. :-P
       | 
       | [1]: https://ox-hugo.scripter.co/
        
         | Lownin wrote:
         | It looks like Hugo also has native .org file support. Does ox-
         | hugo provide functionality over Hugo's native org file parsing?
        
           | lordgrenville wrote:
           | Didn't know that Hugo supports org files. But just one
           | example of added functionality is being able to use one big
           | file with a subtree for each post.
        
           | BeetleB wrote:
           | It didn't back when ox-hugo was written.
        
           | globular-toast wrote:
           | I started using Hugo's built-in org support, but I found it
           | quite limiting. I can't remember the specifics, but it
           | doesn't support everything you can do with Markdown. So I
           | quickly switched to ox-hugo. They can co-exist though so you
           | can try the native support then switch if you run into the
           | same shortcomings as I did.
        
         | dima55 wrote:
         | Does org-babel work? Do equations work?
        
         | cyrialize wrote:
         | I've also thought about using ox-hugo! I have (literally)
         | organized my life in plain text, so I keep everything in org
         | files.
        
       | improgrammer007 wrote:
       | HN and its obsession with org-mode
        
       | projektfu wrote:
       | FWIW, org's HTML export is about 4000 lines of elisp, and it is
       | pretty well modularized.
       | 
       | https://git.sr.ht/~bzg/org-mode/tree/main/item/lisp/ox-html....
       | 
       | The publish front end is in
       | 
       | https://git.sr.ht/~bzg/org-mode/tree/main/item/lisp/ox.el
       | 
       | and
       | 
       | https://git.sr.ht/~bzg/org-mode/tree/main/item/lisp/ox-publi...
        
       | akkartik wrote:
       | This works if your code snippets generate relatively static
       | output. Lately I often need to create animations, often
       | interactive ones. See https://akkartik.name/debugUIs.html, for
       | example.
       | 
       | In my life I've often switched to more manual tools when I notice
       | that the more automated tool causes me to live within certain
       | limitations. Sometimes it has taken me a decade to notice these
       | limitations. Automation matters when I do something tens of times
       | a day. But I publish a blog post once in tens of days. It feels
       | worth some additional work to get a little more control and break
       | out of ruts.
        
       | m-hodges wrote:
       | > Any lightweight markup format (like Markdown or
       | ReStructuredText or whatever) allows for embedding code blocks,
       | but Org, through Babel, can run that code on export, and then
       | display the output in the published document, even when the
       | output is a table or an image.
       | 
       | This is what I love about blogging with Quarto.
        
       | dzonga wrote:
       | do people also realize you can blog with .txt files ?
       | 
       | write a txt file, scp then let whatever server serve the files.
        
         | interroboink wrote:
         | Basically the .plan file revived (: [1]
         | 
         | John Carmack was well-known for keeping his development notes
         | and other thoughts in a .plan file[2][3]
         | 
         | Aside: it saddens me a little how the simple idea of copying
         | files onto a server is so many steps removed from modern "web
         | framework" behemoths. I think some people genuinely don't know
         | about the simpler older ways, and the pros and cons between
         | them.
         | 
         | [1] https://unix.stackexchange.com/questions/122782/what-is-
         | plan...
         | 
         | [2] https://garbagecollected.org/2017/10/24/the-carmack-plan/
         | 
         | [3] https://github.com/oliverbenns/john-carmack-plan
        
       | facundo_olano wrote:
       | I wrote my own org-mode static generator:
       | https://github.com/facundoolano/jorge
       | 
       | More robust than my previous emacs setup and much lighter than
       | hugo. No fancy babel generation but I don't really need that.
        
       ___________________________________________________________________
       (page generated 2025-10-02 23:00 UTC)