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

Enable custom ids in markdown headers #122

Open
ryyppy opened this issue Feb 25, 2020 · 0 comments
Open

Enable custom ids in markdown headers #122

ryyppy opened this issue Feb 25, 2020 · 0 comments

Comments

@ryyppy
Copy link
Member

ryyppy commented Feb 25, 2020

It would be useful for headers to be fixed on a specific anchor id, so it's easier for us to implement localization and similar features later on.

This is how reactjs.org does it: https://github.com/reactjs/de.reactjs.org/blob/master/plugins/gatsby-remark-header-custom-ids/index.js

Example:

## Some header {#some-header}

#some-header would now be the anchor id.

This is extremely useful if we decide on a localization process which requires our repo to be forked. E.g. the German version could then be like:

## Eine Überschrift {#some-header}

Without messing with the actual anchor id.
The concrete implementation would probably inlining remark-slug, keeping the original implementation but als add the new behavior as defined in the reactjs.org plugin.

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

No branches or pull requests

1 participant