Skip to content

Conversation

@erbierc
Copy link
Contributor

@erbierc erbierc commented Nov 9, 2025

Created a new PR, as the previous one (#3542) was synced with main, thus making reviewing it a pain.

Description

  • Closes #N/A - follow up to Don’t generate invalid meta tags in <head> #3496
  • What does this PR change? Give us a brief description.
    In a previous PR, I have added tests to the invalid canonical changes. This required me to include additional arguments to getRouteDataTestContext and getTestHead functions. This refactor is meant to make these changes more readable and developer friendly by adding an options object to both of them. This PR also makes sure all usage of these functions are updated as well. As of now, all tests pass.
type GetTestHeadOptions = {
	heads?: HeadConfig,
	route?: Route | undefined,
	setSite?: boolean
}

Here, route has an additonal | undefined because of the 'includes description based on page description frontmatter field if provided' test in the same file (TypeScript doesn't like it without that).
Other options object type added:

type RouteDataTestContextOptions = {
	pathname?: string,
	setSite?: boolean
}

Note: I have placed the new types above these functions. If I need to move them, or if you would prefer interfaces instead, I'd really like to know!

@changeset-bot
Copy link

changeset-bot bot commented Nov 9, 2025

🦋 Changeset detected

Latest commit: b4bee23

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/starlight Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented Nov 9, 2025

Deploy Preview for astro-starlight ready!

Name Link
🔨 Latest commit b4bee23
🔍 Latest deploy log https://app.netlify.com/projects/astro-starlight/deploys/6910f0962dfa5d000856ec47
😎 Deploy Preview https://deploy-preview-3543--astro-starlight.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

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

Labels

🌟 core Changes to Starlight’s main package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants