Skip to content

Fix TypeScript errors in guides/routing.mdx code snippets#14180

Open
ArmandPhilippot wants to merge 3 commits into
mainfrom
armand/fix-routing-code-snippets
Open

Fix TypeScript errors in guides/routing.mdx code snippets#14180
ArmandPhilippot wants to merge 3 commits into
mainfrom
armand/fix-routing-code-snippets

Conversation

@ArmandPhilippot

Copy link
Copy Markdown
Member

Description (required)

Follow-up of #14089. TL;DR: Improve UX by preventing the appearance of red squiggles (TS) and visual changes (formatting with Astro extension) when the user copies and pastes the code snippet.

Fixes code snippets in guides/routing.mdx:

  • TypeScript complains about page without satisfies GetStaticPaths
  • because function getStaticPaths has been updated to const getStaticPaths above, the following code snippet should use the same syntax
  • missing closing fence
  • TS complains about post.frontmatter.tag, we need post: any
  • a few formatting changes

Related issues & labels (optional)

  • Suggested label: code snippet update

@ArmandPhilippot ArmandPhilippot added the code snippet update Updates a code sample: typo, outdated code etc. label Jun 30, 2026
@astrobot-houston

Copy link
Copy Markdown
Contributor

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/guides/routing.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.

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown

Preview deployment

✅ Deployment complete!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code snippet update Updates a code sample: typo, outdated code etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants