How to write a table of contents in a


I'm trying to add a table of contents into a for one of my repositories but I can't find a way to do it.

I tried to use the same syntax as GitHub, something similar to:

# Table of Contents

1. [My first title](#my-first-title)
2. [My second title](#my-second-title)
## My first title
Some text.
## My second title

But it doesn't work. Nothing happens when I click on the links generated into the ToC.

I'm running Bitbucket server 5.4. Is it possible to do such a thing please? I didn't find anything relevant into the Atlassian documentation.

Thanks for your help.


2 answers

0 votes
Gonchik Tsymzhitov Community Champion Nov 19, 2017

Hi Guillaume, 

Have you tried this tutorial for



Hope it helps.



Gonchik Tsymzhitov

Hi Gonchik,

Thank you for your help, but it doesn't answered my question. I'm not trying to create a table (I have no problems for this), but a table of contents.



In other words: a list of links to the titles inside the README.


You need to add "markdown-header-" to your link parentheses.

1. [My First Title](#markdown-header-my-first-title)

2. [My Second Title](#markdown-header-my-second-title)


This worked for me.

This didn't work for me I tried with and without `markdown-header-`

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

656 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot