You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add codemod to migration script that and preserves id attributes from HTML to markdown.
Commonly, content authors add custom ID attributes to <h2> and <h3> elements, which are then used to direct link to that section of the page. We'd like to preserve these IDs on migration.
Acceptance criteria
As a developer I can run the migrate script and headings in .mdx files retain the id if it exists
We'll either need to create our own remark plugin to fix this, or wait until we official support from either gatsby-remark-autolink-headers or @mdx-js/mdx. Judging by this comment I suspect the change will need to happen on the Gatsby end.
This change may or may not happen anytime soon (still waiting to hear back on the Gatsby side). We might consider patching this ourselves in the interim.
Summary
Add codemod to migration script that and preserves
id
attributes from HTML to markdown.Commonly, content authors add custom ID attributes to
<h2>
and<h3>
elements, which are then used to direct link to that section of the page. We'd like to preserve these IDs on migration.Acceptance criteria
id
if it existsHelpful links
Example: many h2 and h3
Example: h4 inside collapser
The text was updated successfully, but these errors were encountered: