Spaces in heading IDs

benthinkin's Avatar

benthinkin

16 Sep, 2014 05:47 PM

Hello all,
For friendly-link and SEO I’d like to replace spaces in <h#> IDs with hyphens instead of simply getting stripped out. Is this possible?

  1. Support Staff 1 Posted by Brett on 16 Sep, 2014 05:52 PM

    Brett's Avatar

    You can do two things. If you use the Discount (GFM) processor, you'll
    get that automatically. If you're using MultiMarkdown, you can use
    [header-id] to define your own ids.

    ## This is my header [this-is-my-header]

    Will turn into the header with an id of "this-is-my-header"

    -Brett

  2. 2 Posted by benthinkin on 16 Sep, 2014 05:59 PM

    benthinkin's Avatar

    Worked like a charm. Thanks!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac