markdown , gatsby ,

Markdown - Link within document

Abhith Rajan Abhith Rajan FollowNovember 06, 2017 · 1 min read · Last Updated:
Share this

I use markdown as the writing language for my blog posts on this website. It is clean and minimal so I prefer it over HTML.

Today I updated some content in one of my blog posts, Xamarin development - problems and solutions and in which, there is a summary of issues listed on the top and the solutions for each of them explained below one by one and there wasn't any link between the list items and the explanations.

So for better usability, I had to link them, I know how to do it in HTML and now I learned how to do it on Markdown.

To create the link,

[Link text](#some-id)

And anchor point the target area by,

<a name="some-id"></a> DETAIL SECTION

Notice the usage of "some-id" in both. You can replace "some-id" with any proper text.

Update 1 - 2nd May 2019

If you are using some kind of markdown transformer, there might be an option to make the header links automatically. Since I switched my website to Gatsby. It has a plugin called gatsby-remark-autolink-headers which does this.

If nothing worked out, the solution mentioned in this article is still valid.

Abhith Rajan
Written by Abhith Rajan FollowBuy me a coffee
Abhith Rajan is an aspiring software engineer with more than 6 years of experience and proven successful track record of delivering technology-based products and services.

Related Posts

Gatsby - Cookbook

In gatsby, cookbook, react, April 26, 2019 · 2 min read