by jlundberg on 5/3/25, 9:08 AM with 169 comments
by Tallain on 5/3/25, 3:29 PM
As I fell into the SSG pit I found I mostly wrote about and fooled around with the SSG itself, instead of all the things I originally planned on writing about and doing. So I threw away the SSG and installed Wordpress and stopped caring. It's been liberating.
If the goal is to tinker and write about the tinkering, that is fine. If you're not like me and the tinkering never gets in the way of the writing, that's also fine. But that wasn't me. I had to learn yet again that the best tool was the one that got out of my way and let me do what I came to do.
The last thing I need when I'm aiming to write is a chance to procrastinate.
by p4bl0 on 5/3/25, 9:54 AM
1- Make sure to order post by date (most recent first) and to display that date somewhere. The date can simply be taken from the post file meta data (e.g. creation time) to keep things minimal.
2- An RSS feed of course! It should be quite easy to generate a minimal one with only links and titles based on the existing script and a minimal RSS template.
by susam on 5/3/25, 10:25 AM
Starting with a simple collection of pages was a great way to get started and set up a minimum viable website. But as time passed, I found myself needing a few more features. In order of priority, these included:
1. RSS feeds.
2. A blog listing page with posts ordered by date.
3. The ability to tag posts by topic and generate tag-based index pages.
4. Support for non-blog content, like tools, games, demos, etc. that can also be tagged and included in the RSS feed.
5. Support for comments without relying on third-party services.
With each new requirement, the source code gradually grew. What started as a few hundred lines has now expanded to around 1300 lines of Common Lisp. Not too big in the grand scheme of things but not exactly tiny either. Still, I try to resist the temptation to keep adding every shiny new idea that comes to mind. This remains a solo passion project. I want the entire source code to be something I can hold in my head at once. If I encounter a bug, I want it to be something I can reason about and fix in under 10 minutes, and so far, fortunately, that has been the case.
That said, new ideas are always tempting. Lately, I've been enticed by the idea of adding a blogroll that provides a list of posts from my favourite bloggers. This could replace my usual feed reader. I haven't had the time to implement it yet, but if a quiet weekend comes along, that might just be the next feature I work on. Of course, I remind myself not to let this project spiral out of control. I certainly don't want this to grow into something that can read my email.
by captn3m0 on 5/3/25, 12:34 PM
If browsers can decide to render PDFs, surely a simple formatter and user-decidable stylesheets for markdown/gemini content can’t be that hard to ship.
As it stands you can write a text/plain blog but you will be hurt with SEO concerns since it isn’t really hypertext (maybe you could do some magic with link headers). Supporting other formats lowers the barrier to publishing in a neat manner and gives control back to users.
by echoangle on 5/3/25, 10:08 AM
So every time your post contains the string 'Minimum viable blog', it will be replaced by the title of the current post? That’s a bug, right?
by 90s_dev on 5/3/25, 10:48 AM
* You can get away with const title = lines.match(/# (.+)/)[1] and avoid frontmatter.
* My blogs never have so many posts they need pagination or tags, or categories, or sorting.
* JSX turns out to be a great vanilla server side string builder if you use a questionable hack like https://immaculata.dev/guides/enabling-jsx.html
* GH Pages with arbitrary build steps instead of (sigh) Jekyll is really easy now with things like https://immaculata.dev/guides/using-gh-pages.html
* highlight.js is still basically the king of super easy code syntax highlight by adding literally three lines to your HTML (shiki is cool but slooooow)
by FlyingSnake on 5/3/25, 10:30 AM
This is what I did:
- Use Hugo Blog Awesome theme
- Followed the 512kb guidelines and verified the page size.
- Stripped down any images and unwanted JS, but there weren't many.
by _fat_santa on 5/3/25, 2:23 PM
Since that time I have moved to something more sophisticated and now run Astro for my personal site and blog and honestly it's freaking awesome. On their landing page they claim it's the best platform for "content driven sites" and after using it for 6 months I have to say I agree, they take all the BS out of building a blog and just give you clear and easy to follow conventions for just about everything you'd want for a blog.
by emadda on 5/3/25, 1:46 PM
Bun has a —hot flag that regenerates static html on change.
IntelliJ IDE can detect a // language=html comment above strings which formats the html inside and does highlighting etc.
Just using vanilla JS functions instead of a template language lets you write any logic yourself instead of looking up the template languages way of doing it.
by agubelu on 5/3/25, 10:13 AM
Source: https://github.com/agubelu/blog
by abhisek on 5/3/25, 11:38 AM
But as you invest time and effort, get more readers and asks from your readers, your need for features even for a simple blog will increase. At least basic conversation around content. You will probably end up using Discuss or decide to make your simple blog much more complex by introducing a database (or may even be just flat files on S3).
At some point you will either focus on only "writing" and sharing ideas in which case a simple publishing infra is good. If you want more, you will probably end up building a Jekyll, Hugo etc. from scratch or better adopt and contribute to one of these :)
by Retr0id on 5/3/25, 10:15 AM
I also generate an index page and an RSS feed.
One thing that's been bugging me more recently (now that I have tens of articles written) is that I need to implement incremental rebuilds. Right now every page needs to get regenerated at once, which takes triple-digit-milliseconds. Unacceptable!
by nicbou on 5/4/25, 8:26 AM
If you don't start from scratch, the biggest problem with static websites is maintaining old URLs. At some point you need URL rewrite rules, and then you can't just have static files on a server. You need server rules.
It's also nice to just editing text files locally without having to install stuff. Then you need some sort of build system on another server.
Then you might find that you need forms, comments and other features beyond text on a page.
Basically, it's hard to have just static files.
by accrual on 5/3/25, 4:20 PM
Since we're chatting about our static site generators - I've been working on mine for a few months and naturally spend way more time on the generator than the content. ;) Mine is written in TypeScript and I'm targeting HTML 4.01 Strict for compat with old browsers.
It started pretty simple, just walk a directory of .md files and output .html, but it now has RSS, Atom, tags, a "latest" page, sitemap, stats, table of contents, SEO features, etc.
It's been fun - a nice "easy" project to slowly polish over time and to gradually grow my TS skills.
by hcarvalhoalves on 5/3/25, 2:28 PM
by bob1029 on 5/3/25, 10:27 AM
The static site generators are nice, but it's really not a huge deal to spin up a few common css classes and maintain a little bit of mental discipline.
I think using a blog to communicate your ideas and skills is great. I think making the blog tech stack itself representative of those things seems distracting. Not everything has to be a smartass ego implementation. As long as you spend 5 minutes testing on mobile, your audience probably won't notice a damn thing the next time it touches the front page of HN or wherever.
by KronisLV on 5/4/25, 8:34 AM
I decided on running an instance of Grav, which is a flat file CMS, with a fairly minimalist theme, except I version all of the files (even the PHP dependencies) in my Git repo, from which I build Docker images that actually get deployed: https://getgrav.org/
The benefit here is that I can launch it locally and see how the blog posts look, it's just a bunch of files unlike SSG, but with dynamic templating, meaning that I also get an updated index of the pages, as well as search functionality out of the box.
Furthermore, each new post is basically a deploy of a new version of the container, which curiously also means that if something goes wrong (e.g. if it gets hacked), there is no serious data loss because none of the data is meant to be truly persistent, I don't even need to think that much about backing it up, rather just the Git repo its built from.
Plus, there's a nice admin UI if I need it (behind additional auth through the web server), or I can just write things in a text editor of my choice locally.
Oh, and the performance is pretty good, too, because there is no database to hit with complex SQL, more like some disk I/O (which also is lessened by the cache).
by sirodoht on 5/3/25, 11:55 AM
I've built a blogging platform with similar vision which I could call "Minimum Viable Blogging Platform"
by AndrewStephens on 5/3/25, 11:30 AM
Over the years I have added to my solution with custom markdown, tagging, rss, and most lately exif-stripping. Technically the source is available [0] but I can’t see anyone else using it.
by pvtmert on 5/4/25, 7:56 AM
I think same could also be achieved via React, but I did not want any `npm install` hence, I used some JS libraries like marked and markdown.js directly at the frontend. (Added as git submodules)
I also sort-of liked how a dependency management mechanism could be built directly on top of the git submodules, without requiring an explicit package manager. Given the commits cloned are already pinned and committed to the repository. Though, the tooling is not as good as the well-established dependency management software like Maven, NPM, PIP, etc.
Nevertheless, it worked well for a basic blog, I publish the articles directly in markdown format, embedding some HTML if necessary. In fact, all the pages are some sort of markdown, rendered to HTML upon loading. But of course, the URLs are not "real", I use the query string to refer to the pages, such as `mert.akeng.in/?/blog`, the JS fetches `/blog.md` and renders it to the `<main>` element. Much like how you would initialize React through/within JS.
by jprokay13 on 5/3/25, 3:26 PM
by karaterobot on 5/4/25, 3:44 AM
No category pages, no individual pages. No search... well, CMD+F is your search engine, and it's blazingly fast.
That design actually works really well if all you care about is getting text content out there, and the idea of comments—let alone ads—isn't appealing to you.
by bartread on 5/3/25, 8:36 PM
For whatever reason it's just not picking up themes even though I'm now using the most up to date everything. And actually I've realised I don't even like the vast majority of the themes anyway, including the one I used previously. And since developing my own hexo theme seems like kind of a faff, I'm pretty tempted to just throw together a Sass sheet, compile it to CSS, and use that as my theme.
I guess if I got into the detail of it - comments, archive pages, etc. - the complexity would start to creep in and I'd find that what I was doing was building my own home-rolled hexo-alike... so maybe I should persist with figuring out why themes aren't working for a bit longer.
by bambax on 5/3/25, 10:26 AM
by _dain_ on 5/3/25, 5:32 PM
html_content = html_content.replace('Minimum viable blog', title)
Did this originally say html_content = html_content.replace('{{ title }}', title)
And then you ran it?Sanitize your strings!
by mrroryflint on 5/3/25, 10:58 AM
by to-too-two on 5/3/25, 4:38 PM
I've been thinking about using Obsidian as a static site generator.
by geor9e on 5/3/25, 6:48 PM
by AlexK90 on 5/4/25, 11:42 PM
I have a question about this line of code
file_path = os.path.join(posts_dir, post_directory, 'eng.md'
Is eng.md an extra addition here? By looping through the directory, would the post names be found in the loop? By deleting this I was able to get the code to run and think I'll start using this as a blog template!
by Keyb0ardWarri0r on 5/3/25, 4:13 PM
It lets you create a blog and a newsletter with Markdown and publish directly from the command line (or the web editor). You get the offline-first workflow of Markdown, but with beautiful themes like substack.
It's like a mix between Wordpress, netlify and substack.
by floathub on 5/3/25, 12:44 PM
by keepamovin on 5/3/25, 1:51 PM
I think I like simple.
by sareiodata on 5/3/25, 5:17 PM
https://github.com/sareiodata/hx-weaver
That being said, I don't find myself actually writing a blog :)
by ds-rants on 5/3/25, 11:00 AM
by sandebert on 5/3/25, 11:03 AM
by concrete_head on 5/3/25, 9:56 AM
As easy as wordpress, square space or whatever claim to be, in my mind this is even easier, the solution is more elegant, and you expose yourself to a whole lot less crap along the way.
Edit: I recognise this doesn't cover hosting, domain registration etc.
by wvh on 5/3/25, 5:21 PM
by strzibny on 5/3/25, 11:18 AM
by rambambram on 5/3/25, 1:27 PM
by hxii on 5/3/25, 1:56 PM
It really does help when you don’t even have the potential option to distract yourself with bells and whistles.
Write some markdown, run a command and your blog updates.
by dpacmittal on 5/3/25, 10:05 AM
by capitanazo77 on 5/3/25, 4:16 PM
Mobile screens and desktop are fundamentally different. You can’t have small and big at the same time.
That is solved via the standard html img srcset
Astro solves that easily.
And Wordpress of course.
by Rush2112 on 5/4/25, 10:07 AM
by Xeoncross on 5/3/25, 6:45 PM
You don't need a backend.
by yaKashif on 5/3/25, 11:59 AM
For all of them I built Lykhari.com
by revskill on 5/3/25, 10:13 AM
by hackerbeat on 5/3/25, 7:10 PM
by theletterf on 5/3/25, 10:31 AM
by GaggiX on 5/3/25, 10:42 AM
by wood_spirit on 5/3/25, 11:10 AM
Are there anything like ghpages with a built in wysiwyg editor?
by tomalaci on 5/3/25, 10:48 AM
The nice thing about latter is that the bandwidth, DDoS or other load-related issues aren't that much of a problem. Server maintenance also isn't a problem as you don't have any.
by 38 on 5/3/25, 1:41 PM
Groan
by jlundberg on 5/3/25, 9:54 AM
by babuloseo on 5/4/25, 4:11 AM
by naveed125 on 5/4/25, 12:47 AM
by froggertoaster on 5/3/25, 2:47 PM
by ulrischa on 5/4/25, 7:22 AM
by thenthenthen on 5/3/25, 11:01 AM
by Igor_Wiwi on 5/3/25, 11:04 AM
by rodolphoarruda on 5/3/25, 11:48 PM
by owzkshfjsekui on 5/3/25, 10:40 AM
by balazs4 on 5/3/25, 9:56 AM
by yawpitch on 5/3/25, 10:19 AM
by vemom on 5/3/25, 10:06 AM