Ask HN: Looking for lightweight personal blogging platform
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 ] threadhttps://github.com/adityatelange/hugo-PaperMod
If not for Emacs, I'd probably glue together a few tools like Pandoc, sedm scp and the like.
I use Hugo with a theme called Congo. https://gohugo.io/ https://github.com/jpanther/congo
write it in markdown and host it anywhere, no fancy shenanigans
For a technical person, it does the job pretty well and almost without any maintenance effort:
- Github: https://github.com/TCGV/Blog
- Live: https://thomasvilhena.com/
[1] https://github.com/jekyll/jekyll
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/
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 !
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.
* 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).
This puts the focus on writing content vs. spending unlimited time in the setup.
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!
[1] https://hexo.io
[2] https://mattklein123.dev/2020/03/08/2020-03-07-new-website/
Type markdown, build in docker, publish assets to GitHub Pages :tada:
- 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
URL: https://github.com/stephenou/fruitionsite
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.
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.
- 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'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.
If you want to go as minimal as possible, my https://github.com/Siilikuin/minimum-viable-hugo gets you set up with a single no-CSS, no-JS HTML page. I found this pretty ideal for staying to learn the platform.
If you really, really like minimalism, you could also try pandoc-server to dynamically serve HTML files from your Markdown as people visit the page, just like PHP does: https://pandoc.org/pandoc-server.html
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
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