How to Manage the TOC of Articles on dev.to?

github logo Updated on ・1 min read

I know there is no current standard in Markdown to write Table Of Content, but does anyone knows a trick to do it on dev.to?
Could it work by using HTML anchors?
But how can I know the future URL of the article I'm currently writing?

Any help would be welcome :)

twitter logo DISCUSS (3)
markdown guide
 

You can use inline anchors with Markdown:

## TOC
  * [Chapter 1](#chapter-1)
  * [Chapter 2](#chapter-2)
  * [Chapter 3](#chapter-3)

### Chapter 1 <a name="chapter-1"></a>

This way you don't need to know the final URL

 

Thanks for the question and the answer.
I didn't know that trick and I am going to try it in my next post.

 

Thank you! This is just what I’ve been looking for.

Classic DEV Post from Dec 31 '18

Your 2018 in Numbers

This is a great format for looking back on 2018: Ali Spittel πŸ’ @aspittel ...

πŸ‡«πŸ‡· Boris Jamot profile image
πŸ…ΏπŸ…·πŸ…Ώ πŸ…°πŸ†πŸ†ƒπŸ…ΈπŸ†‚πŸ…°πŸ…½ 🐘 + πŸ‘· = πŸš€