[Question] Generate fixed anchors from title #1227
-
Is it possible to generate fixed anchors even if the title (h2) changed? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @deanwong You can generate fixed anchors by using the following notation in your markdown source files: Before: After: The title will be updated in your static html site, but the anchor will remain fixed. My team is regularly using this notation to create a standard pattern for anchors in each section of our docs. This also allows headings with the same title to be linked by different anchors. For example: <h3 id='query-instructions'>Instructions</h3> @abourget, I believe you had the same question posted to the old Slate API Docs community page: |
Beta Was this translation helpful? Give feedback.
Hi @deanwong
You can generate fixed anchors by using the following notation in your markdown source files:
Before:
<h2 id='my-fixed-anchor'>Old Title</h2>
After:
<h2 id='my-fixed-anchor'>New Title</h2>
The title will be updated in your static html site, but the anchor will remain fixed. My team is regularly using this notation to create a standard pattern for anchors in each section of our docs. This also allows headings with the same title to be linked by different anchors. For example:
<h3 id='query-instructions'>Instructions</h3>
<h3 id='setup-instructions'>Instructions</h3>
@abourget, I believe you had the same question posted to the old Slate API Docs community page:
https://spectrum…