To create anchor links that jump down to different sections of a README (as in an interactive table of contents), first create a heading:
#Real Cool Heading
The anchor link for that heading is the lowercase heading name with dashes where there are spaces. You can always get the anchor name by visiting the README on Github.com and clicking on the anchor that appears when you hover to the left of the heading. Copy everything starting at the #:
#real-cool-heading
Wherever you want to link to your Real Cool Heading section, put your desired text in brackets, followed by the anchor link in parentheses:
[Go to Real Cool Heading section](#real-cool-heading)
See! Easy: Go to Real Cool Heading section
#Real Cool Heading
This is a real cool heading with some real cool content.
SUCCESS AT LAST!
So I got it to work for VSCode extensions & CHANGELOGS, however, the HTML Attribute
name
fails to work in the VSCode Markdown-preview env.This is the exact code I used, except that the comment was replaced with a bunch of CHANGELOG.md entries.
If you want to see the actual formatting of the links in a working document, just install the VSCode extension recently released by Microsoft that allows developers to browse the contents of other developers published extensions: Browse Extension's Publish Contents.
You can probably find the links working in other extensions, but I can guarantee you that you will find working versions of the anchor-links located in the theme that I just published: JAYD3V.developers-dojo