Live data from Hacker News

The theory versus the practice of “static websites”

utcc.utoronto.ca

131–140 of 221 posts

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

#131
post #97

I've been exploring an architectural pattern for a few years now which I think gives you the best of both worlds: it lets you run dynamic server-side code, but in a way that's both extremely inexpensive to scale up and that is self-healing if anything breaks. I call it the Baked Data pattern: https://simonwillison.net/2021/Jul/28/baked-data/ The key idea is that you deploy a full read-only copy of your site's data as…

I’ve been following this pattern and now it has a name! I host my projects page like this (https://usmanity.com/projects). I didn’t want to edit an html file each time I wanted to add new projects to the list or change the details on an existing one so I used Notion and I bake the data before committing to GitHub.

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

#132

At my agency we probably build two custom sites a month. We used to do this with PHP WordPress templates, then we moved to Nuxt server side rendered on Node (Heroku), but now we are all static site Nuxt on Netlify and it’s SO MUCH better. Headless WordPress as backend. As long as you/client can deal with the build times it’s fantastic from a speed, SEO and uptime POV. Also just way cheaper to host it. Incremental Sta…

You are actually running a Wordpress site with a reverse proxy cache with forever TTLs. The fact that the cache is implemented as HTML on a file system is incidental. You could deliver the same speed, SEO, and uptime with any such technology, such as putting a regular Wordpress site behind Cloudflare or Fastly with forever TTLs and running a cache warming script.

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

#133
Recently, while talking to a friend who hosts her website on Wix, I noticed that she was using it as a portfolio website and I asked what wix-specific features she was using and her answer was "domain management" and this got me thinking...what if the steps were pretty straight-forward, could someone who is not a web dev or technical get a website up on github? So I started putting together a template that looks very similar to her website and also includes instructions on how to host it on Github Pages for $0/year versus what she is currently paying Wix at around $100/year. The template is here: https://github.com/usmanity/rose

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

#134
post #62

Earlier quoted context omitted.

but then formatting is awful in markdown, especially with all the template and tag syntax you add there which sometimes take more space than the actual words they mark up, and also due to all the tags you can't search/find/replace across the entire content, how do you find a "__bold__ in a phrase" or "bold in a __phrase__" reliably?

> how do you find a "__bold__ in a phrase" or "bold in a __phrase__" reliably? Can't you use regex? _[^_\n\r]+_ edit: I think double underscores are easier, you should be able to use __.+__ and there's no reason to have to avoid matching single_underscore words.

I meant searching for a "bold in a phrase" phrase when it can have various markup in arbitrary places (also, it's not just __, you might have some other valid marker) But anyway, you can't really use regex here as it's too complicated and error prone for such a frequently needed operation, you need a better mechanism line index or a built in functionality to ignore all markup

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

#135

Recently, while talking to a friend who hosts her website on Wix, I noticed that she was using it as a portfolio website and I asked what wix-specific features she was using and her answer was "domain management" and this got me thinking...what if the steps were pretty straight-forward, could someone who is not a web dev or technical get a website up on github? So I started putting together a template that looks very…

Just let her use the tool designed for her demographic and you use the tool designed for yours.

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

#136

Earlier quoted context omitted.

Indeed. These days we have 24x7 net connections on both our mobiles as well as home LAN/desktop whatever, but you still can't get a single, 1-click, drop-dead simple program that you can use to both author as well as serve web-pages and images right from your own device. Thanks largely to dynamic IPs, NAT, firewalls, ISP upstream throttling and developer apathy (since their livelihood may depend on the complexity of…

This isn't the only reason. People who are trying to get attention will flock to where attention is directed. For better or worse, centralized platforms are a good place to do that. It's the same reason protestors, charity drives, people handing out free tickets to a new concert venue, do this in downtown parks and public squares, not their front yards. Popular photographers hold shows in galleries, not their own liv…

A really popular photographer might hold a show in their own house and invite people. People who matter would go.

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

#137
post #90

the very important thing about static sites are that you can much more easily "fire and forget" a static site - put it up on an S3 bucket site or whatever and you are pretty much in the clear about worrying about it. put up a "fire and forget" site using any kind of PHP or (perish the thought) wordpress (assuming self hosting), and if you dont check that site a few times a year, it will be all Russian porn ads before…

And if you dont get hacked you risk that your site is just offline due to something breaking down (maybe the db needs to be restarted, maybe the webhost changed php version etc). I got a couple of static sites and it so nice to know they are always up and never need to be fixed. My dynamic sites on the other hand needs to have alerts to check if they go down.

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

#138

I think one big missing part still with static sites is how you host the CMS to edit it. Correct me if I'm wrong but Decap CMS (previously Netlify CMS) runs in the browser and makes reads/edits via GitHub which can then trigger rebuilds and deploys, but it still needs a small server/proxy I think because CORS stops your browser communicating directly with the GitHub API. Netlify hosts a GitHub backend that proxies re…

> I think one big missing part still with static sites is how you host the CMS to edit it. This problem is completely solved by Surreal CMS [1]. Make your website anyway you want, connect surreal by FTP and let the user/client edit what you permit them to edit. The cost $12 per month is dirt cheap for never having to worry about it, and giving non-tech users a total WYSIWYG editor. [1] https://www.surrealcms.com

It's open source? I'm looking for an open source solution.

You never know when they'll change their pricing, like when Forestry was recently deprecated in favour of Tina CMS with more limited free plans.

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

#139

Earlier quoted context omitted.

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…

> Static makes so much sense for sole-author sites with technical owners. Totally agree for this narrow use case. But you're also correct that if you're a startup with a marketing site--going the Gatsby/Hugo/etc. route is a total disaster. Have seen so many technical founders make this mistake. What happens is you realize, crap, my team needs to publish content for SEO and build new landing pages...and they aren't ab…

They need Cloud Cannon!

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

#140

Recently, while talking to a friend who hosts her website on Wix, I noticed that she was using it as a portfolio website and I asked what wix-specific features she was using and her answer was "domain management" and this got me thinking...what if the steps were pretty straight-forward, could someone who is not a web dev or technical get a website up on github? So I started putting together a template that looks very…

Just let her use the tool designed for her demographic and you use the tool designed for yours.

There’s no harm at all in putting effort into building a tool which might suit the former, on top of the latter. That’s more or less how all software for non-technical people is built: simplifying a more complex technical solution to make it accessible for the intended audience.
Post reply on HN