Ask HN: Looking for lightweight personal blogging platform

112 points by trashtestcrash ↗ HN
Requirements: - Write software engineering blogs with markdown - Open IDE, write some thoughts, push new version of the blog from my terminal - Be able to host on github for free - Be able to display code with syntax (I guess if it supports markdown it will support that too?) - Maintain structure e.g. post dates, navigation, post tags - Ability to have a page about me

Bonus points - be able to personalise a little bit the look and feel if I wanted to e.g. font

No need for: - comments on blog posts

What are my options?

83 comments

[ 2.9 ms ] story [ 174 ms ] thread
I looked for something similar and ended up coding my own. It was a lot of fun and even did not took too much time. Of course, I had one advantage – being an Emacs user I could leverage Emacs & Org mode. And one nice thing about my one is that the whole blog (content, templates, styles, JS) is contained in one source file. (Of course, binary assets are kept separately, though technically they could be embedded in an org file, too.) And btw, I don't even need to leave Emacs and go to the terminal to push he new version. :-)

If not for Emacs, I'd probably glue together a few tools like Pandoc, sedm scp and the like.

If I were to start again from scratch, I'd likely use Zola as SSG (https://www.getzola.org/)
I was going to suggest Zola too. I use it for my personal blog (hosted via GitHub Pages). Not sure if all of OP's requirements are met, but many do.
every time I've tried to set something up using jekyll and a theme I actually like, I've run into dependency issues, so I'm really liking the look of this
I use https://mataroa.blog/ after it was posted on HN by one of it's creators. Been happy with it for the past 2 years so far
Many of the recommendations in this thread are great. Go with a SSG; almost all of the bigger players will be able to do everything you list and (a lot) more. Personally a big fan of Astro[1] but Hugo, Jekyll, 11ty, etc. will do the job just fine and there's imo no reason to pick one over the other in your case apart from working with a framework in a language you're comfortable with.

If you're looking to get started right away and don't care about having it hosted by someone else there's also bearblog[2] which I can recommend btw.

[1] https://astro.build/ [2] https://bearblog.dev/

Been procrastinating starting a blog for several weeks. I know a bit of code, but I was bothered about using github or the t e r m i n a l to write silly stuff online.

Thanks to your post about bearblog, I now have a blog. A tiny website exactly like I wanted. With really nice themes (that I can customise since I know a bit of code !) all for a fraction of Squarespace asked me. And apparently I have anlaytics also ? Can't wait to use those.

So far, this is the tits. Would be happy with more products looking like this !

How much code do you want to write for it? Do you just want to push to a repo and it happens automatically? What does the structure of your "navigation" "post dates" look like? Browsable?

The most simple thing I could think of would be asciidoc + github pages. Write stuff, generate output HTML, push all to repo, wait for sync. Done.

If you don't need tagging (as http://danluu.com/ doesn't, for example), you can use my "no workflow" solution:

* draft in markdown

* render in HTML (using any Markdown to HTML tool, e.g. pandoc)

* link your CSS in the HTML file.

* push to your preferred serving platform

This has the advantage of getting you started as quick as you can open an editor.

If after 5 posts you are wanting a tool, pick whichever (Hugo).

+1

This puts the focus on writing content vs. spending unlimited time in the setup.

I like this as a starting point, gonna recommend it from now on!

Although the benefit of using a static site generator like Hugo is the ability to short codes to reuse code snippets (like embedding videos or images). But that can wait - getting five posts out first is important!

As per many other comments, it sounds like a static site generator like Hugo (https://gohugo.io/) or Jekyll (https://jekyllrb.com/), hosted on GitHub Pages (https://pages.github.com/) or GitLab Pages (https://about.gitlab.com/stages-devops-lifecycle/pages/), would be a good match. If you set up GitHub Actions or GitLab CI/CD to do the build and deploy (see e.g. https://gohugo.io/hosting-and-deployment/hosting-on-github/), your normal workflow will simply be to edit your markdown and do a git add/commit/push to make your changes live. There are a number of pre-built themes (e.g. https://themes.gohugo.io/) you can use, and these are relatively straightforward to tweak to your requirements. In theory, since the content (markdown) is separate from the presentation (theme), you can change design relatively easily (although in practice there's often theme specific config).
MkDocs with the Material for MkDocs theme has reasonable blogging support, and a dockerized image for building. It also has some other features like footnotes, mermaid diagrams, and "code annotations" for code blocks.

Type markdown, build in docker, publish assets to GitHub Pages :tada:

My blog works like many of those described in others comments, it's:

- Jekyll(any static site generator would do, I'd probably pick Zola or Hugo if I was starting from scratch. See list[0])

- GitHub to host source code

- GitHub actions to push resulting assets to S3(Would try R2 over S3 if starting from scratch I think)

- Cloudflare for TLS, edge caching(including HTML[1] which is nice)

The source for my blog is: https://github.com/k0nserv/hugotunius.se. I also made a starter template[2] at some point, but it's quite out of date now.

0: https://github.com/myles/awesome-static-generators

1: https://hugotunius.se/2020/01/01/edge-cached-static-sites-on...

2: https://github.com/k0nserv/one-cent-blog

Lately I've been using Fruition - which is just a way to attach a custom domain name to your published Notion directory. The script is no longer maintained but it keeps working using some Cloudflare agent scripting mechanisms.

URL: https://github.com/stephenou/fruitionsite

I built my blog to publish via email.

It’s got everything you need except it’s not possible to edit posts. You just have to email yourself a new, updated version and make that version public.

Taught me a lot about serverless, SES, css, and htmx. 10/10 would recommend trying this route if you don’t want to use the standard toolsets.

can you elaborate a bit more how did you achieve this. also source code will be amazing if you have it open sourced of course.
Source code is a bunch of lambda functions to extract content from emails, then present that information in blog posts.

There are quite a few moving parts -

1. Route 53/AWS SES rules to handle Inbound emails

2. S3, Lambdas, and Step Functions to process emails into json objects

3. Cloudfront distro and behaviors to handle content delivery

4. Aws Cognito to handle login

This probably needs an accompanying blog series just to explain how everything works with each other.

If you’re interested, I’ve written a bit about it on https://pretzelbox.cc/blog which dogfoods the above product.

If there’s genuine interest, I’ll be happy to open source it.

Sounds like any static site generator supporting Markdown will do.

- Jekyll: the OG, but requires a ruby toolchain.

- Hugo: compiles to a single static binary, but you may have to get used to its (Go text/html) templating.

- Zola: also compiles to a single static binary, but uses Jinja-like templating.

- Gozer [^1]: my own, like Hugo, but 1000x simpler. I rolled my own because I wanted something that didn't move under me in the next 10 years and just because it was fun and easy enough to build.

[1]: https://github.com/dannyvankooten/gozer

I run Jekyll in its own official docker container. You just need to mount the directory with the md files and it autogenerates new htmls whenever an md is updated. No need for Ruby.

I'm on my phone now and I can't check what I used to run it but all the details are at https://github.com/envygeeks/jekyll-docker/blob/master/READM...

Then HTMLs can be deployed to the public facing server.

I've hosted jekyll sites for a number of years. It's simple and gets the job done. The documentation is good, there are a lot of plugins written for it, and it's pretty configurable.
I've played around with several platforms in the last year or so. I've landed on the following setup that works very well for me and ticks all your boxes:

A SvelteKit[0] app hosted on Cloudflare pages. The repo is hosted on GitHub and hooked up to the Cloudflare Pages app [1]. On PRs, I get preview environments. On merge, the changes get deployed to my "production" website. I write blog posts and other content in markdown, which is then processed by mdsvex[2] with very minimal setup.

Mostly, my requirements were more focused around getting the actual framework, hosting, etc. out of my way so that I could focus on writing. Gatsby and Next.js were too configuration heavy and turned me off once I scratched beyond the surface.

[0] https://kit.svelte.dev/ [1] https://developers.cloudflare.com/pages/configuration/git-in... [2] https://github.com/pngwn/MDsveX

omg.lol (https://home.omg.lol/) has not been mentioned. You get quite a few nice bonuses from it (like community!) for a very reasonable, imo, $20USD a year. At least give it a look my friend!
Build your own setup with Soupault! It has the Unix philosophy of piping output to CLI tools that do one thing well rather than locking you into a specific system. It helps glue together many other tools like a lightweight syntax renderer, modified date adding, aggregating the posts to create feeds, make some markup modifications, etc.

Additional suggestions outside a specific tool:

* Inevitably you will need more than base Markdown supports features, so you’ll either need to buy into a specific Markdown fork (some of which aren’t open) that won’t port to other platforms if you need to migrate, script the hell out Pandoc or some other tool creating your own fork, or you could start with a lightweight syntax like reStructuredText or AsciiDoc that have a more comprehensive base supporting 98% of your needs including proper metadata in the file, image sizes, figures, callouts/admonitions, spans with class names, definition lists, details/summary, footnotes, citing blockquotes; building these ad-hoc will suck to maintain & could output bad semantic markup making it difficult for screen readers, TUI browsers, web crawlers to parse & understand

* Don’t do syntax highlighting on the client side for a static site (e.g. no highlight.js or similar)

* Don’t touch the base user font size for a blog as users should be able to override font size for their accessibility (e.g. no body { font-size: 14px })

* Add an Atom and/or RSS feed

If you only care about web, Markdown has always supported inserting raw HTML. Unfortunately, these lightweight markup languages cannot emulate all of the features of all of the underlying output formats, because different output formats have incompatible features.