Github Markdown Same Page Link

Alexander Craggs picture Alexander Craggs · Jan 16, 2015 · Viewed 48.4k times · Source

Let's say I have two points within the same git hub wiki page, which for this we'll call place 1 and place 2.

##Title

###Place 1

Hello, this is some text to fill in this, [here](place2), 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](place1).

An alternative is a ToC.

##Title
[ToC]
###Place 1
###Place 2

Is there any way to do this? Note - seen this so I'll assume it's on topic. Also, that deals with going between files, this one deals with going between the same file.

Answer

FelixEnescu picture FelixEnescu · Aug 4, 2017

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:

  • punctuation marks will be dropped
  • leading white spaces will be dropped
  • upper case will be converted to lower
  • spaces between letters will be converted to -

A good example document with plenty of links and formatting is LivingSocial API Design Guide