Github automatically parses anchor tags out of your headers. So you can do the following:
[Custom foo description](#foo)
# Foo
In the above case, the Foo
header has generated an anchor tag with the name foo
Note: just one #
for all heading sizes, no space between #
and anchor name, anchor tag names must be lowercase, and delimited by dashes if multi-word.
[click on this link](#my-multi-word-header)
### My Multi Word Header
Update
Works out of the box with pandoc
too.
The short answer is no. The long answer is yes. :-)
Markdown was designed to allow people to write simple, readable text that could be easily converted to a simple HTML markup. It doesn't really do document layout. For example, there's no real way to align an image to the right or left. As to your question, there's no markdown command to include a single link from one file to another in any version of markdown (so far as I know).
The closest you could come to this functionality is Pandoc. Pandoc allows you to merge files as a part of the transformation, which allows you to easily render multiple files into a single output. For example, if you were creating a book, then you could have chapters like this:
01_preface.md
02_introduction.md
03_why_markdown_is_useful.md
04_limitations_of_markdown.md
05_conclusions.md
You can merge them by doing executing this command within the same directory:
pandoc *.md > markdown_book.html
Since pandoc will merge all the files prior to doing the translation, you can include your links in the last file like this:
01_preface.md
02_introduction.md
03_why_markdown_is_useful.md
04_limitations_of_markdown.md
05_conclusions.md
06_links.md
So part of your 01_preface.md
could look like this:
I always wanted to write a book with [markdown][mkdnlink].
And part of your 02_introduction.md
could look like this:
Let's start digging into [the best text-based syntax][mkdnlink] available.
As long as your last file includes the line:
[mkdnlink]: http://daringfireball.net/projects/markdown
...the same command used before will perform the merge and conversion while including that link throughout. Just make sure you leave a blank line or two at the beginning of that file. The pandoc documentation says that it adds a blank line between files that are merged this way, but this didn't work for me without the blank line.
Best Answer
Use four spaces to indent content between bullet points
Produces:
item 2
Code block