Ask HN: Simple(st) Static Site Generator?
There are innumerable static site generators out there which mainly differentiate themselves by being written in the hip new language of today, being written in the hip new language of yesterday, or having all kinds of bells and whistles that I don't need.
What's a very simple (but still usable) static site generator that's fit for a no frills little personal blog? I'm half-tempted to just write one myself but the last thing the world needs is more of these...
EDIT: I'll clarify a bit: I'm hoping to get a site out of it that's about HN levels of "sophistication" (both functionally and and visually), so I do mean simple in that sense, not necessarily in the sense of "easiest to get started with", though I feel the former should imply the latter.
19 comments
[ 1.7 ms ] story [ 60.0 ms ] threadI am working on adding tags.
If simple means no frills and simple to customize to your liking I think 11ty would be the way to go.
If you don't want to think to hard about it just use Hugo, imo.
http://arthur-johnston.com
I use it for docs for my OS project. I just wrote about my setup (sorry it's on medium, but it's without paywall)
https://0x0ece.medium.com/docs-for-an-open-source-project-b7...
There are a bajillion static site generators out there (and everyone has an opinion, I'm sure) but here's the secret - it doesn't matter! You want to know what does? Writing! Focus on the content and if you run into any limitations or issues then migrate to whatever is hip in the future.
Most people struggle at writing the content so that really has to be your priority. Pick whatever gets
Here’s my demo site: https://github.com/cpach/piper
Only about ~30 lines of markup is needed to create a site. No theme required.
Hosting is very easy on AWS Amplify. I hear Netlify is good too.
You can copy and paste our setup in Jekyll and Gitlab pages.
IMHO existing SSG need educated users to produce sophisticated homepages not another SSG. Still jekyll feels rather complicated to use, I described my set-up issues in the post:
https://www.helm-nagel.com/how-to-score-a-perfect-100-percen...
I don’t know ruby and this is the only ruby Ive ever used and I haven’t gotten stuck yet. And probably spent 15 hours over 3 years or so.
I spend time, as I want to, on the content and not worrying about web stuff.
jekyll is slow as you grow, a pain to set up
Make will take care of the file discovery, change detection and rebuilding all content files. And some simple shell scripting will let you generate minimal HTML with the no frills approach of just embedded big chunks of HTML into your scripts using strings or HereDoc sections depending on personal preferences.
For maximum simplicity I’d recommend writing blog/page content in a “HTML fragment style” where you basically just write the content as text annotated with any explicit HTML formatting like hr or br tags, along with appropriate paragraph tags. This will minimise the complexity of the shell scripts (mostly by eliminating any complicated markup translation mechanisms) you need to write for templating out finished HTML files.
If you want to get fancy add “jq” a widely available json parsing tool available as a static binary for most environments you’ll ever want to work in. Store a “metadata file” in JSON format next to your content. You can use this to automate post author attribution, extra post information like publication dates. As well as making more advanced things like controlling the styling of each item if you want different themes for different kinds of blog content.
You could gradually increase the sophistication of your HTML templating scripts, add some sed and awk to gradually minimise the number of big hand written chunks of HTML your templating scripts contain. But these will if not careful, reduce the flexibility you have by just being able to edit the hand written chunk of template HTML that wraps around your content. Both mechanisms have advantages so I’d recommend using a mechanism like the aforementioned “jq” metadata and an intermediary script layer that uses this metadata to control which scripting path gets used to build a page that way you can easily experiment with new variations in how you render your pages without risking breaking all your existing stuff.
Compare https://wordpress.org/themes/ to https://themes.gohugo.io/
In Wordpress I also miss the ability to use Markdown.
These days I am back on WordPress mostly because I want to focus on writing now.
One that I would note for being very simple for the end user while still having lots of potential configuration is Blot
Blot allows you to organize files (.txt, .md, .docx, . odt, .html, images, bookmarks) in a Dropbox folder or Git. (That is plain git, no dependence on GitHub)
A superset of Markdown is supported, with many of the most common additions plus some very interesting layout formats to support columns, call outs, side bars and more.
A variety of site templates are provided and you can customize the templates.
Blot is primarily a paid hosted service and as such is VERY simple. The code is open source but it is a complex nodejs app with some big dependencies.
https://blot.im
I have used blot in the past, and think it is very much worth consideration. At the very least I think it deserves attention for a variety of very cool features.
In general, I prefer Hugo. Both offer a selection of simple free themes. Both were easy to find my way around and get started. Mostly I like Hugo better because when I make changes (such as add a blog post), the site rebuilds itself faster than Gatsby.
Both are suited for a no frills personal blog. Likely other SSGs you mention can do this too.
The key is to select a theme with your purpose in mind. Some themes add bells and whistles.
I host 2 Hugo sites out of AWS S3 buckets. They get steady traffic but not a ton. Cheapest path to a website ever. <grin>