Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant