Comment

Comment by sira04

This is quite neat. Every page is a <section id="pageid"> and css is

  section {display:none}
  section:target {display:block}
So they use the target selector which becomes active when #pageid is in the url. But the html for all the pages is outputted, so this won't scale with a big blog. I wonder how SEO is for this, and if there's a way to make this better with something like the <object> element.

I would also make it so the url was example.com/#/pageid, so the id is "/pageid". Looks a bit better I think.

parent sira04 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton