It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Markdown internal links support in Bitbucket Server

Pavel Smolkin Jun 07, 2017

Is it possible to use internal links in Markdown files?

None of these ways works in version 4.14:
 
[Link Title](#markdown-header-testlink)
[Link Title](#testlink)

some text
........

# Testlink
some text

 

5 answers

1 accepted

3 votes
Answer accepted
Jeff Thomas Atlassian Team Jun 07, 2017

Hi Pavel,

Yes this is possible. In your Markdown create a link at the top:

[link](#section)

and in the body of your document, create the anchor:

<a name="section"></a>

 

Pavel Smolkin Jun 07, 2017

Great! It works. Thanks!

JJ Lin Nov 28, 2017

This doesn't seem to work in Bitbucket 5.3.2. Is there a different solution for that version?

Joseph Kobti Dec 08, 2017

if you found any solution please tell me :) 

JJ Lin Dec 08, 2017

This issue is supposedly fixed in Bitbucket Server 5.3.4 and 5.4.2, but I don't currently have access to either of these versions to verify. See https://jira.atlassian.com/browse/BSERV-10210 for details.

Johnny Mao Sep 05, 2018

This works for me on v5.11.1 Bitbucket Server.

Rafael García Sep 11, 2018

It is not working for me. It is rendering <a name="target"></a> as text and no navigation. I can navigate with other markdown viewers.

Like zorantus likes this
Kelly Vernon Sep 21, 2018

Same as @Rafael García for me

Ian Colwell Sep 24, 2018

I am also experiencing the same issue as @Rafael García describes.

Ben Kermode Sep 25, 2018

Same as Rafael

Functionality still broken!!! :/

Shinichi Okada Jan 04, 2019

Same as Rafael It just shows a text.

3 votes
Arito Melito Oct 24, 2018 • edited

For me it works like this:

[Configuration](#markdown-header-configuration)

The difference between the above and the solution proposed by @Hajaniaina R (web) is that I am omitting the README.md

3 votes
Konstantin Selyunin Feb 06, 2019 • edited

The `<a>` tag in the header file did not work in my case (Feb. 2019).

 

What I did let the README.md file rendered as-is and then right-click the corresponding header I wanted to link to, choose inspect from the context menu (I use chrome, choose the similar option in your browser).

 

You will see generated html similar to the following:

<h1 id="markdown-header-your-awesome-header">...

 

Use then this ID tag to link to the header from your code like:

[this is my link](#markdown-header-your-awesome-header)

 

Arnold Yang I'm New Here Mar 15, 2019

This is the one, folks! Nice one, Konstantin.

Troy Weber Wednesday

Yea, that works, but that requires manually a edited README (so no typedoc with markdown theme) and frankly it breaks the markdown standard. What a bummer.

2 votes
Hajaniaina R (web) Jun 07, 2018

We can do something like this

PS: we must add "markdown-header-"  before the id of section

* [Configuration](documentation.md#markdown-header-configuration)

 

# Configuration

Johnny Mao Sep 05, 2018

This did not work for me, but the above ref using html <a> tag did work: 

https://community.atlassian.com/t5/Bitbucket-questions/Re-Markdown-internal-links-support-in-Bitbucket-Server/qaq-p/595055/comment-id/16929#M16929

v5.11.1 bitbucket server.

0 votes
Benedict Asamoah I'm New Here Jan 06, 2019

Add the text "[TOC]" to the beginning of the document for it to be generated.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

1,960 views 1 19
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you