Live data from Hacker News

The Static Site Paradox

kristoff.it

31–40 of 370 posts

Re: The Static Site Paradox

#31

There is still not a censuses as to the definition of a static website. Is a website without a MYSQL database still static if it has JavaScript or php template include files? A pure static website in which each page has to be manually edited would be a headache.

This is the first time I've ever heard of somebody being confused about this. If the server is serving dynamically generated documents, then it isn't static. A static website can be perfectly represented as a directory of files being served by python -m http.server. No PHP templates, that should be obvious.

Re: The Static Site Paradox

#32
post #14

Most people's expectations of what a "basic website" should do have gone way up over time. Even as a programmer, I've fallen into the static site generator trap a few times. It's annoying to start a side project with a static site generator and then realise I want to add a small feature and suddenly I wish I'd just started with a simple Rails or PHP app. Nowadays, if I want a static site I just start with a folder of…

For blogging I use Hugo because it is just easier to focus on content, not on style. That is why I don't like writing pure html files. Changing style can also be a problem, if something is hardcoded into html file.

For more advanced tasks I write in django, because it so easy for me to add features.

Re: The Static Site Paradox

#33
post #14

Most people's expectations of what a "basic website" should do have gone way up over time. Even as a programmer, I've fallen into the static site generator trap a few times. It's annoying to start a side project with a static site generator and then realise I want to add a small feature and suddenly I wish I'd just started with a simple Rails or PHP app. Nowadays, if I want a static site I just start with a folder of…

> Nowadays, if I want a static site I just start with a folder of html files.

Same here. I've considered adding a .md —> .html step for content, but just haven't found it necessary — yet.

> The other cool thing...

I like being able to—easily—view my site via a local sever. The best case would be one that I can view via file:// too, but I couldn't quite crack the organisation and ended up with a 'make local' step that generates a separate copy for file-based viewing.

Re: The Static Site Paradox

#34
Static sites are great until you need to have a contact form or want to add basic comments. Yes, you can deploy javascript that uses external services to add such functionality to static sites- but with a basic WordPress site, you get everything right out of the box.

Re: The Static Site Paradox

#35
post #4

> normal users are stuck with a bunch of greedy clowns that make them pay for every little thing Huh? You're not confined to Automattic or WP-Engine, there are tons and tons of regular web hosting providers with Wordpress and a bunch of other stuff included in a standard hosting package, you can use the free Wordpress, and you can self-host. That's the whole point of Wordpress being open source, and it's working as i…

> Static site generators are used by technologists who want to tinker and check all the boxes in whatever Chrome's latest devtool benchmark tool is called

It's relatively easy to reach a PageSpeed test result of 100 with WordPress by disabling one or two features and setting up a cache extension. For logged out users, WordPress with SuperCache set up is almost like a static website (except for the occasional cache eviction) because the HTML is almost directly served from the cache.

Re: The Static Site Paradox

#36
Strongly agree. Wordpress brags as powering whatever % of the internet... but if youve ever taken a look at some of that PHP source code... yikes

Mind boggling to me such an overly complex system has such a large market share.

I'll take my Gatsby TypeScript React components / > any day

Re: The Static Site Paradox

#37

There is still not a censuses as to the definition of a static website. Is a website without a MYSQL database still static if it has JavaScript or php template include files? A pure static website in which each page has to be manually edited would be a headache.

Static website serves you everything you need as a one HTML file. You can save the source code and open it offline and there will be no difference. As such any templating is out of the question if that is done via request from the client. How I manage my static website is with a build script. I write my content in markdown with a option for custom header and then I have a python script that churns out pure HTML with…

This, but without the "one HTML file" restriction. Unless I misunderstood you—did you just mean "one HTML file per URL"?

Re: The Static Site Paradox

#38
post #23
post #4

> normal users are stuck with a bunch of greedy clowns that make them pay for every little thing Huh? You're not confined to Automattic or WP-Engine, there are tons and tons of regular web hosting providers with Wordpress and a bunch of other stuff included in a standard hosting package, you can use the free Wordpress, and you can self-host. That's the whole point of Wordpress being open source, and it's working as i…

> Static site generators are used by technologists who want to tinker and check all the boxes in whatever Chrome's latest devtool benchmark tool is called No? Downloading Hugo, getting a random theme and writing a few articles is pretty simple and requires no more tinkering than doing the same with a Wordpress (okay, one's actions are big buttons in a UI, the other is copy pasting commands, but in terms of effort , t…

> okay, one's actions are big buttons in a UI, the other is copy pasting commands,

The difference is that the console is scary to the average user, big buttons are not.

Re: The Static Site Paradox

#39
The reason SSGs are primarily interesting to software developers is that the software architecture of the site is primarily interesting to software developers. Other people (both authors and readers) don't care how the pages are produced, they only care that the pages are there.

Re: The Static Site Paradox

#40
post #25

There is still not a censuses as to the definition of a static website. Is a website without a MYSQL database still static if it has JavaScript or php template include files? A pure static website in which each page has to be manually edited would be a headache.

I would say a static website is just one that doesn't do any extra work on the client to generate the content. Either SSR or just plain HTML files

The trouble is defining what "the content" means. Are you saying "no JS" — if so, just say so! Otherwise, how are you distinguishing between "content" and ... "other stuff"?
Post reply on HN