To make links between your Markdown files just use a relative path to the other Markdown file. The configuration you copy pasted in your _config. yml provides a plugin to convert those URLs. So your Markdown files will have correct links both in Github and Github Pages.
Links. You can create an inline link by wrapping link text in brackets [ ] , and then wrapping the URL in parentheses ( ) . You can also use the keyboard shortcut Command + K to create a link.
This works on Github:
## Title
### Place 1
Hello, this is some text to fill in this, [here](#place-2), is a link to the second place.
### Place 2
Place one has the fun times of linking here, but I can also link back [here](#place-1).
### Place's 3: other example
Place one has the fun times of linking here, but I can also link back [here](#places-3-other-example).
Summary of the conversion rules:
-
A good example document with plenty of links and formatting is LivingSocial API Design Guide
It's also possible to create named custom anchors, if for example you have a bunch of (sub-)headings with the same name. To do this with a header insert an HTML tag:
<h4 id="login-optional-fields">
Optional Fields
</h4>
Then link to it by the ID attribute:
[see above](#login-optional-fields)
Also adding an anchor tag directly to the document works as well:
<a id="my-anchor"></a>
Copied from GitHub Gist - the original post located here
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)
example 1:
##Title
###Place 1<span id="place1">HelloWorld</span>
Hello, this is some text to fill in this, [here](#place2), is a link to the second place.
###Place 2<span id="place2">HelloWorld</span>
Place one has the fun times of linking here, but I can also link back [here](#place1).
Here is a version that could jump from place1 to place2 and jump from place2 to place1
##Title
###[Place 1](#Place-2)<span id="place1">HelloWorld</span>
Hello, this is some text to fill in this, [here](#place2), is a link to the second
place.
###Place 2(#Place-1)<span id="place2">HelloWorld</span>
Place one has the fun times of linking here, but I can also link back [here](#place1).
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