3 ms·
I write my blog (https://lambdaland.org https://lambdaland.org) entirely in Emacs now. It's Hugo, but I use ox-hugo [1] to convert from org-mode to markdown and
by ashton314 1y ago
I write my blog (https://lambdaland.org 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/ https://ox-hugo.scripter.co/
- Lownin 1y agoIt looks like Hugo also has native .org file support. Does ox-hugo provide functionality over Hugo’s native org file parsing?
- lordgrenville 1y agoDidn'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.
- ashton314 1y agoThis is a nice feature of ox-hugo. I still use individual files and it's great.
- BeetleB 1y agoIt didn't back when ox-hugo was written.
- globular-toast 1y agoI 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.
- ashton314 1y ago^ This. Hugo's support for Markdown is much better than it's support for org-mode. ox-hugo bridges the gap super well.
- ashton314 1y agoI used Hugo's native `.org` file support for a while. It was… fine. There are some serious issues (for me) that I had with it though. The most salient one is that it didn't convert straight quotes in the source ("") to proper curly-quotes. (“”) I don't remember what else but I'm sure there was more than just that. I've spent a lot of time on the typography of my site and I wanted everything to be as perfect as I could make it.
- dima55 1y agoDoes org-babel work? Do equations work?
- ashton314 1y agoEquations: very yes. You have to create some custom short codes. Example of it in action here: https://lambdaland.org/posts/2024-08-06_zkp/ https://lambdaland.org/posts/2024-08-06_zkp/ Here's the source for that entire post: https://gist.github.com/ashton314/e63c9ed31c38c421f11d84df1f01498d https://gist.github.com/ashton314/e63c9ed31c38c421f11d84df1f... The shortcodes are a little messy, I will admit, but I have a temp.el snippet that expands to the right thing so authoring isn't too bad. org-babel: I'm not sure. Here's the docs for code block handling in ox-hugo: https://ox-hugo.scripter.co/doc/source-blocks/ https://ox-hugo.scripter.co/doc/source-blocks/
- cyrialize 1y agoI've also thought about using ox-hugo! I have (literally) organized my life in plain text, so I keep everything in org files.
- ashton314 1y agoYou would certainly enjoy using it then. :) It's got great documentation. (As is to be expected with basically any Emacs project.)
- adityaathalye 1y agoI really tried hugo, but I gave up because of hugo's many annoyances --- breaking changes in versions a mere few months apart (why????), yet another arbitrary templating system, poor support for org-mode out of the box, lots of impedance mismatch with ox-hugo (a valiant effort), runs a local server for local development, injects javascript for live refresh, etc... Don't get me wrong, it is a really nice project which I do recommend to people who don't want to go down the path of writing their own custom site maker... The single-binary formula allows hugo to offer a much better set of trade-offs than the competition. But... if you can write your own, write your own. It is a glorious yak shave. My only tip will be to avoid all dependencies like the plague. For stability and sanity. The upshot... After over two years of using my dinky-ass handmade pandoc-usin' (not even parallelised) static site maker, I feel hugo is not even as fast as what I have.
- dev_hugepages 1y agoHow do you implement live refresh without JavaScript?
- adityaathalye 1y agoinotifywait -> pandoc compile -> xdotool -> browser action :) I get the computer to hit F5 on the browser (and/or type URLs into the url box and hit enter). Here is how it works (and it works great!): https://github.com/adityaathalye/shite?tab=readme-ov-file#hot-reloaded-shite-editing https://github.com/adityaathalye/shite?tab=readme-ov-file#ho...
- ashton314 1y ago> breaking changes Yeah, that's bitten me and it's super stupid. At this point, I've just pinned hugo so I don't update it any more. It's a friggin' static site with basically no Javascript (just a little for the site search feature—handled by the theme) so I don't feel any need to keep Hugo up-to-date.