HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
kaushalmodi
ox-hugo
Emacs Lisp2017–2023
kaushalmodi / ox-hugo

ox-hugo

A carefully crafted Org exporter back-end for Hugo

2Distinct people
7Mentions
1Explicit recommenders
948GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A carefully crafted Org exporter back-end for Hugo

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

Shameless plug: https://ox-hugo.netlify.com I just announced the ox-hugo package. I love the blogging framework of Hugo, but disliked that I needed to manually take care of the…

kaushalmodi used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year7 dated mentions

Observed mentions: 2017-08-20 23:23:09 UTC to 2023-07-13 16:41:17 UTC.

01232017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC202
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC303
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101

What Hacker News says

7 sources
sure, it's a little personal but i just made the repo public, here you go: - https://github.com/geekodour/diary/blob/main/content-org/wee... - https://github.com/geekodour/diary/blob/main/layouts/partial... Basically it's very badly written elisp code that populates the same org file with metadata like week number etc. and then I have a custom hugo layout for writing out the weeks into posts. All of this is tied together by https://github.com/kaushalmodi/ox-hugo
In Show HN: Day by Day – every day of my life
> a lot of hacks to get exporting to ox-hugo to work Hello! Please feel free to start a discussion on https://github.com/kaushalmodi/ox-hugo/discussions listing the things you need to tweak in ox-hugo to make it work with Org Roam. In the past 3 months or so, I have been adding test Org files received from Org Roam users and they seem to be exporting alright. Tests: https://github.com/kaushalmodi/ox-hugo/tree/main/test/site/c... I'd welcome more tests there :) > and improve performance [your config link] From your config, I see this[1] overriding `org-hugo-link--headline-anchor-maybe`. I am following a general Emacs Lisp convention of naming internal-use functions and variables with `--` in the names. Unfortunately, that advice won't do anything with the latest ox-hugo as I replaced that particular internal function with something else in
Read the rest
past few months as I was improving the anchoring scheme to support an Org Roam user with linking headings based on UUID. At that point I had added this documentation on Anchors[2] in ox-hugo manual. If you set `org-hugo-anchor-functions` to nil, or add a dummy function to it that just returns "", it would do the same thing as you are doing in your advice right now (not tested). *Note that will basically break the ability to refer to other sub headings by UUID, CUSTOM_ID or any other mechanism.* --- I'd welcome contributions to ox-hugo code, documentation so that it can help other Org Roam users too. Even if it doesn't make it into the repo, having a discussion related to ox-hugo + Org Roam issues/tips+tricks in the ox-hugo Discussions forum will be useful to others. Thanks! --- [1]: https://github.com/alexkehayias/emacs.d/blob/3b546048cc60976... [2]: https://ox-hugo.scripter.co/doc/anchors/
In My Org Roam Notes Workflow (2021)
Tooting my own horn, if you love living in Org mode, and are willing to try out Hugo (https://gohugo.io), I have an Org exporter package ox-hugo that exports to Markdown + required front-matter for Hugo. The package is even more magic if you choose to use a single Org file to export to multiple posts/pages. Few examples: 1. ox-hugo documentation site from one file[1], source[2] 2. My blog[3] 3. ox-hugo test site (300+ test pages and counting)[4] [1]: https://ox-hugo.scripter.co/ [2]: https://github.com/kaushalmodi/ox-hugo/raw/master/doc/ox-hug... [3]: https://scripter.co/ [4]: https://ox-hugo.scripter.co/test/
In Literate Devops with Emacs Org-Mode (2014)
> I haven't used Lisp so I'm not sure of how similar they are. As I said, I can see the syntax to be easy to grasp for anyone knowing any coding language. But Lisp fans would be in for a treat. In very simple terms, a list function always had the function symbol or identifier as the first element of a list (everything is a list in Lisp), and any number of arguments have to follow after that. Example of an add function in Lisp: (add 1 2) The same thing in Go templates: {{ add 1 2 }} > Org mode support seems to be interesting. I've always wanted to pick that up as well. Could you share some good resources you might be aware of? If you use Emacs, the best Org reference is the Org Info manual. Do `C-h i` to open info within Emacs and jump to the Org manual. (You probably aren't using Emacs as you mentioned that you are not familiar
Read the rest
with Lisp. So may be this tidbit helps someone else). If not using Emacs, - Check out the section on Markup[1] in the official Org manual in HTML. - My blog source in Org[2] - Source of ox-hugo.scripter.co website (100% of the content) from this one Org file [3] If you don't want to get into too much detail: * Heading level 1 ** Heading level 2, and so on *bold* /italics/ _underline_ +strikethrough+ - list item 1 - list item 2 1. ordered list item 1 2. ordered list item 2 But if you are really getting into Org syntax, here's the mega test file[4] for ox-hugo package that exports to 100's (literally) of Hugo content posts here[5] and gets rendered to HTML by Hugo on https://ox-hugo.scripter.co/test/. The good news is that you don't have to use Emacs for Org mode, if you plan to use Org mode just like Markdown (and may be a little bit more). If you do use or end up using Emacs, then Org mode is like 1000x Markdown (or may be more :) ). > Thank you for bringing this up! I appreciate it :) You are welcome. Hopefully this response wasn't too much of an information overload. [1]: https://orgmode.org/manual/Markup.html [2]: https://gitlab.com/kaushalmodi/kaushalmodi.gitlab.io/raw/mas... [3]: https://raw.githubusercontent.com/kaushalmodi/ox-hugo/master... [4]: https://raw.githubusercontent.com/kaushalmodi/ox-hugo/master... [5]: https://github.com/kaushalmodi/ox-hugo/tree/master/test/site...
In Ask HN: What's a good static site generator to use for a blog in 2018?
If you call this tooling, I have developed an Emacs app that allows blogging in native Org mode, leaving out the interpretation of meta-data to happen automatically (the package does the parsing). It's designed to generate Markdown files + front-matter in TOML or YAML for Hugo (https://gohugo.io). The package is ox-hugo: https://ox-hugo.scripter.co/ In fact, that site is dog-fooding ox-hugo.. I simply commit the Org files, and Org --ox-hugo--> Markdown --hugo--> HTML conversion happens on Netlify, and that site gets updated. Github repo: https://github.com/kaushalmodi/ox-hugo/
In Why we transitioned from Medium back to our own blog
kaushalmodi·Sep 24, 2017Recommendation phrase
Shameless plug: https://ox-hugo.netlify.com I just announced the ox-hugo package. I love the blogging framework of Hugo, but disliked that I needed to manually take care of the post front matter and also noticed the shortcomings of writing in just Markdown. I also missed the tree-based text organization of Org mode. So this package was born. Writing posts in Org mode gives you all the Org markup power (that's already more than Markdown), plus a lot more! like Org Babel, property inheritance, etc. An example: I wrote this post ( https://scripter.co/notes/string-functions-nim-vs-python/ ) that's heavy with code blocks and results of evaluating those code blocks. It would be super-painful in Markdown to paste all the code blocks and also their results. In the Org source: https://gitlab.com/kaushalmodi/kaushalmodi.gitlab.io/raw/mas..., each o
Read the rest
f the #+RESULTS blocks in that Org source are auto generated using the Org Babel feature. I elaborate more on why I use ox-hugo, or why I use Org for blogging in native Emacs environment here: https://ox-hugo.netlify.com/doc/why-ox-hugo/ Even if one is not using Emacs as their editor, as the OP mentions, the Org markup is simple enough that anyone can use their favorite editor to write in Org. To add to that, using a little Makefile, they can run Emacs in batch mode to take advantage of true Org mode features like Org Babel, etc. For instance, one can clone the ox-hugo repo, https://github.com/kaushalmodi/ox-hugo/, and just run "make test" or "make doc" to let ox-hugo do its thing, without having anyone to know what to do after opening Emacs, what command to run, etc. "make doc" will generate all the Markdown content needed for the entire documentation website that I linked in the very beginning of this comment, all from a single Org file.. You cannot do that in Markdown.
In Org-Mode Is One of the Most Reasonable Markup Languages to Use for Text
That, I have edited as shown (except the snippet outputs). That was an example of using Org Babel. Note that the #+RESULT blocks in that file are all auto-generated; none hand-written. That post does not have any #+INCLUDE because all the code snippets are trivial. I would use #+INCLUDE in posts where I have a code file, and I want to talk about only few lines from that. I have different examples of #+INCLUDE in my examples file[1] for my Org to Markdown for Hugo exporter -- ox-hugo[2]. There I use the inbuilt INCLUDE feature where I choose to include only the specified Org sub-tree (using the sub-tree CUSTOM_ID). The above referenced post on Nim/Python is converted to Markdown for Hugo using the same exporter. [1]: https://raw.githubusercontent.com/kaushalmodi/ox-hugo/master... [2]: https://github.com/kaushalmodi/ox-hugo
In Laverna – A Markdown note-taking app focused on privacy

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.