Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Generate ids for headings in markdown #394

Open
h-lame opened this issue Aug 24, 2017 · 0 comments
Open

Generate ids for headings in markdown #394

h-lame opened this issue Aug 24, 2017 · 0 comments

Comments

@h-lame
Copy link
Contributor

h-lame commented Aug 24, 2017

I am pretty sure that markdown generators can be asked to create id attributes based on the heading values when generating HTML. For example:

# Hats

all about hats

## Caps

caps are great

## Fedoras

these are bad

## Other Full Brimmed Hats

these are probably ok

would turn into:

<h1 id="hats">Hats</h1>
<p>all about hats</p>
<h2 id="caps">Caps</h2>
<p>caps are great</p>
<h2 id="fedoras">Fedoras</h2>
<p>these are bad</p>
<h2 id="other-full-brimmed-hats">Other Full Brimmed Hats</h2>
<p>these are probably ok</p>

This would let us link directly to individual sections of a blog post (e.g. individual links in our round up posts).

I think it's an option for our markdown renderer and so something that should just be a config change, not a big engineering effort.

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