HACKER Q&A
📣 rishikeshs

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/


  👤 soapdog Accepted Answer ✓
A key take away from many years of running a blog as a static website is that may add friction to your process. Unless you have some sort of CI/CD going on, the chances are that one can only post from their own computer, while using something like Wordpress allows them to post from anywhere — including their mobile devices — which leads to a ton of serendipity.

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/



👤 dusted
I write my blog in plain text files (because it's primarily intended for gopher), and then wrote a little node+express service that watches those text-files and applies a bit of regex to it to make links be links, and otherwise just formats it as html. Here's how it looks

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


👤 petargyurov
Jekyll + GitHub Pages = Static blog with free hosting

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


👤 frankwiles
I rebuilt my personal site using Hugo a couple years ago and it’s been great. Super easy to write new posts in Markdown, flexible enough I could do anything I might need, but easy enough to build out just the features I need and no pressure to update anything for security reasons.

👤 yogsototh
I use a single Makefile with pandoc.

https://her.esy.fun/posts/0018-makefile-as-static-site-build...

I use org-mode instead of markdown. But this system is agnostic of your source. Low maintenance, and will probably still work in a long time in the future. The most fragile part of it is pandoc, which I think will be retro compatible for a long time.


👤 no-dr-onboard
S3 has a static site hosting function. Throw your files up on a bucket via a git repo and you’re in business. Hosting+static site generation all in one.

https://docs.aws.amazon.com/AmazonS3/latest/userguide/Websit...


👤 krapp
I use Lektor and publish by Git[0], or at least I would if I ever updated my blog.

Any static blog framework is probably adequate, though.

[0]https://neurobin.org/docs/web/using-git-to-manage-a-website


👤 sandreas
I use hugo[1] for pilabor.com, heres my personal tutorial, how to build a blog from the scratch:

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/


👤 beshrkayali
I used multiple static site generators and in 2021 I stumbled upon Zola [1] (written in Rust) and it worked really nicely. One neat little feature I like is that you could have the theme separated or as part of your site. For the theme I made a very simple html template that relies on default browser styling as much as possible. Feel free to check it out [2]

1: https://www.getzola.org/

2: https://log.beshr.com/thelog/


👤 fileeditview
Shameless plug incoming.

A good while ago I created my own "system" Glyph: https://github.com/dbriemann/glyph

It's a static site generator utilizing Github issues and Github pages. If you are interested in how it works see: https://github.com/dbriemann/glyph-zero

As an example you can see a raw blog entry here: https://github.com/dbriemann/blog/issues/7 which results in https://dbriemann.github.io/blog/7-making-a-game-with-go-and... when "compiled".

You basically write your blog posts as github issues and the tool converts them to html which is then published via Github pages.

WARNING: this is not really maintained anymore because I rarely blog. Also it never had an official release .. so it is kinda experimental (but it should work, because it's simple).

EDIT: I submitted this to HN when it was new: https://news.ycombinator.com/item?id=16776047


👤 throwaway81523
Org mode and html export. If you want to be fancier, there is this: http://ahungry.com/blog/2013-04-01-blogging-with-org-mode.ht...

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.


👤 asdf_snar
I just wanted to give an A+ for Hugo's quickstart. This HN post was coincidentally exactly what I had been wondering about. From the wealth of replies, I narrowed down my choices to Jekyll and Hugo. Both require a little bit of work to render LaTeX, but Hugo seemed more tailored to newbies like myself.

I finally got around to trying it and used Hugo's quick-start guide: https://gohugo.io/getting-started/quick-start/. I've never been able to breeze through a quick-start so seamlessly. Everything worked as advertised and with no prior knowledge I was able to see a post on my local machine in < 2 minutes. I'm amazed that the local server command `hugo server -D` works so seamlessly.

I've yet to add LaTeX but the quickstart makes me very optimistic. Thanks again to the creators of Hugo for such a friendly quick-start.


👤 d82nsjk9
The browser is very forgiving at parsing HTML. If you want you can write reaaaally minimal "markdown-like" HTML. Writing a blog post can be as simple as

  $ vim hello.html
  
  

Hello World

Lorem ipsum


👤 pxllh
I really like 11ty for this sort of thing.

It 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)


👤 idinnoaname
I feel like there are two camps of SSG’ers. One camp who chooses an SSG to offset their reliance on big tech, and the other who see big tech reliance as an acceptable means of publishing. Not sure which is right, but my personal inclination is to steer away from this reliance.

👤 southerntofu
I've written my own theme for getzola.org SSG based on water.css. It doesn't have all the widgets you can think of (though it could be extended easily), but it's got fair documentation [0] and is flexible enough to provide for my personal blog (staticadventures.netlib.re) and two collective sites (fr.tild3.org, joinjabber.org).

I'm not exactly recommending to use it as i make no guarantees (yet) about keeping a proper changelog and maintaining backwards-compatibility, but if someone's feeling hacky i would certainly love for other people to try it and expand it or just give feedback.

[0] https://tildegit.org/southerntofu/zola-water


👤 300
I use Hugo. Lots of free themes here: https://themes.gohugo.io/

You can write your content in Markdown, keep everything in a repo, and only push static files to the hosting of your preference.


👤 jlelse
I can recommend my own blogging software GoBlog.

Website: https://goblog.app/

Docs (WIP): https://docs.goblog.app/


👤 yellowapple
I personally use Jekyll for all my static website needs (including my homepage); probably better options out there (certainly newer ones), but I like that it's a first-class citizen for GitHub Pages (not relevant for my own homepage, which runs off a VPS in Iceland, but certainly relevant for the couple of FOSS projects of mine that have their own websites) and if it ain't broke, why fix it? Any similar static site generator should be right up your alley - Hugo included.

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.


👤 taigi100
It depends on how lightweight you want it.

I'm hosting mine as an S3 static website, with CloudFront as a CDN and for the domain name linking. Works pretty well. I also have some sort of CI/CD, what I mean is that all my code is on GitHub and whenever there's new code to main, a GitHub action is fired that syncs the branch with the S3 bucket.

I've even managed to remove all the JavaScript from the site :D Works neatly! Let me know if you (or anyone) wants more info ^_^

Edit: Forgot to mention, it's also almost free! I'm paying for the domain names and around 0.1$ / month to AWS.


👤 pjc50
This is one of those things where it's almost quicker to write a new SSG than to search through the thousands that are already out there. Depends which language(s) you prefer and are most comfortable with.

👤 coffeecheque
This sounds like a job for Hugo, GitHub and Netlify.

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.


👤 phoboslab
A while ago I published pagenode[1] which powers my own blog[2] and some of my other sites. It sits somewhere in between a CMS-"library" and a static site generator, with all content stored in markdown files. It comes in as single .php file.

Note that pagenode is not a ready made blog system, but rather a library to build a blog, portfolio site or anything else that does not have user-generated content.

[1] https://pagenode.org

[2] https://phoboslab.org


👤 peter_retief
I have started using vite, quick example of what I built - this is really just a document site but uses markdown and can be far more complex if needed - it is static though

https://pioneer.mymailbox.site/

Link to vite

https://vitepress.vuejs.org/

The deployment can be as simple as one command, in my case

npm run docs:build && scp -r docs/.vitepress/dist/* dev://var/www/pioneer.mymailbox.site/web


👤 fer
I use Pelican mainly because if I ever need a plug-in to do something very particular, I'd rather use something I'm extremely familiar with (Python).

I host in Netlify with my own domain name.

Link in profile if interested.


👤 nikivi
I am evaluating these options now:

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


👤 kotnik
A while ago I saw Linux kernel people[0] using Writefreely[1] so I tried it and I've been using it ever since.

It's a bit clunky, initial Docker based deployment is not straightforward, but I like it. It's using Markdown, supports ActivityPub out of the box, and has static blog feeling even though it's not.

[0] https://people.kernel.org/

[1] https://writefreely.org/


👤 feffe
I wrote my own a while back.

https://github.com/johan-bolmsjo/blog_of_markdown

It's built using make, small bash scripts and two Go support programs. I think there are tons of similar generators out there as writing one is pretty easy. Probably more sensible to look into using something like Hugo. For me it was easier to write the minimal generator than figuring out how to configure Hugo as I like it.


👤 hrishi
Depends on what functionality you'd like to add as you go. I recently built my site from scratch (with no prior experience) using NextJS, MDX and mdx-bundler [1]. Having the ability to add custom components, or statically generate a related posts matrix are all super useful.

1: https://github.com/kentcdodds/mdx-bundler

https://olickel.com


👤 joshcanhelp
I have found Eleventy lovely to use after being one WordPress for a decade. It can be as simple as you need it to be and grows with you. I’ve been able to accomplish everything I need with it. Currently replying from GitHub to Netlify automatically but could just as easily build locally and rsync or FTP somewhere.

https://www.joshcanhelp.com/taking-wordpress-to-eleventy/


👤 bondant
Write the post in markdown then convert them to HTML with pandoc. Write a bash script which walk into every directory to convert and you have a minimalist blog engine.

👤 dinamic
You can use GitHub pages with Jekyll. Easy to setup and run, there are a lot of custom Jekyll blog themes available online.

Custom domain with private repo costs few dollars per month.


👤 jonwinstanley
Devii is an interesting project I contributed to after looking for a solution to the exact same problem a while back.

The owner of the repo seems like a great person and is open for contributions if you want to get involved.

https://devii.dev/

It's based on Next.js, so React/TypeScript, your blog posts are in Markdown and it generates an RSS feed of your posts. Could be a way to get off the ground quickly?


👤 jonpalmisc
My site [0] uses Jekyll. Jekyll it stable, mature, and easy to work with. It has solutions to common needs, e.g. layouts, components, Markdown.

I’d suggest starting with the barebones option and making a theme yourself if you’re comfortable with CSS; it will yield a lighter site and also be easier to maintain than using some big pre-made Jekyll theme.

[0] https://jonpalmisc.com/


👤 oaf357
I look at it from the deployment solution backwards. I’ve run some pretty intense (for a blog) CI/CD pipelines in the past. But now there are Netlify, Vercel, and others that support a few static site generators. I use Netlify (paying customer) for all my sites now and my SSG of choice is Hugo because it is a single binary that cranks out a full blown static site in less than a second.

👤 sircastor
I have tried to travel tot’s road a number of times, and I am a WordPress user too. I’ve given up and stick with WP. I find it reliable. I have of course added cache plugins and contemplated using a static plugin to output to straight html. I’m curious what kind of bugs you’re running into with Wordpress?

I wish you luck. Lots of pile have had success with Jekyll. I was leaning towards Pelican or Hugo.


👤 drakonka
I've gone through quite a few frameworks since I started blogging and have settled on Hugo, which I've been running for several years. I have the source in a private GitLab repo with a CI setup to autodeploy to an S3 bucket. Hugo isn't some super special framework with a ton of flashy features: it is simple, and it works. That makes it perfect for my use case.

👤 XorNot
I switched to Nikola recently: https://getnikola.com/

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.


👤 taubek
Did you consider github pages (https://pages.github.com/)? I was looking for some hosted solutions that use Markdown and I came across https://hashnode.com/ but I didn't test it yet.

👤 gitgud
[1] Hexo is pretty good, just simple static hosting.

[1] https://hexo.io/


👤 indrora
I personally use Hugo + GitHub actions to do the build for a major project of mine that benefits from hugo's taxonomy system. I did this after porting my blog over to Hugo as well.

I personally have avoided Jekyll for the primary reason of "Ruby is a non-starter".

Downside to Hugo is that the Go templating language is... interesting, to say the least.


👤 Moru
I use Material for MkDocs [1]. It even has javascript search built in. I'm sure there are other templates fitting a blog better but I use it for a recipe collection on github pages.

[1] https://squidfunk.github.io/mkdocs-material/


👤 dorwi
If your goal is to just put something out there, and not worry much about anything or learning fancy stuff, I suggest Hugo+Github+Netlify. Easy to set up, tons of blog posts out there, and all the goodies (CI, SSL, basic theme) come free. Mine is created like that as well: dorwi.com

👤 gbuk2013
I use https://www.metalsmith.io/ for my site and it works great, but any static site generator will do the same. No comment functionality but that’s fine by me.

Static sites are cheap and easy to host. :)


👤 jart
I write some of the most popular content on Hacker News. My HTML pages have an similarly austere style to what you might expect from Dan Luu or Fabrice Bellard. However I make an effort to give them a slightly more distinctive modern feel, while loading just about equally fast. Here's how I do it.

Example: https://justine.lol/sectorlisp2/

First, I like Roboto. It's overused but it deserves to be. It's the Helvetica of our age. The problem is custom fonts go slow. The trick I use is to use a data: uri for the latin1 character ranges in an inline The only tools you need to do stuff like this are really uglifycss and uglifyjs. Plus maybe a shell script that runs files through `openssl base64`.

To save on bandwidth fees, I've learned to defer autoplay videos until they scroll into the viewport. See http://justine.lol/sectorlisp2/video.js to learn how.

When copying to google cloud storage cdn it's a good idea to use the `-z` flag so content can be delivered with gzip encoding.

    gsutil -m -h Cache-Control:public,max-age=31536000 cp -a public-read -z com,dbg,css,html,a,h,lds,o,js,ttf *.js *.css gs://justine/sectorlisp2/
It's nice to not force people to use https. Dan Luu talks about the reasons why on his blog.

Be sure to use tools like https://pagespeed.web.dev/ which will help you with the rest.

Another good tool is https://favicon.io/favicon-generator/ for generating favicons. I'm very happy with it. I'm also a huge fan of https://excalidraw.com/ and graphviz https://dreampuf.github.io/GraphvizOnline/ Also I'd give a shoutout to the optipng and pngcrush commands. PNG-8 is fabulous. So is Photoshop.

Finally, for something like a blog, consider just writing HTML. Your time is better spent learning how to be really efficient at using an editor like Emacs that lets you be a monster with manual refactorings than you would with a static site generator framework, which are usually heavyweight and frequently change in ways that causes breakages and have lots of weird dependencies. I don't think they're the sorts of things that can be counted on if you need to go back ten years later.


👤 surfer7837
I made a minimal Jekyll theme. No advanced CSS or extra JS, and super light weight so any page loads quickly

https://github.com/lewisrobbins/sebasic


👤 cube2222
I recommend using Hugo for the site generation (there's lots of themes, it's customizable, you can write in markdown, it has WordPress import and it's very easy to get started) and hosting the files on GitHub pages.

👤 louiechristie
Use Alexandra Spalato‘s (@alexadark)

Free Gatsby WordPress theme.

See this 1 hour tutorial video:

https://www.learnwithjason.dev/gatsby-wordpress-themes


👤 the-dude
I am really interested in the 'buggy'ness of WP. Especially when you basically would be served with a static website, I do wonder which 'bugs' in WP are annoying you so much.

👤 motyar
I am working on a simple CMS.

- Double Click to edit

- Press Esc to preview

- You have to enter a secret code to update it on the server.

- Powered by markdown.

Check https://motyar.info/


👤 MrDresden
Static site using either Jekyll or Hugo (having tried both over years I'd recommend Hugo) and deploy to github/gitlab pages with custom domain.

👤 approxim8ion
I use Zola[1]. Single binary, simple structure, minimal frontmatter.

1. https://getzola.org


👤 jamjamjamjamjam
Hugo, no js theme, github actions publish to github pages.

Completley free and is what I did. I made my own theme with html css only


👤 lloydatkinson
I used Astro with markdown files, with some Vue components for interactivity and search.

👤 abdullahkhalids
I am very happy with Pelican, with isso for self-hosted comments.

👤 Igor_Wiwi
I am using and self hosting Ghost, highly recommend this engine

👤 cushychicken
Jekyll, all the way.

Easy and free to get going on GitHub Pages.


👤 fidla
Use startpage or linktree

👤 karanbhangui
Hugo + netlify

👤 machiaweliczny
Next.js + MDX

👤 hffft
Use a static site generator like Hugo and a VPS found at https://www.lowendstock.com/... or Web3.

👤 jabej
If you find it too slow you may want to try a cache plugin. I think automattic (the creators of Wordpress) have one.