Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(): set onBrokenAnchors to 'throw' and fix all errors #1329

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

alicewriteswrongs
Copy link
Contributor

Docusaurus has an option called onBrokenAnchors which, as the name suggests, controls how it should handle anchors which do not resolve to a heading in the page to which they link.

This sets the option to throw, so that the build will fail if we have a broken anchor on a link.

It turns out we have quite a few! So this PR also fixes them.

A neat think is that it will even check the to prop of Docusaurus' built-in <Link> component in a React component, which caught a typo on our lifecycle methods chart. Neat!

@alicewriteswrongs alicewriteswrongs requested a review from a team as a code owner January 22, 2024 21:50
@alicewriteswrongs alicewriteswrongs requested review from christian-bromann and tanner-reits and removed request for a team January 22, 2024 21:50
Copy link

vercel bot commented Jan 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
stencil-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2024 8:56pm

Copy link
Member

@tanner-reits tanner-reits left a comment

Choose a reason for hiding this comment

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

Good to get those fixed!

This sets the `onBrokenAnchors` option for our Docusaurus config and
then fixes all of the build errors that it surfaced. These mostly had to
do with casing issues, like `#formAssociated` should be
`#formassociated`.

STENCIL-1096
@alicewriteswrongs alicewriteswrongs merged commit 5aea1b9 into main Jan 24, 2024
4 of 5 checks passed
@alicewriteswrongs alicewriteswrongs deleted the ap/anchors branch January 24, 2024 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants