Live data from Hacker News

The Static Site Paradox

kristoff.it

101–110 of 370 posts

Re: The Static Site Paradox

#101

> And so, while we software engineers enjoy free hosting & custom domain support with GitHub Pages / Cloudflare Pages / etc Oh come on! You don't really expect that to last, do you? Learned back in 2004 that it's better to pay than to rely on free services. I pay for source code repositories, email, web hosting, etc.

What’s the worst that can happen when using free hosting? As soon as they start charging money, you just leave for somewhere else. And I say that as someone who is paying for a VPS for hosting (and some other stuff).

Re: The Static Site Paradox

#102

There is no paradox at all: simplicity is beautiful but complexity sells. The author thinks that value come from realized utility. However, in most market segments, value came from perception. With complexity (even useless ones), you can boost perceived value. How do you impress people when all the greatness is under the hood? I use several SSGs and wrote one myself. I still can't recommend any SSG to people willing…

> The author thinks that value come from realized utility.

For the majority of the world, Wordpress indeed does provide more utility than an SSG. Wordpress is famous for their 5 minute installs, and then everything just works.

Re: The Static Site Paradox

#103

In 2016, I was working at an agency making brochureware for local businesses. I remember one of our clients wanted us to add a small iframe for a reservation system to their website they had built. They sent us a single word document. Turns out they were just exporting it as HTML (which it seems like Word does still support today!) and throwing it onto some cheap shared web hosting provider. It worked great for them.…

I love when businesses do stuff like this. If it works, it works. My job isn't to ridicule them because it could be better, but make their solution better and ensure my solution for them works as well as theirs, if not better, without hampering the success they already had with what they were doing already. A lot of developers don't want to admit this—in my experience at least—but tons of these ad-hoc web solutions a…

Totally! The magic of using your print menu word doc as the website is its so little work to keep the site updated. No one really cares that a family restaurant in a Toronto suburb has a visually stunning website. You just want to see the menu, hours, address and phone number. It's always going to be updated, exactly the same content as the print menu that you actually pay from, and they already knew how to make things look legible in word.

It's actually even more charming than any solution we ended up providing because this particular restaurant (sadly closed now) was run by a 60-70ish year old man, who's cropped portrait photo was their logo, `float:left` in the header of their index.html exported from Word. I don't think you can buy authenticity like that.

I of course thought that was hilarious because I was 19, an idiot, with my first tech job thinking I'm such a professional cranking out CodeIgniter-based contact forms and static About Us pages.

Looking back, I'm pretty sure we did them dirty. Whatever solution we sold them on (IIRC, they got a wordpress site with a custom theme) was probably less useful. Which sucks.

Re: The Static Site Paradox

#104
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…

> 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.

Hard to discuss without examples. I started using Pelican over a decade ago, and am still happy with it. Every once in a while I write code to customize the behavior, but it's once every few years. It's simple and just works.

There are things I miss from dynamic sites, but I don't see how a simple folder of HTML files is in any way superior to Pelican...

Re: The Static Site Paradox

#105

The killer app of WordPress is comments. No SSG, almost by definition, allows comments; WordPress blogs almost always come with them built in. If you want something like Hugo to really take off in the blogging sphere, all you need to do is create some good looking themes with comments . Figure that out at scale - maybe by using per-blog sharded SQLite, which you can host as a third party for pennies on the dollar - a…

Grate post! Hey, check my websight about "WordPress blogs" at https://www.sevarg.net/ I think youll like it! ;)

Are you sure comments are still desirable? Isn't step 1 of the internet anymore "Never read the comments"?

That said, I did actually work out a solution for "static site with dynamic comments" on my blog that could easily be done for a lot of people if they're willing to use a hosted service. Discourse (the modern forum software that a lot of places moved to after PHPBB) has a way to integrate with pages for comments, and so I've been using that for at least three years now with no real trouble. I host my own Discourse install (I'm weird, I still have a server racked up in a datacenter), but there's no reason you couldn't pay someone else to do that and provide comments.

Interestingly, the amount of spam I've gotten with my Discourse comments is a tiny fraction the amount I got even with Blogger back when I was hosting there. It's just not a big problem anymore for me, and it was a constant annoyance with PHPBB forums and Blogger.

The rest of the site is just Jekyll, based around a template I bought (because I can't make a decent looking website). I've then hacked on it a lot over the years to make it do things I want (responsive images, mostly - I'm still sensitive to people on low bandwidth connections), but it's not bad at all in terms of maintenance. Just launch a render job and some scripts upload the new files.

Re: The Static Site Paradox

#106
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…

How are you handling commonality between pages with plain html pages? As long as you don’t use iframes, you have to manually sync everything that’s shared or almost the same on alle pages (header, footer, navigation). That’s pretty annoying.

Re: The Static Site Paradox

#107

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.

> There is still not a censuses as to the definition of a static website.

No server side scripting. OK to have client side scripting (e.g. JS). Basically, how things ran back in the 90's for most people who couldn't afford ASP or a paid web host.

Re: The Static Site Paradox

#110
I fit into that Paradox -- I rewrote my own personal website in modern PHP without a framework or database. It's mostly a static site but uses PHP to add headers, deal with lists (for blog posts), etc. I found it slightly more convenient to be not completely static. I can just write up an article, commit, push, and it's online. I found most static site generators to be far too complicated.

The code for a single page looks like this:

    title = "Blog Article Title";
    $this->shortTitle = "Title";
    $this->date = mktime(0,0,0,1,27,2024);
    if ($this->mode == PageMode::Meta) return;

    ?>
    

Raw HTML content here

There is a router that automatically adds the site header and footer, and I can add a "_layout.php" file to a folder to add another level of layout for child pages. For blog list page, it just scans all the individual article files in the folder to create the index. That where that $this->mode == PageMode::Meta comes in -- it executes the code in each file (to get the meta data) and then exits before rendering the rest. It's not going to scale to a lot of content but I'll adjust if it becomes an issue.

The entire PHP code for my "framework" is only 4 PHP files (init.php, functions.php, Layout.php, and Page.php).

The advantage of being a developer is that you can use code instead of configuration or data. And you can use code to write content more efficiently.

The result (still quite incomplete) is this: https://www.codaris.com/

Post reply on HN