Skip to content

Conversation

@erbierc
Copy link
Contributor

@erbierc erbierc commented Nov 9, 2025

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!

brauliodiez and others added 30 commits October 23, 2025 10:30
@lunaria-ignore:docs/src/content/docs/es/resources/plugins.mdx

Co-authored-by: HiDeoo <[email protected]>
Co-authored-by: delucis <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: delucis <[email protected]>
Co-authored-by: HiDeoo <[email protected]>
@changeset-bot
Copy link

changeset-bot bot commented Nov 9, 2025

🦋 Changeset detected

Latest commit: f54bc1d

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

@github-actions github-actions bot added 🚨 action Changes to GitHub Action workflows i18n Anything to do with internationalization & translation efforts 📚 docs Documentation website changes 🌟 core Changes to Starlight’s main package 🌟 tailwind Changes to Starlight’s Tailwind package 🌟 markdoc Changes to Starlight’s Markdoc package 🌟 docsearch Changes to Starlight’s DocSearch plugin labels Nov 9, 2025
@erbierc
Copy link
Contributor Author

erbierc commented Nov 9, 2025

Okay, maybe it was a bad idea to sync the branches before the PR! Here are my commits:
3763950
7d5a003
b4bee23

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

Labels

🚨 action Changes to GitHub Action workflows 🌟 core Changes to Starlight’s main package 📚 docs Documentation website changes 🌟 docsearch Changes to Starlight’s DocSearch plugin i18n Anything to do with internationalization & translation efforts 🌟 markdoc Changes to Starlight’s Markdoc package 🌟 tailwind Changes to Starlight’s Tailwind package

Projects

None yet

Development

Successfully merging this pull request may close these issues.