Comment by leonheld
5 days ago
I profoundly do not understand why one needs Hugo or Jekyll or whatever other generator. Why not write HTML in the first place? It's so absurdly easy and it makes you not depend on external infrastructure at all.
I tried some generators but it was so much more complicated than writing a style sheet and some pages. Maybe for some more complex use-case, okay, I get it, but the author's blog is so minimal and simple.
edit: today I learned people have very strong opinions about static site generators. Good valid reasons, y'all. Maybe my use case really is too simplistic!
For me its mainly:
Because then you have 200 blog posts and suddenly you realize "oh I wanna add an author section to all my blog posts". That is 200 files to edit. Could you write a script to do the edit? Sure, but then you pretty much build a static site generator.
`sed -i` is one command: https://www.gnu.org/software/sed/manual/sed.html#index-_002d...
And you built a static site generator.
Or at least, you will have as you realize things like you only wanted to do that on certain categories or whathaveyou.
You can in principle just write HTML with no script support, but it itself becomes an exercise in conspicuous asceticism. It is not unreasonable to want things like "the last 5 posts" on every page on a blog, or an RSS feed, or any number of other very basic, simple things that are impractical with an editor and raw HTML.
1 reply →
Writing raw HTML is just not fun for some people.
Obsidian is a nice middle ground between WYSIWYG and plain text - it doesn't send markup characters into the ether but at the same time does show you something close to the final text in real time.
Closest thing we've had to WordPerfect's Reveal Codes in decades.
I thought this too, but then it hit me that it will need pagination as the number of blog posts grow. Also updating links, footers, menus, headers etc also quickly becomes a nightmare.
Id like to see you writing a semantically correct, accessible, responsive <figure> block containing an image of a chart displaying some data.
It takes me nine characters plus URL and alt text in markdown using Hugo. I would be surprised if you get it right on the third try without consulting MDN, spending time to research, do image conversions, and fiddle with the <picture> tag and its srcset attribute.
Changing common parts like the navigation becomes a bit of a chore without a ssg as soon as your site has more than a handful of pages.
That's a very technical perspective. If you're a note taker, you ALREADY write in a format that is comfortable for you. And like the vast majority of people who enjoy putting proverbial pen to paper, you aren't thinking about bloody html tags.
The goal of generators is to reduce the friction of taking your notes/articles/etc. and wrapping them in thematically consistent HTML/CSS for your site. Once you've got it tuned/setup for your blog, they're pretty easy to use.
Obviously in your use-case where you find static site generators more complicated, then you can stick with raw html.
When I want to write longer content, the last thing I want to think about in that process is html tags. Doesn't matter how simple - if it distracts from content, it has no place at that stage of the process. I'm also very likely to include code snippets in any post I write and I extremely don't want to write the code colouring by hand every time.
Because writing in markdown is a nicer experience. You could convert markdown to html using Pandoc, but another nice thing that these blog generators do is templating and indexing. Neither of which is necessary, but still, they're nice, especially if it happens automatically when you push to github.
How do you plan to manage 1,000+ posts with HTML and make changes that are similar across all pages, say, the location of your static assets (images) or something common like footer, nav, etc?
You don't have to. It's just a blog. Fabian Sanglard doesn't.
compare https://fabiensanglard.net/fastdoom/ to https://fabiensanglard.net/fluide/.
The separation of template and content is the reason. You don't want to have to run a find and replace to add a new link to your sidebar or whatever.
The input is markdown, the output is HTML. How do you bridge that gap without generating HTML?
Because I don't want to publish the millions of draft posts I'm procrastinating on right now