Every directory under src/routes adds a URL segment, and a page.ts inside it becomes the page for that path:
src/routes
page.ts -> /
about
page.ts -> /about
As soon as the app has more than one route, the preview grows a URL bar. Navigate by typing a path and pressing enter, or by clicking links — links are just regular A elements pointing at a path:
A({ href: "/about" }, "About");
Your task
The home page links to /about, but that page doesn't exist yet — click the link and you'll get the 404.
- In the file tree, create the file
src/routes/about/page.ts— the + icons at the top (or on any folder row) create files and folders. - In your new file, default-export a page that returns an
H1sayingAboutand aPwith a sentence about yourself.
You're done when clicking the About link shows your heading and paragraph instead of the 404.