Live data from Hacker News

Entire website in a single HTML file

css-tricks.com

111–120 of 333 posts

Re: Entire website in a single HTML file

#111

I love the simplicity of this so much, I built a whole CMS using that, with markdown and a single HTML file! https://github.com/arnaudsm/raito

The difference is they don't use javascript, a point many commenters apparently missed. This is similar how you can make drop-down header menus in css only - no javascript. Implementing css dropdown menus was one of my first big web dev tasks, since many users still had computers that slowed to a crawl when javascript and dom manipulation were involved.

Re: Entire website in a single HTML file

#112

Earlier quoted context omitted.

I think you've just described an EPUB?

I thought epub files were basically zip archives of all the required files

You could make an ePub of a single HTML file with all the binary blobs embedded.

Re: Entire website in a single HTML file

#113

Earlier quoted context omitted.

I think you've just described an EPUB?

I thought epub files were basically zip archives of all the required files

ePub, as with PDF, is a container-file format. (A ZIP file with a specified structure.)

If you want to consider that single or multiple files ... quickly veers into semantics.

Re: Entire website in a single HTML file

#115
post #96

Earlier quoted context omitted.

I had the same reaction. It would be like telling someone who has been using an IDE: did you know you can compile your code from the command line? And having that person genuinely be blown away.

https://xkcd.com/1053/

Except instead of being something cool like "diet coke and mentos" this is something basic that webdevs should be familiar with.

Re: Entire website in a single HTML file

#117
post #84

HTML and CSS alone are really powerful. I decided not to use any JS on my personal site, but you can still have: + collapsible sections with `details` and `summary`[0] + footnotes, with navigation to/from with anchor tags. You can even apply CSS on the currently selected footnote.[1] + Semantic web that is compatible with everything and has sensible defaults so you can focus on what you're actually doing! + Tiny depl…

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

You can run React (and everything else) off a CDN.

Re: Entire website in a single HTML file

#119
post #101
post #84

HTML and CSS alone are really powerful. I decided not to use any JS on my personal site, but you can still have: + collapsible sections with `details` and `summary`[0] + footnotes, with navigation to/from with anchor tags. You can even apply CSS on the currently selected footnote.[1] + Semantic web that is compatible with everything and has sensible defaults so you can focus on what you're actually doing! + Tiny depl…

nice. most sites that use javascript don't need to... https://i.imgur.com/qaJYWit.png

I’m not sure that Google Maps is the best example of something that should work well without JS.
Post reply on HN