#slug with static pages
4 messages · Page 1 of 1 (latest)
If your using SSG you need to include a getStaticPaths() function so that Astro knows what routes to build: https://docs.astro.build/en/core-concepts/routing/#static-ssg-mode Also to use params you need a dynamic route using brackets like [slug].astro
I am using a static page eg.src/pages/house.astro. So is Astro.url.pathname the best way to get the "slug" of a static page?
For non dynamic routes yes