Skip to content

Conversation

openscript
Copy link
Contributor

@openscript openscript commented Sep 15, 2025

Add section on accessing route data and example code for getStaticPaths.

Description (required)

This documents the proposal to make routePattern available in getStaticPaths. With routePattern it's possible to dynamically calculate the params that getStaticPaths returns. Before it was not possible to access the routePattern because getStaticPaths is executed at a time when Astro.routePattern is not available.

Related issues & labels (optional)

For Astro version: 5.15. See astro PR #13520.

Known as openscript in Discord.

Add section on accessing route data and example code for getStaticPaths.
Copy link

netlify bot commented Sep 15, 2025

Deploy Preview for astro-docs-2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 7e6cbbd
🔍 Latest deploy log https://app.netlify.com/projects/astro-docs-2/deploys/68cc621acf2cf500085debc8
😎 Deploy Preview https://deploy-preview-12316--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 project configuration.

@astrobot-houston
Copy link
Contributor

astrobot-houston commented Sep 15, 2025

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
en/reference/routing-reference.mdx Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great @openscript ! Thank you for providing such a clear starting point for these docs! 💪

I had some thoughts below for your consideration, and some questions. You are the subject matter expert here, and I'm just suggesting some words that would make this "sound like" Astro Docs, but I'll need to rely on you to confirm some things and make this accurate! 🙌

Then, when we're happy here, we'll tackle the changeset in the Astro PR where we really get to hype how cool this is, introduce it to the world, and encourage people to use it! 🚀

@sarah11918 sarah11918 added add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!) labels Sep 15, 2025
Copy link
Member

@ArmandPhilippot ArmandPhilippot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As Sarah said, this looks great. I mostly answered Sarah's suggestion and also give some ideas to improve the code snippet used as example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants