Chapter quiz · Pages & Routing

Test what you learned.

8 questions on Pages & Routing. Pass 70% to clear the chapter.

← Review chapter lessons

Quiz

Pages & Routing — Chapter Quiz

Eight questions on file routing, dynamic routes, layouts.

0/ 8
  1. Question 1
    1

    What URL does src/pages/blog/index.astro serve?

  2. Question 2
    2

    A file starting with _ in src/pages/ becomes a route.

  3. Question 3
    3

    For a static build, how do you tell Astro which [slug].astro URLs exist?

  4. Question 4
    4

    For /users/42, what is Astro.params.id?

    // src/pages/users/[id].astro
    const { id } = Astro.params;
    
  5. Question 5
    5

    A layout component renders the page content via…

  6. Question 6
    6

    How do you redirect from a server-rendered page?

  7. Question 7
    7

    Astro reads query params via Astro.params.query.

  8. Question 8
    8

    A custom 404 page lives at src/pages/_______.astro.

Pick an answer — instant feedback as you go.