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.
There is a caveat which is missed on here, doing this doesn't change the header anchor to
custom_anchor_name
, the header will stay as it's written, what it actually does is creates a new anchor link above the header for you to link to instead. But this doesn't account for the Github users knowing this, and clicking the header link to grab it's URL.I wish there was a way to actually change the header anchor instead of doing this, but doesn't look like there is.