Live data from Hacker News

Entire website in a single HTML file

css-tricks.com

301–310 of 333 posts

Re: Entire website in a single HTML file

#301

Earlier quoted context omitted.

I’d want templating if I’m going to make more than two pages on a site.

HTML has that built in: https://developer.mozilla.org/en-US/docs/Web/Web_Components/... You'd need some JS to make use of them though.

True, but keeping to the spirit of the comment I replied to, I’d prefer it to be HTML only. Something like and it just uses a relative or absolute path.

Re: Entire website in a single HTML file

#302

Earlier quoted context omitted.

The same it is for everyone since the beginning of WWW: a static page with images. The web is uniquely unsuitable for anything else.

This is a very old fashioned point of view I’m afraid, things have moved on.

No post body was provided.

Re: Entire website in a single HTML file

#305

Earlier quoted context omitted.

I find inline links incredibly disruptive to my reading flow, the change in color makes my eyes start jumping around in the text. Wikipedia especially is absolutely hopeless, to the point where I've built a mirror that removes all inline links. (A page looks like this: https://encyclopedia.marginalia.nu/wiki/Hyperlink )

Looks good. A bit out of date though

Yeah, I think the there is a new data dump available, will rebuild the html files from that soon.

Re: Entire website in a single HTML file

#306

Earlier quoted context omitted.

Using jquery to hide and show sections is... not like OP at all. The whole point in OP is doing this without JS.

The code layout is so similar that these techniques are surely cousins (same ugly url and all). The only difference is the :target trick. Further, the no-js portion isn’t even the main idea. “Entire website in a single file” is.

No, that's not the main idea, in fact it's not even an accurate description - the entire website is not in a single file. The website loads one HTML file, one CSS file and several image files.

The whole point here is you can do instant navigation to multiple pages that are contained within a single file without using JavaScript.

Re: Entire website in a single HTML file

#307
post #295

Well, TiddlyWiki[1] has been going it for 17(!) years. It's a very mature, polished, and extensible engine for wikis, blogs, and personal knwledge bases. The entire thing (including the editor!) is a single .html file. By default, even images are embedded. For my ADHD Wiki[2], a resource that talks about ADHD with a copious amounts of relatable memes intertwined with the text, I chose to just use images in the same d…

My TW: https://philosopher.life/ I've found having it all in a single html file tends to makes it easy to survive on a lot of different kinds of networks, and I like that the larger context of the site is automatically attached to any particular part of it (which is invaluable for my work). To my eyes, it's what a PDF dreams it could be.

Also, the ability to download & email the one file that is everything it is invaluable.

Never have to worry about the editing environment when porting from one machine to another. Never have to worry about version compatibility and stuff like that.

HTML+JS are mature enough that we can reliably expect the software required to open and edit your notes (i.e., a web browser) to reliably exist in the future. Can't say the same about most other formats.

Even LaTeX, with its version-control-friendly text file format, very quickly runs into portability issues with package management. Someone gives you a .tex file - good luck trying to compile it without Internet connection.

PS: awesome website and art, thanks for sharing!

Re: Entire website in a single HTML file

#308
post #204

Earlier quoted context omitted.

So forget e-commerce? Amazon didn't do too badly and CGI was hot on the heels of HTML so I think "everyone" is a little exaggerated.

> So forget e-commerce? Says (s)he and immediately follows up with > Amazon didn't do too badly

My point is that the WWW was a lot more than static HTML and CSS pretty soon after its inception.

Re: Entire website in a single HTML file

#309
post #291

Earlier quoted context omitted.

I'm not moving the goalposts, my goalposts are exactly where they were in my first comment: The concept demonstrated in the article was not possible twenty years ago. In fact I was very specific about what concepts were not possible twenty years ago: "What's being shown off here is not having a single page of a website in just HTML/CSS, but having all pages." You're the one who proceeded to ignore that and make an un…

You can have all the pages with DHTML and using style ID/classes to select what is visible, nothing new about it, other than the artificial limitation of not using DHTML.

Of course it's an artificial limitation, the whole thing is an exercise in artificial limitation. Putting all pages in the same document is an artificial limitation.

They're artificial limitations exercised in pursuit of demonstrating that, with new CSS tools, something surprising can be done. Something which, as I stated in my original comment, could not be done twenty years ago: putting multiple pages in the same HTML file without Javascript.

Re: Entire website in a single HTML file

#310
post #171

Earlier quoted context omitted.

I have never understood why footnotes are added to the bottom when we have an interactive medium available at hand? Why not leverage and to show them in-place without breaking the flow and without listing them all at bottom? See your comment as an example. Why list all links at the bottom rather than in-place?

On my website, I ise margin notes for the desktop and "footnotes" for mobile, however said footnotes are displayed just below the paragraph in which they appear. This avoids requiring both long scrolling and interactivity.

Do you think you could elaborate on how this works? It seems like a very ergonomic alternative to traditional footnotes.
Post reply on HN