Live data from Hacker News

Why You Should Write Your Own Static Site Generator

arne.me

91–100 of 136 posts

Re: Why You Should Write Your Own Static Site Generator

#91

It's a fun project to try out new tech, but you have to acknowledge that you're doing it for fun rather than any sort of necessary reason. It's like when you build a game engine and never get around to doing the hard part: building the game. It's a procrastination time hole that mostly just distracts us from the harder, less concrete, less fun thing we supposedly set out to do in the first place. It keeps us from shi…

Thanks. As someone who's prone to getting hopelessly sidetracked in projects, I needed to read this. I ended up forking and customizing pug into my own templating language!

Re: Why You Should Write Your Own Static Site Generator

#92
post #73

For over 2 decades, my personal Web site has been generated from one big Emacs Lisp file (plus a filesystem tree of image and downloadable files). Both the code and the text data were in the one file. The code included features like rich syntax coloring source view of files (fairly unusual at the time) that were also downloadable, and calendar-based blog navigation. Over time, the code changed a little, such as to co…

I built my own on top of org-mode: https://github.com/bastibe/org-static-blog

And also various others, for various reasons. The thing about static site generators is that they are fantastically easy.

Re: Why You Should Write Your Own Static Site Generator

#93
post #20

I'm not sure I'd advocate for writing a static site generator, although I'm certainly guilty of writing a few myself. Instead I always encourage people who are trying to start blogging to do the writing first. Figure out a workflow that works for you - what time of day you prefer writing, what editor, do diagrams naturally come up in your thought stream, etc. It's way easier to get this workflow dialed in when you're…

I'd back you up there, and maybe go one step further: Blogs are the worst use case for a ssg and you should focus on writing first. It's the articles that make or break a blog, and you might actually want the comforts of a dynamic blog engine. Plus comments, trackbacks and pingbacks, so it is a real blog.

Where static site generators shine are websites that are not blogs. Especially when generated from a data source. Then you can tailor your ssg to the data source, update the data and run the generator to update the site.

Re: Why You Should Write Your Own Static Site Generator

#95
post #20

I'm not sure I'd advocate for writing a static site generator, although I'm certainly guilty of writing a few myself. Instead I always encourage people who are trying to start blogging to do the writing first. Figure out a workflow that works for you - what time of day you prefer writing, what editor, do diagrams naturally come up in your thought stream, etc. It's way easier to get this workflow dialed in when you're…

But if you write a static site generator, you can blog about it. And that can be the first and the last post of your blog. If you don't write one, the chance is good, your blog would stay empty.

Sounds like you are the visitor my blog had?

Re: Why You Should Write Your Own Static Site Generator

#96
post #94

These never come explaining Why html is to hard. Basics and ftp can be explained to a 12 year old in 10-20 minutes? I'd even argue (based on decades) that everything learned beyond the first 30 minutes is probably something you should not be using.

No one is saying HTML is hard. It is however, tedious to copy and paste your content into a blank template, update the meta tags, etc. Then update navbars and lists, etc. Now imagine a redesign, or a bug in that blank template thats now in all your pages...

The SSR isn't to avoid HTML, it's for template purposes.

Re: Why You Should Write Your Own Static Site Generator

#97
Lots of "don't reinvent the wheel" comments here. But if you're a developer, crafting a SSG for your own needs is a 2-3 hours project. Learning an existing one is roughly the same. But hey... it's a good opportunity to learn by doing, and even later appreciate other SSGs.

My own SSG is Django+Distill.

Re: Why You Should Write Your Own Static Site Generator

#99

Lots of "don't reinvent the wheel" comments here. But if you're a developer, crafting a SSG for your own needs is a 2-3 hours project. Learning an existing one is roughly the same. But hey... it's a good opportunity to learn by doing, and even later appreciate other SSGs. My own SSG is Django+Distill.

It's 2-3 hours for the first version. Then you want to add something to the website, and you find you don't have the feature for it, and need to spend another 2-3 hours. This repeats every time you're adding something and becomes a massive time sink. But if you don't mind, sure it's okay.
Post reply on HN