docs icon indicating copy to clipboard operation
docs copied to clipboard

Dynamic routes revision

Open Jutanium opened this issue 3 years ago • 2 comments

What kind of changes does this PR include?

  • New or updated content

Description

  • Closes #1631
  • Introduces the different setups and behavior for dynamic routes in SSR vs SSG
  • Introduces Astro.params alongside getStaticPaths, rather than in a separate section. This matches the tutorial, but also avoids having to repeat examples to show the full picture.
  • Removes incomplete "examples" that don't show the implementation
  • Reimplements the final example so that it works in SSR

Right now, much of the "guide"-style content for getStaticPaths is in the references section. A future PR would restructure and bring that information here.

Jutanium avatar Oct 03 '22 21:10 Jutanium

Deploy Preview for astro-docs-2 ready!

Name Link
Latest commit a7664daed1683ed6e9a33a9657c83385dcc8790b
Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/6351558757966c0008e218d5
Deploy Preview https://deploy-preview-1709--astro-docs-2.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Oct 03 '22 21:10 netlify[bot]

@delucis and @kevinzunigacuellar both liked the GitHub file routes example, and even though it isn't "a real example", it illustrates the combination of rest parameters with other named parameters really well. Added back!

Jutanium avatar Oct 04 '22 21:10 Jutanium

LGTM!

sarah11918 avatar Oct 20 '22 14:10 sarah11918