Live data from Hacker News

The theory versus the practice of “static websites”

utcc.utoronto.ca

171–180 of 221 posts

Re: The theory versus the practice of “static websites”

#171
post #148

My personal website is an odd mix of static and dynamic; that is, it's mostly static, but the blog portion is dynamic. When you hit a blog URL, it fetches a Markdown file from the disk, converts to HTML, and then jams that HTML into a template which provides the rest of the page, brings in CSS, etc. It's still fast and efficient; when one of my blog posts was #1 on HN last week, my friend texted me "good luck, hope y…

I think people underestimate how fast computers are now. You can easily withstand Hacker News with a small VPS as long as you have a sane architecture that isn’t too database heavy.

Yeah, if you launch Threads you need whatever it is Facebook does to scale. But for a regular read only site? You don’t need to spend very much at all.

Re: The theory versus the practice of “static websites”

#172
post #3

I run a content website for a living. This year I switched from Craft CMS to my own static site generator. I no longer think about the server or the CMS. I no longer need to keep it updated. I got rid of the heavy database and the elaborate caching setup. Now it's just a static file server. If it was just the blog it would be even easier to host. The website is more reliable and requires virtually no maintenance. The…

Static makes so much sense for sole-author sites with technical owners. Would be great to make the tech more accessible to those without the skills to recompile and deploy. It's such a fast and affordable way to build websites, but existing tools like Hugo assume a lot from users that can put the tooling out of reach. (Enjoyed your write-up too. I wrote the original version of html-to-markdown that you used in your m…

I was just thinking about how much trouble it would be to onboard an employee. Markdown is not rocket science, but getting the SSG to run? Committing files? Oh boy.

On the other hand, it's great for me, because I don't need to babysit a database or maintain hosted software. I can go on vacation and not worry about anything.

Re: The theory versus the practice of “static websites”

#173

Earlier quoted context omitted.

I agree completely with this thought. So many people jump right to a wordpress because it can be "easy" (and as an EE, even figuring out the details of Hugo was pretty confusing for what basically amounts to an evening hobby). When I first started putting together my website [0] I considered the tradeoff between static and "dynamic", but constrained myself to the former because I didn't want to pay extra for hosting…

Hugo’s documentation site is poor. WordPress installation is a beast and involves getting PHP, Apache, and MySQL installed, which are each nontrivial. Hugo only seems more intimidating than WordPress because of the size of the documentation gap.

Yeah, I'd agree with that. Even when just setting up the Disqus comments the other day I found the docs lacking. This would probably be less of an issue making Hugo config changes was something I did more than a couple of times per year.

Re: The theory versus the practice of “static websites”

#174
I think the worst part of dynamic (JS) websites is the air gap between client and server. Its so painfully obvious compared to a static site. The Data flow feels like client->transform->api->transform->server->db->server->transform->api->transform->client, the song and dance just gets old after a while.

I stupidly started my API interface as just a million unstructured JSON endpoints, each one with its own requirements / json structure / cache strategy / etc. The amount of work that essentially feels like boilerplate is mind-numbing.

I haven't looked around for better alternatives very much, but I would be greatly interested in technology that makes the client/server boundary feel nonexistent, without needing to totally upend your current stack with a brand new framework like Next or something. Just a drop-in library that makes the server feel like another clientside API. I have no idea how that would be done without excessive coupling of the client/server though.

Re: The theory versus the practice of “static websites”

#175
post #3

I run a content website for a living. This year I switched from Craft CMS to my own static site generator. I no longer think about the server or the CMS. I no longer need to keep it updated. I got rid of the heavy database and the elaborate caching setup. Now it's just a static file server. If it was just the blog it would be even easier to host. The website is more reliable and requires virtually no maintenance. The…

I read your Ursus page with high interest. Do you plan on sharing the source/scripts/github? Do you plan on monetizing it? Personally, it sounds like something that would be great to check out.

It's on https://github.com/nicbou/ursus. A slightly older version is on pypi. It's been running for a few months now, but only for two websites.

Re: The theory versus the practice of “static websites”

#176
post #3

I run a content website for a living. This year I switched from Craft CMS to my own static site generator. I no longer think about the server or the CMS. I no longer need to keep it updated. I got rid of the heavy database and the elaborate caching setup. Now it's just a static file server. If it was just the blog it would be even easier to host. The website is more reliable and requires virtually no maintenance. The…

> Now it's just a static file server. If it was just the blog it would be even easier to host. The website is more reliable and requires virtually no maintenance. Same here, I'm using Sphinx and loving it ! I very much appreciate the ability to get all nitty gritty whenever I want to implement something "special" like the Favorite Git Aliases post which when edited gets turned into a .bash_aliases file and pushed to…

This is the fun part with simple text files. I built a linter for my content that runs like unit tests.

I love your idea. It's very clever!

Re: The theory versus the practice of “static websites”

#177
post #19
post #3

I run a content website for a living. This year I switched from Craft CMS to my own static site generator. I no longer think about the server or the CMS. I no longer need to keep it updated. I got rid of the heavy database and the elaborate caching setup. Now it's just a static file server. If it was just the blog it would be even easier to host. The website is more reliable and requires virtually no maintenance. The…

This is very interesting. Impressive how much efficiency and performance is gained. This also means that fewer resources (electricity) are consumed, that less bulky hardware is used and, most importantly, that security is improved. A static website is more difficult to attack and the only possible flaw is in the web server and not in the code of the website. I usually use Hugo. It is very complete and rich in feature…

I have a robot vacuum cleaner that runs linux, and it CAN run a Caddy server. I managed to get a website running on it last time. Now that my websites are static I'm tempted to host my personal blog on it.

I try to keep things simple. Simple websites are fast and reliable. Turbo seems to be a departure from that. Since the heaviest part of my pages is the text, it would not help much.

Re: The theory versus the practice of “static websites”

#178
post #115
post #3

I run a content website for a living. This year I switched from Craft CMS to my own static site generator. I no longer think about the server or the CMS. I no longer need to keep it updated. I got rid of the heavy database and the elaborate caching setup. Now it's just a static file server. If it was just the blog it would be even easier to host. The website is more reliable and requires virtually no maintenance. The…

I found my way to this page on your site: https://allaboutberlin.com/guides/movies-set-in-berlin There's a typo in the TOC. … is being rendered literally I'm guessing because the ampersand is escaped accidentally. Also a few you might add to the list: Berlin Alexanderplatz (1980), Possession (1981), Gotcha! (1985), Suspiria (2018), Undine (2020)

This is probably a remnant from the content migration. I have a few of those before. Thanks for the heads up!

And yes, that page is woefully outdated. It's also missing One Two Three, Babylon Berlin, Dark (kind of) and many more.

Re: The theory versus the practice of “static websites”

#179
post #49

Earlier quoted context omitted.

An edited site could also (mostly) be static if edits pushed / queued a job to publish the updated static content. Ideally a casual visitor would never see non-static content, other than possibly dynamic addins that mix the data client side if they have an active account.

CMV: if you're running code on the server anyway, there's no advantage to having all the precomputed header+content+footer combinations. You may as well run a script that combines the generic header + specific content + generic footer at request time. The advantage of static sites is that you don't have to worry about any server scripting at all.

One benefit is that python scripts are easier to run on a dev machine than nginx. These days I rarely run the whole website with docker, just the Python static file server with `ursus -s`. It made a huge difference on my slow machine. I could listen to music and work at the same time without bringing the machine to a crawl.

Re: The theory versus the practice of “static websites”

#180
post #3

I run a content website for a living. This year I switched from Craft CMS to my own static site generator. I no longer think about the server or the CMS. I no longer need to keep it updated. I got rid of the heavy database and the elaborate caching setup. Now it's just a static file server. If it was just the blog it would be even easier to host. The website is more reliable and requires virtually no maintenance. The…

I love your Berlin site! It’s so clean, useful, and informative. May I ask how the revenue works? I just like that it’s not polluted with ads.

Affiliate marketing. I am just bery careful about which products I mention and how. People need a bank account, health insurance, liability insurance, etc. I get a cut when I refer them to a business. I work with pretty much every business though, so I don't need to sell anything.
Post reply on HN