The best way to create internal links (related with sections) is create list but instead of link, put #section
or #section-title
if the header includes spaces.
Markdown
Go to section
* [Hello](#hello)
* [Hello World](#hello-world)
* [Another section](#new-section) <-- it's called 'Another section' in this list but refers to 'New section'
## Hello
### Hello World
## New section
List preview
Go to section
Hello <-- [Hello](#hello) -- go to `Hello` section
Hello World <-- [Hello World](#hello world) -- go to `Hello World` section
Another section <-- [Another section](#new-section) -- go to `New section`
HTML
<p>Go to section</p>
<ul>
<li><a href="#hello">Hello</a></li>
<li><a href="#hello-world">Hello World</a></li>
<li><a href="#new-section">Another section</a> <– it’s called ‘Another section’ in this list but refers to ‘New section’</li>
</ul>
<h2 id="hello">Hello</h2>
<h3 id="hello-world">Hello World</h3>
<h2 id="new-section">New section</h2>
It doesn't matter whether it's h1
, h2
, h3
, etc. header, you always refer to it using just one #
.
All references in section list should be converted to lowercase text as it is shown in the example above.
The link to the section should be lowercase. It won't work otherwise. This technique works very well for all Markdown variants, also MultiMarkdown.
Currently I'm using the Pandoc to convert documents format. It's much better than MultiMarkdown.
Test Pandoc here