Skip to content(if available)orjump to list(if available)

How I blog with Obsidian, Hugo, GitHub, and Cloudflare

ipsento606

    > This stack gives me full control: no subscriptions, no vendor lock-in,
    > and no risk of platforms disappearing or changing policies.
I'm not trying to dunk on the author, but this sentiment encapsulates a tremendous paradigm shift in the meaning of "full control", compared to say:

* Writing in obsidian

* Syncing files via git

* Publishing via nginx hosted on the cheapest possible vps (with https via let's encrypt)

Running a static blog is one of the easiest scenarios to self-host, because even if you get slashdotted, nginx should be able to handle all the requests even if you're host it on a potato

It's not free, but you can get a VPS for $20-$30 a year.

This isn't the best fit for everyone, but it seems weird to talk about "full control" and "no risk of platforms disappearing" when you're relying on the free tier of two external companies

lolinder

The point is that because of the way they structured their blog it would be trivial to do exactly this if they ever needed to. There's no complicated export from a locked in application, you just move your blog files from one host to another (maybe to your own VPS).

The overhead of switching from Cloudflare to a VPS if they needed to is really not that much larger than switching from one VPS to another, so they likely figured it wasn't worth paying $30/yr to own the whole stack, as long as they architected it such that they could own the whole stack if they needed to.

Vingdoloras

Cool setup, but the choice of Obsidian is kind of weird in this context (in an interesting way, see next paragraph). Instead of opening a subfolder of the Hugo project in Obsidian, one could just open the entire thing in VSCode or a similar IDE, enjoy a good markdown editing experience, AND use git integration and the integrated terminal (and possibly set up automated tasks) to run your local testing and deployment workflows.

Note that Obsidian's markdown editing experience is _different_ from (but not necessarily better or worse than) what you'd get in a typical IDE. So while the choice seems weird to me, it absolutely makes sense if the author prefers the feature set that Obsidian offers. Being supported by so many different editors is one of markdown's strengths, after all, and this kind of editor-portability fits right in with the other parts of "Fully Owned" from the blog post.

pembrook

Great stuff, looking forward to your next blog post in 1 year: “How I rebuilt my blog on…”

A fun hobby of mine is Googling “how I built this blog with [next.js/Gatsby/etc etc]” and going to page 10 of the Google results.

It’s just hundreds of developer blogs with no blog posts other than the ones announcing how the blog was built.

freetonik

I’ve noticed this a lot, too, and made this drawing as a joke: https://rakhim.org/honestly-undefined/19/

ceautery

I'm in the "old-ass blogger.com site" category, with posts going back to '05.

martylamb

Literally just posted my newly hogoized site that dates back to 2003 THIS MORNING. :)

nickjj

I started with and used Jekyll for almost ~10 years and ~500 posts before switching to Hugo.

I have a 7,000 word blog post on how and why I switched which I didn't publish yet because I wanted to wait 6+ months with Hugo to make sure I ironed out all of the kinks. I guess I'm the anti-case for this one! Maybe I should post this one next week. It's been quite stable.

devsda

Haha. I guess discovering & teaching how to do X is more rewarding than doing X. It applies to blogging, PKM and productivity too.

Is there a name for this phenomenon where this actually turns out to be true? Closest I can think of is "During a gold rush, sell shovels".

ChadMoran

This reminds me of people who will make an entire YouTube series on crafting the perfect Notion architecture. Only to not actually use it.

mmsimanga

I am in a worse group. Changed my blogging platform, wrote the obligatory post detailing why I changed platform and couldn't even get that obligatory post out. I hang my head

sorokod

or filler posts like this one in the same blog:

https://ingau.me/notes/asymmetric-encryption/

barrenko

It's our Hello World of sorts.

netsharc

I remember someone presenting a development framework and saying something similar to this, "Of course, I used it to build a blogging platform..."

ingav

Haha, been there. But this setup’s actually working really well for me. It’s not chasing the "hot new thing," it’s going back to stuff that’s proven and solid.

jasonthorsness

Is there a support group for this? I have not rebuilt my blog since Feb 21 2024 though I have been sorely tempted :P

fabianholzer

There probably should be one, maybe taking turns with the biweekly Authors of custom static site Generators Anonymous meeting

jagged-chisel

> … and no risk of platforms disappearing or changing policies.

Those risks still exist. GitHub and Cloudflare can do these things at any moment.

connicpu

I think the point was more about mitigating the risk of being locked in to a platform with bespoke authoring tools. GitHub and Cloudflare are very convenient with their generous free services, but if you had to a hugo blog could still be hosted on any web server in the world.

trollbridge

Back in the day, I just blogged by appending a text file, and then later an HTML file.

tmaly

I had thought to do this same things. I am glad someone figured it out.

The one thing I do differently with Obsidian is that I use a private git repo rather than having it live in iCloud. I sync it across an iphone, ipad, and windows desktop.

hk1337

I've started recently working on setting up the "special" public profile repository in GitHub to be my blog central and wanted to keep the files to a minimum. So, I really like using themes as modules in Hugo, then your blog repository will be just your content directory, go.mod, go.sum, hugo.toml, and any layouts you want to override or add.

    .
    ├── .devcontainer
    │   └── devcontainer.json
    ├── content
    │   └── posts
    │       ├── 1718983133-post-1.md
    │       ├── 1720321560-post-2.md
    │       └── 1740070985-post-3.md
    ├── go.mod
    ├── go.sum
    ├── hugo.toml
    └── README.md
3 directories, 8 files

ashishb

> So, I really like using themes as modules in Hugo, then your blog repository will be just your content directory

`themes` are small in size, why not copy them into your repository to keep the build hermetic?

Brajeshwar

Strikingly similar to mine, except Jekyll instead of Hugo. I don't even build it locally these days. So, Obsidian > Github > Cloudflare.

Jekyll is slow for large content (my blog is huge), Hugo is fast. But I want to stay as mobile and lean as possible. I've tried and with a few changes in the template, I can move from Jekyll to Hugo in a weekend. I've also tried to stay as decoupled as possible from any templating engine (Jekyll), and hence rely mostly on pure HTML + CSS, while Jekyll is used more as the task runner. All the posts are separated by "YYYY" as folders and none of the posts have frontmatter.

I can also move between Github Pages, CloudFlare Pages, Netlify, or Vercel within hours if not minutes by just pointing the DNS to the ones that I want. I did this when Github Pages went down quite a few times about 3 years ago.

I almost went Markdown > Pandoc + Make but not worth it right now.

ValtteriL

VSCode has been good enough for markdown blogging for me. Hugo compiles pages on save so its quick to iterate. The markdown preview plugin brings same experience to misc markdown editing.

No new editors to learn and one gets instant access to copilot etc.

_verandaguy

Why would you need copilot for blogging? Isn't the whole appeal of a blog that it's something you, a human created?

wolfgang42

Personally, I’m a lot better at recognizing good writing than producing it, and LLMs are great at being a “calculator for words.”[1] Writing posts became a lot easier once I got an automated editor I could tell to “break up this run-on sentence to make it less confusing” or “rearrange these paragraphs so I introduce concepts before I start using them”. The end result is still the same, but this way I save a lot of time I used to spend glaring at Roget, Strunk, and White.

[1] https://simonwillison.net/2023/Apr/2/calculator-for-words/#c...

x187463

Copilot is helpful for handing formatting and repetitive structural stuff. It doesn't need to actually create the content to be useful.

ingav

I just like keeping all my writing in one place, separate from coding. Obsidian gives me that focused space, and I’ve set it up with a nice font and minimal theme that fits how I like to write.

tiffanyh

Or just use Obsidian Publish (and eliminate Huge, Github and Cloudflare)

https://obsidian.md/publish

bad_username

> notes sync seamlessly across devices

Droobox and similar services have never been seamless for me with Obsidian. There will inevitably be some conflict when the same file gets edited on two machines, and an ugly conflict file will appear, with no easy way to resolve it without a specialized diff tool. Sometimes this conflict file will get unnoticed and a change will fall theough the cracks. Not a deal breaker - but not "seamless" either.

dtkav

You might be interested in our real-time collaboration plugin for Obsidian called Relay [0].

Relay attaches a CRDT to the Obsidian editor. It makes collaboration really smooth and removes conflicts.

Markdown collaboration is free, but we do charge for attachment/media storage. If you dm me (@dtkav) on our discord [1] or email me (in my profile) I'm happy to give out free storage to HN folks.

One other benefit of using Relay is that you can use the new "App Storage" feature on Android to keep your files isolated and private on your device [2]. Using dropbox/gdrive forces you to store your notes in your documents folder and that means that they can be read by other apps.

[0] https://relay.md

[1] https://discord.system3.md

[2] https://obsidian.md/changelog/2025-04-22-mobile-v1.8.10/

dathinab

that should only happen if either

- you haven't setup auto save/auto sync

- multiple people editing the documents

- you frequently have no Internet and the application closed when you re-gain Internet or similar

if only a single person edits the same document at a time and you always sync changes when they happen that should be a non issue

bad_username

You guessed one of the reasons correctly - I work offline (deliberately or accidentally) fairly regularly.

bryanhogan

Very nice post!

I do almost the same, but instead I use Astro.

I use Obsidian, with a GitHub submodule for the content, and host it all as a static page. I wrote about that here if anyone is interested: https://bryanhogan.com/blog/obsidian-astro-submodule

J_Shelby_J

Same. I even built this for my GF to use. You don’t even need to download vscode as you can run it in a free dev container in browser: https://github.com/easy-astro-blog-creator/easy-astro-blog-c...

The only thing I want is to implement a gui for adding and editing posts.

bryanhogan

What you built is actually so great! Was also thinking of building something that makes blogging for less technical people easy without the downsides of a walled system.

Haven't heard of dev containers like that before, but cool to see that they can be used like that.