logoalt Hacker News

How I Blog with Obsidian, Hugo, GitHub, and Cloudflare – Zero Cost, Fully Owned

142 pointsby ingavtoday at 1:00 PM143 commentsview on HN

Comments

zoezoezoezoetoday at 1:55 PM

I really dont agree with "fully owned", you arent running on anything you actually own ie self-hosting. It's all on the cloud, which dont get me wrong, is pretty cool and helpful, but hardly yours.

show 3 replies
bad_usernametoday at 4:33 PM

> 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.

show 1 reply
hk1337today at 3:29 PM

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
righthandtoday at 1:41 PM

Not “fully-owned” though if you need external services to do the heavy lifting. I think they mean deployed onto a personal vps.

show 3 replies
Zambytetoday at 1:19 PM

What do you mean "fully owned"? There is no mention of that in the post

Edit: I guess you mean the content itself is still on your machine if the services go away, and you can choose to host them elsewhere

show 3 replies
ksvarmatoday at 4:33 PM

This is really good to help overcome many fears of blogging!! Once you know your obsidian is linked, all your notes and writing would take next level of drafting to actually becoming a post. Thank you ingav!

Ps: Folks should chill out about wording here and there.

show 1 reply
Brajeshwartoday at 1:51 PM

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.

pembrooktoday at 1:44 PM

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.

show 4 replies
ValtteriLtoday at 1:36 PM

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.

show 2 replies
fareeshtoday at 2:55 PM

I have a similar setup - my post goes into some more details on getting a few things working like embedded tweets etc

https://fareesh.com/post/config-to-content/

bryanhogantoday at 2:22 PM

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

show 1 reply
crooked-vtoday at 4:01 PM

I feel like Obsidian Publish must be really doing something wrong, when this sort of thing keeps catching interest when it's a lot more effort than just paying $8/mo.

show 1 reply
treeblahtoday at 3:51 PM

I had a near identical approach for my blog but I recently moved to a headless CMS. The bugbear being that it wasn't easy to publish if I wasn't at my desktop. With a headless CMS, I auth through Github via my phone, which also serves as the draft/publish step since posts in the CMS manifest as pull requests. It's been working great so far, with the caveat that the writing experience isn't as nice as Obsidian.

FWIW the CMS is Decap CMS and I have it configured likewise with Cloudflare Pages (since Pages supports functions that are needed for the auth/callback cycle).

netsharctoday at 3:50 PM

I've been wondering how to get off the Zuckerverse (I still post on Instagram) and wondered if I can streamline uploading pictures to my own website. I imagine a Telegram bot that receives an image + caption, with backend code that creates such a blog post and does a git push is one way of doing it.

It seems this post talks about blogging from the desktop. But I just installed Obsidian on Android, it allows a filesystem vault. I think pairing it with Syncthing and some automation on my NAS (to do a git push to Github/Gitlab) could make it very streamlined.

show 1 reply
caboteriatoday at 1:30 PM

I'm curious about the pros and cons of Cloudflare pages versus GitHub pages. Given that you're using GH as a repo, would it be simpler to also use it to serve pages?

show 3 replies
vunderbatoday at 1:34 PM

I have a very similar setup, but I went a step further by writing a custom Obsidian plugin that handles compressing assets / transforming frontmatter / pushing the bundle up to my Github blog repo.

Github has an automated action that then uses Pelican (a python based static site generator) to convert to HTML and deploys it to my VPS where it is served by Caddy.

Makes it very easy to have a WYSIWYG interface, the blog pages look basically identical to Obsidian.

https://mordenstar.com/blog/obsidian-to-pelican-exporter

Pelican static site generator:

https://github.com/getpelican/pelican

show 1 reply
exiguustoday at 4:38 PM

Is there a reason to use Cloudflare instead of github pages for static site hosting?

leonheldtoday at 1:43 PM

I profoundly do not understand why one needs Hugo or Jekyll or whatever other generator. Why not write HTML in the first place? It's so absurdly easy and it makes you not depend on external infrastructure at all.

I tried some generators but it was so much more complicated than writing a style sheet and some pages. Maybe for some more complex use-case, okay, I get it, but the author's blog is so minimal and simple.

edit: today I learned people have very strong opinions about static site generators. Good valid reasons, y'all. Maybe my use case really is too simplistic!

show 11 replies
pwillia7today at 3:58 PM

Big fan of DecapCMS if you get tired of only writing from VScode or w/e.

https://decapcms.org/

Shameless plug for my AI blog run on Hugo -- https://reticulated.net/

Cierictoday at 2:53 PM

I actually set up something close to this myself, but purely selfhosted. I never really wrote any posts though because I wanted to figure out a system for interactivity like some other blogs have done. The one that always sticks out in my mind is the "Let's remove Quaternions from every 3D Engine" post [1], I never really cared for the video aspect of it, but all the little examples to try and give a better 3d perspective of what's going on is the thing I've always wanted a good system for.

[1] https://marctenbosch.com/quaternions/

mbiltoday at 1:51 PM

Nice setup. I use Jekyll but recently moved to a flow where I author posts as rich text emails and a process on the receiving end persists them as markdown and compresses images. It could be improved but so far has been working well.

https://matthewbilyeu.com/blog/2025-04-06/blogging-via-email

Ezhiktoday at 1:44 PM

Obsidian is honestly such a joy to write in - I use it for my blog as well:

https://ezhik.jp/

On my end I ended up building an entire custom thing that bastardizes SvelteKit to produce a static website that I then upload to GitHub Pages, but I think over-engineering a personal website is always good fun - and hey, I can tweak lots of silly aspects like how my post names get turned into /nice-and-readable-urls.

Out of curiosity, what's the advantage of using Cloudflare Pages over GitHub Pages? Both seem to require a GitHub repository.

show 1 reply
DLiontoday at 1:42 PM

I have been using this way of blogging for years now and it works perfectly.

I didn't know about Cloudflare pages, thanks for sharing!

I use Jekyll, Github pages and Cloudflare. I use hackmd for editing but Obsidian will work as well.

tjofftoday at 2:16 PM

Zero cost is an antifeature.

It is just centralizing the web. You can do a lot with a $4 droplet if a single board computer isn't your cup of tea. Not "buying" into icloud/cloudfare is alone worth that cost. Also much more meaningful stack to learn.

Nothing against the post/author, I just feel the creativity to "exploit" features of the giants that is put in place just to undermine alternatives is misplaced.

D13Fdtoday at 3:32 PM

Honestly this sounds a bit cumbersome. I built my blog years ago using Puput (https://github.com/APSL/puput) and Render, and it has been running strong with minimal maintenance since then, with hundreds of posts. The software is all open source and free other than the minimal hosting fees.

If I want to do a post, I log in, draft the post in a simple rich-text editor with image support and keyboard shortcuts for formatting, and click "publish." I don't have to fool with anything, there is no chance of sync breaking, and it's instantly responsive.

The back-end is stored in Github, but the posts are stored, with revision history, in a Postgres database that I have full access to.

It's hard to envision a scenario where I'd prefer digging through a git repository to see a previous version of a post rather than just clicking into the CMS site and clicking on the historical version of the post that I'd like to look at, where it is instantly displayed including images. And even with daily blogging, the number of times I've actually looked at a prior version of a post is very low -- probably less than once a year.

show 1 reply
danieldktoday at 2:15 PM

Shout out to Quartz, which produces a site similar to Obsidian Publish: https://quartz.jzhao.xyz/

(I would use Obsidian Publish, but it rendered far too slowly on some pages. I do use their excellent sync service though.)

blakesterztoday at 1:32 PM

Very cool. I first setup my blog way back in the 90s and wrote the HTML by hand and used FTP to get it on the server. Then moved to phpslash and slashcode, Drupal and then Wordpress. Probably something else in there too. This setup feels much closer to how I was doing it in the 90s in some ways. It kind of feels like we've come full circle!

show 1 reply
heltaletoday at 1:35 PM

I have largely the same setup but use neovim instead of obsidian.

A friendly tip: you don’t have to populate the metadata yourself and can use ‘hugo new <dir>/<post_name>.md’ to create the file with the metadata.

show 1 reply
ahmedfromtunistoday at 1:34 PM

For me it's (neo)vim, 11ty and netlify. I've be using netlify for years before CF launched their worker/pages offering.

I however use CF workers a lot to deploy single-purpose webapps for my personal use.

flanbiscuittoday at 2:50 PM

I have a sort of similar setup but I haven't started using Obsidian yet, it's on my todo list. I use Eleventy instead of Hugo, with its simple Eleventy-Base-Blog starter template. I use Github action to publish to Github pages instead of using Cloudflare. It's a nascent site/blog, haven't written much, no images yet, so I don't see the need for something more than Github pages right now.

One thing I don't see the author mention that is part of what I plan to do with Obsidian is use Syncthing (which I already use for other things) so I can work on a post when I'm not at my laptop. Probably just to write down ideas/notes and then fully work it out when I get to my laptop.

If the blog author is here, curious if they commit drafts to their repo or not. I personally don't commit drafts. Besides also using 'draft: true` in the front-matter, I gitignore any markdown file where the filename starts with the word "draft". When I'm ready to publish I rename the file.

https://www.11ty.dev/

https://github.com/11ty/eleventy-base-blog

show 1 reply
chyuelitoday at 1:49 PM

Local priority means that the written content can be automatically saved even when there is no network?

undebuggabletoday at 1:44 PM

My blog workflow and deployment are so simple they don't even deserve a blog post;)

bix6today at 2:24 PM

Awesome! I setup something similar recently for my website and love it. I go Cursor with Hugo to GitHub to Cloudflare. I saw many Wrangler mentions so want to look at that at some point?

It’s funny because we could ostensibly switch to any git hoster but it’s really only GitHub and gitlab huh? And Cloudflare is hard to beat.

ksectoday at 2:05 PM

This is completely off topic.

What hit me ( hard ) wasn't the blogging set up, it was this:

>And if anything’s unclear, LLMs like ChatGPT or Claude are great for filling in the gaps.

For people like me who grown up before Internet was a thing. If we dont understand anything we either have to go to the library to look it up go to find someone for help. Then it was encarta. When Internet arrived I could do look up faster, or more importantly if I am stuck anywhere I could ask on IRC or forums for help.

I am sensing a large part of learning on forums and online will be gone. Read the manual becomes ask the LLMs?

And I am sensing ( no offence ) the generation growing up with LLMs may be far worst. We already have a generation of people who think Googling the answer is 99% of the work when in fact the answer is not important. It is the process of getting to that answer that is largely missing from today's education.

Sorry about the off topic message. But that sentence really hit me differently.

show 1 reply
salt-throwertoday at 2:35 PM

Dropbox and Google Drive work for Obsidian on the desktop version, but the iOS version does not seem to support them.

HenryBemistoday at 2:38 PM

The Hugo/GitHub combo has been around/mentioned for some years.. I thought of running a blog once (but then.. no) and this was the choice I would have made. But on the other hand, if you are going to post something online, just go to blogspot and call it a day. Because that's what you did there. A blogspot (but on MS instead of Google) with many-many-many extra steps.

show 1 reply
focusgroup0today at 2:00 PM

not your atoms, not your bits

sneaktoday at 1:53 PM

I’m tired of the git workflow. I yearn for a CMS for my Jekyll.

superkuhtoday at 3:21 PM

How I Blog with HTML and nginx - Zero Cost, Fully Owned: Step 1. install nginx from repos on my home desktop computer. Step two: write html files and put them in directories under the web root. Step 3. forward port 80 to the webserver internal IP on my router config. Step 4. Link people to http://your.ip.here.a/somepage.html or maybe rent a .com domain.

I've been doing it for 20+ years (xitami and thttpd before nginx) and it not only has an infinite lifetime (because it's .html and files) but it also has no attack surfaces or mantainence required.

All that static site generator and remote corporate services stuff will break within a year if left untouched. And re: security, running a static nginx server from home is about 10,000x less of a security risk than opening a random page in $browser with JS enabled. nginx RCEs are less than once a decade. And DoS re: home IP? A vastly over-stated risk for most human people. In my 20+ years I've never had a problem, and even if I ever do, who cares? It's not like my personal website needs nine 9s of uptime. It can be down for days, weeks, with no issue. It's just for fun.

show 1 reply
voidUpdatetoday at 1:28 PM

Is the domain name free too?

show 2 replies
Dathuiltoday at 1:51 PM

My own setup is similar but replace cloudflare with netlify and vscode with obsidian. However I do find writing markdown as someone with dyslexia to be a huge issue when it comes to spelling and grammer.

How is Obsidian for correcting this? Years ago I would have used something like grammarly to solve it but I'd rather something build it in if possible and make it as brainless as possible

show 1 reply
begueradjtoday at 1:54 PM

Obsidian, Hugo, Github, Cloudflare ... none of those are owned by you.

show 3 replies
philipwhiuktoday at 1:48 PM

> max-width: 55rem;

Why???

show 1 reply
xysttoday at 1:53 PM

“Zero cost” until cloudflare management decide to kill the free program.

show 1 reply
indiansdontwipetoday at 4:28 PM

"How i dorkblog with Obsidian, Hugo, GitHub, and Cloudflare – Zero fucks had during the past decade, fully p0wned"

mangeshmtoday at 2:28 PM

[dead]