Ask HN: How to build a light weight personal blog?
I've been running my personal blog for a while using WordPress, but I find it too buggy and loads slow.
I was thinking of redesigning and redeveloping my blog into a light static website. What are some alternatives to Wordpress that are fast and small? I don't really need a CMS as I write all my blog posts in markdown. I'm currently thinking of using Hugo or use some framework like Skeleton. Any other suggestions?
My current site: https://rishikeshs.com/
117 comments
[ 3.5 ms ] story [ 220 ms ] threadIt uses nunjucks templating but the starter is enough to just build a blog and add your own css.
Works with most hosts as it has a build script you can run and serve the output folder.
https://www.11ty.dev/
Edit: typo (css, not cms)
http://dusted.dk/pages/phlog/2021-12-14.txt and http://dusted.dk/pages/phlog/2021-12-14.txt?raw
to inline an image, i just refer to the name, so lol.png becomes an <img src="lol.png"> in the html.
My main compromise is that if it makes the plaintext less pretty, it can't go in, no tags.
My inline code blocks is made by matching for a language or file name ending with: and if the next line is indented, it is considered code.
Look at http://dusted.dk/pages/phlog/2019-12-20.txt and the raw text http://dusted.dk/pages/phlog/2019-12-20.txt?raw
Any static blog framework is probably adequate, though.
[0]https://neurobin.org/docs/web/using-git-to-manage-a-website
- https://github.com/alaq/adrien.sh for NextJS
- https://github.com/sw-yx/swyxkit or Svelte
- https://github.com/SimeonGriggs/simeonGriggs for Remix
All have designs I like. I am only familiar with NextJS and find it a pleasure to work with.
Static sites are cheap and easy to host. :)
You could substitute Jekyll for other supported frameworks.
Pros:
* Markdown (so super flexible)
* Git as the backbone (free CRM, free history)
* Customisable (if you know how to code)
* Free templates
Cons:
* Jekyll is a bit of a pain on Windows but should be fine on Linux/Mac
* Images might not load super quick from GitHub's servers
* You need to know basic Git
Microsoft famously tried to outcompete the Internet via their existing monopoly on Windows with MSN (not just the messenger) back in the day, and have always been super hostile to free-software. They have also, like any corporation, stopped to maintain several services over the years and the fact that beyond their public image they don't have any incentive to keep Github Pages going doesn't inspire me confidence.
The fact that Github Pages were up and running before Microsoft's acquisition of Github is a reason to be worried. There's no money flowing in from that service and it probably costs a fair amount. Despite their "we love open source" statements, i've yet to see Microsoft open-sourcing any significant product (including Github) and specifying/standardizing existing stuff like Github Actions.
Microsoft is still a strong force for evil in this day and age. I only wish they were disbanded during the antitrust investigations of the 90s instead of putting Apple on life-support: the world of computing would be such a better place without both Apple and Microsoft to shit their monopoly on our faces.
* https://kalafut.net/2021/10/16/blogging-setup.html
It's been a dream of mine to someday do everything via Emacs' Org Mode, but I haven't yet felt motivated enough to take the plunge.
Simple. Easy. Free.
You can even set up a form and get comments into your email. (Then just manually copy/paste into the markdown and commit it again and force a rebuild).
I use that setup and I love it.
I would find this tedious for any number of comments. Is there a better way?
But I haven’t found a good, lightweight, privacy focussed way to solve this yet.
Or use a hosted service like Disqus or an alternative if you want comments, but the better solution is not to bother.
If you need better vetting, consider using webmention/ActivityPub federation and allowlisting individual hosts for automatic approval. There is definitely spam on such protocols too, but they tend to come from the same domain/IP so denylisting is very efficient in dealing with it.
Seems like there are a lot of folks interested in blogging support, considering that nobody reads blogs anymore.
https://docs.netlify.com/forms/submissions/#form-triggered-f...
There might be other stuff like that as well. I just use org directly, though I guess in a "blog-like" manner rather than as a true blog.
[0] - https://ox-hugo.scripter.co/
Easy and free to get going on GitHub Pages.
- https://blog.michielborkent.nl/migrating-octopress-to-babash...
- https://blog.michielborkent.nl/better-clojure-highlighting.h...
- https://blog.michielborkent.nl/markdown-clj-babashka-compati...
Love the musical word play. Nicely done :)
You might want to evaluate if posting from multiple devices is important to you, and if you're willing to setup some process to do it with a static website. I'm not saying that it can be done, I'm just highlighting that it is not something you can automatically take for granted.
An option that you might want to consider is GravCMS[1] which is PHP based. It has an interactive app for admin and posting, but once you post it generates static files. So from the point of view of the server and your readers, your website is static. You can still post from anywhere though.
I'm sure there are other similar solutions, and that someone has a SaaS to solve this which they think it will be the next unicorn. Anyway, just another thing for you to consider.
[1]: https://getgrav.org/
Regarding posting only from your computer, you can just use a git repo that triggers builds on push.
You can see many options for them here https://jamstack.org/generators/
Some apps like Netlify (are there others?) presented solutions but are unfortunately to my knowledge not selfhostable.
Also interesting to question the whole supply chain security. What is Gitlab gets hacked? Surely you could deploy from/to your own infra using Gitlab as a source of truth by verifying PGP signatures (like with guix git-authenticate), but then how to apply the aforementioned ACLs? If you have resources on that topic, i'm all ears.
Could be easier to use either another repository or a 3rd party comment system like Disqus
Regarding GitLab getting hacked, while it is of course a concern I'm not sure it's any more of a concern compared to using any other hosted blog service. You'd have to consider how secure any hosting solution is, whether it's Wordpress, GitLab/AWS, Medium, or anything else. As a benefit, GitLab (unlike many other blog hosting services) supports U2F MFA.
You can git push from anything these days, including an iPad (which is basically what I do).
(edit: why the downvotes?)
Still, you're right that doing git stuff on other devices can be a bit annoying. A web interface might be a lot more convenient if you want to edit your blog WYSIWYG on the fly.
P.S had no intention of becoming the next unicorn :)
If you are looking to get an understanding of deployment models, gitops, hosting solutions, CSS, HTML, and maybe do some writing, choose the static hosting option.
If you are looking to write, choose wordpress, preferably hosted.
There's a plug-in(s) for WP that allows you to have the GUI for convenience, but then generate a static site:
* https://wp2static.com
* https://www.wordpress.org/plugins/simply-static/
* https://www.wpexplorer.com/static-website-wordpress/
Either serve the static area directly, or use some scripting to update where your public web server lives.
I host in Netlify with my own domain name.
Link in profile if interested.
https://pilabor.com/blog/2021/05/building-a-blog-with-hugo/
Benefits:
- Write MarkDown for blog posts
- Integrate custom HTML, JS and CSS snippets
- Site search via JavaScript and JSON index file
- Integrate data files (like auto replace affiliate links, content table building or dynamic image resizing)
- Very fast site generation
- Image Processing features
- HTML, CSS and JS minification
- One single binary that runs nearly everywhere (e.g. on Raspberry PI)
[1] https://gohugo.io/
Reads every kind of plaintext format, but will also just publish a Jupyter notebook which means you can do drag and drop image and graph inlining which makes everything so much simpler (and thus makes me more likely to keep it up).
Also single command GitHub pages publishing.
[1] https://squidfunk.github.io/mkdocs-material/
You can write your content in Markdown, keep everything in a repo, and only push static files to the hosting of your preference.
1. https://getzola.org