From the article:
> Accept that sometimes, or for some people, your JavaScript will not work. Put some thought into what that means. Err on the side of basing your work on existing HTML mechanisms whenever you can
As you have observed, disabling JavaScript does not make the site stop working entirely for no reason. It degrades meaningfully, and the author put thought into what that means
Moreover, enabling JS does not break browser functionality you're used to.
That's the entire point.
Such is the case for most JS sites, the site typically doesn't break "entirely", but I consider being unable to post or even read comments to be a major functional breakdown. Comments are non-interactive text, there's no justifiable reason why I should need JS to read them.
For a blog? I disagree, because the point of a blog is to read the author’s comments, not those of third parties.
> Comments are non-interactive text, there's no justifiable reason why I should need JS to read them.
I kinda agree. The issue is that it is very rare to find a static site generator which can interface with a dynamic comment storage. To be honest, I don’t know that one exists, although of course it is completely possible. I can understand as a pragmatic matter why someone might have a static blog, want to add comments and not be willing to run his own dynamic comment system, esp. if that would entail writing said system.
All that being written, it would be awesome to have a static site generator which were called by a hook in a dynamic comment server. I actually would like to write one someday!
The author has posted several comments in the comment section, so even by your definition the blog fails to meet functional standards. However, IMO, the distinction between the author's comments and user comments is arbitrary, both are text meant to be read by readers, and those readers without JS are missing a ton of discussion that's happening in the comments, including discussion with the author. There's actually more to read in the comment section than in the blog post itself.
> All that being written, it would be awesome to have a static site generator which were called by a hook in a dynamic comment server. I actually would like to write one someday!
I have actually seen a system like this implemented at company I used to work for. A posted comment would be stored in a sqlite database before a request to rebuild the comment section is fired (as a partial, to avoid re-rendering the whole page/site), subsequently dumping the new build into the CDN (with some debounce logic to throttle high comment traffic). The rebuild was typically sub-second and performed very well.
Though I wonder if the prevalence of programmable edge networks will leapfrog that before it becomes really mainstream, and allow site owners to add a small bit of edge dynamism to pull dynamic content in without client-side JS.
[0] - https://disqus.com/home/discussion/veekun/maybe_we_could_ton...
The difference between the server-side option and the outsourced one is that the outsourced one is probably also going to soak up and resell a lot of data that you probably wouldn't have captured yourself.
Everything else on the site seems to uphold to his principles.
Any time I tried doing that, 99.9% of comments were spam. Seriously.
[ ] i am not a robot
I’ve yet to see a real guide from someone building an even moderately complex site and moving away from these terrible frameworks and “unnecessary JS”.
In the end most of these boil down to “I wish other people would build their sites the way I want them to” without much consideration of how / why a site is the way it is in the first place.
Plus, even if you're really careful and make something that is judicious with JS, phone users come in and blow everything up. For example, leaving a review could be done JS free buy opening a dedicated review view, and if the end user needs to refer back to the product, they can open a new tab. It's not so easy with a phone, unless they have really strong phone browser kung fu.
I would have thought that by now we would have settled on broad conventions for most things so nobody would be inventing all new ways of doing the basics. Instead is seems like things are proliferating. If there are any standards, they're top-down things from Big Corporations like Twitter or Google, because they have the muscle to force everybody to use their conventions and like it.
And it's a pretty big and functional site.
I've looked at the source code and it's very straightforward Flask apps and Jinja templates, and hand-written JavaScript.
https://sr.ht/~sircmpwn/sourcehut/sources
For people who don't remember, the result is very similar to how Google looked ~15 years ago -- Google News, Froogle, search results, etc. The underlying tech was different, but the result is the same. Google just used C++ and the "google-ctemplate" language.
----
I wish that every food ordering app was written like this.
I mean all they are doing is displaying a list of pictures and then providing a checkout experience -- it's literally eBay from 1998, but 1000x slower.
It would also be like 10x faster than a native app on phone if it were written like that.
In fact Google has a lightning food ordering app right on the search results page that proves the point! However I tend not to use it because I don't think it's good to let the search provider "hijack" the traffic intended for restaurants. i.e. presumably the restaurant will put their preferred vendors on their sites, which is almost never Google, and is instead some really slow and janky app :-(
I'd say that's more impressive than loading the counterpart of multiple novels for mostly the same functionality.
The problem are most other sites that often don't even load or show any content without JS support, or break in many creative ways. Although for weirdness you only need to disable custom fonts in the browser, and suddenly Reddit's notification button shows the Paypal logo and many websites have random chinese symbols scattered around the UI. And Google Translate looks like you need a translator to use it.