Skip to content

docs: Restore custom heading anchors#29092

Closed
armandomontanez wants to merge 3 commits intobazelbuild:masterfrom
armandomontanez:restore-heading-anchors
Closed

docs: Restore custom heading anchors#29092
armandomontanez wants to merge 3 commits intobazelbuild:masterfrom
armandomontanez:restore-heading-anchors

Conversation

@armandomontanez
Copy link
Contributor

Restores custom heading anchors to mdx files in a syntax that Mintlify supports.

RELNOTES: None

Restores custom heading anchors to mdx files in a syntax that Mintlify
supports.
@armandomontanez
Copy link
Contributor Author

@fweikert @alan707 Support for custom heading anchors is documented here: https://www.mintlify.com/docs/guides/linking#custom-anchor-ids

Might be new?

@fweikert
Copy link
Member

Nice! However, I noticed that some header IDs were not restored (see comment).

Is there a script you can share? We also need to fix the header IDs in the versioned docs.

Restores more heading anchors in cases where {{}} blocks or <> blocks
were different across md and mdx files.
@armandomontanez
Copy link
Contributor Author

Script is here: https://github.com/armandomontanez/bazel/tree/script-to-restore-custom-heading-anchors

LMK if you want me to actually add it to the PR.

@fweikert
Copy link
Member

Ok, thanks for the link. I'm importing this change now.

@fweikert fweikert self-assigned this Mar 25, 2026
copybara-service bot pushed a commit that referenced this pull request Mar 25, 2026
Now that Mintlify supports custom header IDs (https://www.mintlify.com/docs/guides/linking#custom-anchor-ids)
we can bring them back.

This change was generated by a Python script that read custom header IDs from the old .md docs and applied them to the corresponding .mdx files.

It ignores unversioned files since they've been handled as part of #29092.

Fixes bazel-contrib/bazel-docs#252

PiperOrigin-RevId: 889198500
copybara-service bot pushed a commit that referenced this pull request Mar 25, 2026
Now that Mintlify supports custom header IDs (https://www.mintlify.com/docs/guides/linking#custom-anchor-ids)
we can bring them back.

This change was generated by a Python script that read custom header IDs from the old .md docs and applied them to the corresponding .mdx files.

It ignores unversioned files since they've been handled as part of #29092.

Fixes bazel-contrib/bazel-docs#252

PiperOrigin-RevId: 889417595
Change-Id: I9a76c0104ba46f9c8af963758914265c3541002b
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.

2 participants