I'm trying to create a link to a section of the README file of my Bitbucket repository. The following works as expected on GitHub, but not on Bitbucket. What am I doing wrong?
## Navigation
[1. GIT To Work](#git)
...
## 1. Git To Work - Working with git<a name="git"></a>
### What is git?
One peculiarity of Bitbucket's Markdown "flavour" is the way it names heading identifiers. If you inspect the HTML source of your Bitbucket README page (by default accessible at https://bitbucket.org/<username>/<reponame>
), you'll see that the Markdown section
## 1. Git To Work - Wording with git
translates to the following HTML heading element:
<h2 id="markdown-header-1-git-to-work-working-with-git">1. Git To Work - Working with git</h2>
Note that Bitbucket uses, as the value of the id
attribute, a URL-friendly version of your heading, prefixed by markdown-header-
. Therefore, you can create a link to the corresponding section, in your Markdown code, using
[Link to Git](#markdown-header-1-git-to-work-working-with-git)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With