HACKER Q&A
📣 darkhorse13

Are there any downsides to building a blog using only HTML pages?


I want to write some things, and I have really nice templates (nice design, minimal vanilla JS, loads really fast) for the following pages:

- Main page of the blog (lists all the articles)

- Article page

I was thinking of making one HTML file for each post, linking them together using hyperlinks (pointing directly to the HTML files), putting everything in a folder, and dragging and dropping to my Netlify Drop account (https://app.netlify.com/drop).

What are the potential downsides to doing this? Am I really underestimating the value that modern frameworks and libraries provide?


  👤 seanwilson Accepted Answer ✓
The major issue is HTML has no way for you to share chunks of HTML between pages e.g. a header or footer, so you'll have to copy/paste chunks manually (unlike with CSS, images and JavaScript though which you can embed on multiple pages).

I can recommend Hugo if all you need is the above (and more). It's a single binary to install/run, runs super fast and you only need to learn a couple of template tags for the above.

I'm not keen on Gatsby or Jekyll because they're an order of magnitude slower as far as I know and require you to have a pile of Node and Ruby (respectively) dependencies set up which is an extra headache and stuff that can break.

Every now and then my site that uses Jekyll will break when I push to Netlify because something changed somewhere and it's a massive drag (I know proper containerisation would solve this but this is extra work and expertise required). Hugo is really simple in contrast because you don't have any dependencies to isolate or require a complex build script.


👤 robrtsql
The state-of-the-art for building sites like these are tools like Hugo (https://gohugo.io/) and Jekyll (https://jekyllrb.com/). They generate the HTML for you so that you don't have to update 100+ HTML documents every time you need to change something.

👤 quickthrower2
Start simple! No problem with your approach. A lot of interesting blogs look like they are made this way. You could also use some shell magic to cat a header and footer to each page.

👤 tmaly
I use Hugo to generate a static html blog. I use to use wordpress, but this was a nice low maintenance change.

You can customize your own template.

My process to write a new post looks like this:

write a post in markdown compile it to html with hugo rsyn to my shared host.


👤 CogitoCogito
Just do it in whatever way seems natural to you. The way you're describing is fine. Some people here talk about scaling or hassles with many links. That simply isn't a problem unless you (against all likelihood) actually end up writing a lot of posts. In that case it's really not that hard to change your stuff to some other framework/platform/whatever. Just worry about generating content.

https://static.guim.co.uk/sys-images/Guardian/Pix/pictures/2...


👤 _AzMoo
Limited functionality after growth. What you're describing is fine for 10 blog posts, but what about 100? 500? How then do you manage pagination? Search? Tagging or categorisation?

👤 shoo
If the focus is getting some ideas written down and sharing them, doing something dead simple sounds great. Go for it.

If in some hypothetical future you've got a sprawling collection of related blog posts and are spending 80% of your time manually gardening links between posts in vim and only 20% of your time thinking about ideas and writing new posts, that could be a prompt to do a second pass and rethink how the blog is organised.


👤 vehemenz
As long as you have some templating in place for your header and page skeleton, I think your method is fine.

👤 shaftway
It's not uncommon. This was the approach Blogspot used back in the day. It's painful at scale.

The pagination, TOC and other concerns are real issues, but a couple small scripts to pre-process the posts could handle that. Generate a bunch of HTML and then drag-and-drop.


👤 antoineMoPa
One downside is that when you write an article, you have to go add the link in the homepage, then in any other menu that you might have, then update recent articles section, etc.

You can use a json file with article relative urls and build all the links on the client side.


👤 jlgaddis
You can't add comments to your blog unless you use some third-party system like Disqus.

👤 Foober223
File per blog sounds great to me.

Fancy solutions evolve out of needs or wants. You don't have those needs. Enjoy the simplicity and screaming fast performance of your website.


👤 facorreia
This reminded me of Microsoft FrontPage. It would let you author HTML pages using partial templates.

These days I would recommend a static site generation tool like Hugo.


👤 throwaway889900
That's how I did my site, I just copy/paste a template file for every new blog post. Works fine, not complicated really.

👤 sharemywin
I would recommend you own your own domain name.

The modern frameworks would be for reusing components, branding, etc.

If you're looking to access a database or apis.


👤 PaulHoule
Why not use something like

https://jekyllrb.com/

?


👤 cblconfederate
It feels wrong?

It's like copy-pasting a function every time instead of #including it


👤 nunez
Less WYSIWYG is the only con I can think of.

👤 dyingkneepad
RSS feed?