pages icon indicating copy to clipboard operation
pages copied to clipboard

Automatically wrap headers with anchor tags

Open arowla opened this issue 10 years ago • 3 comments

Can we use something like Redcarpet to automatically make headers in 18F pages linkable?

arowla avatar Sep 22 '15 19:09 arowla

Maybe... Haven't played with it. Might be worth a shot. But, I'm not sure that it would be a built-in feature of Pages, but something we could add to the guides_template_18f gem or something.

mbland avatar Sep 22 '15 19:09 mbland

Yeah, right after I posted I wondered if I had picked the wrong repo. :)

On Tue, Sep 22, 2015 at 3:34 PM, Mike Bland [email protected] wrote:

Maybe... Haven't played with it. Might be worth a shot. But, I'm not sure that it would be a built-in feature of Pages, but something we could add to the guides_template_18f gem or something.

— Reply to this email directly or view it on GitHub https://github.com/18F/pages/issues/40#issuecomment-142394001.

Alison Rowland Technical Lead, https://fbopen.gsa.gov | 18F 202-317-0124

arowla avatar Sep 22 '15 19:09 arowla

I have done this in JS before:

https://github.com/afeld/hackerhours.org/blob/gh-pages/scripts/anchor.coffee

I know not all Markdown parsers automatically add ids for headings, but Kramdown does by default.

afeld avatar Sep 23 '15 04:09 afeld