Skip to content

Instantly share code, notes, and snippets.

@tsega
Last active March 21, 2024 15:21
Show Gist options
  • Save tsega/99531920edf77eee0f7b2ff937e07c58 to your computer and use it in GitHub Desktop.
Save tsega/99531920edf77eee0f7b2ff937e07c58 to your computer and use it in GitHub Desktop.
Working with GitHub Wiki

Cloning the Wiki

You can clone you GitHub Wiki as git repository, simply use:

git clone [email protected]:YOUR_GITHUB_USERNAME/YOUR_PROJECT_NAME.wiki.git

Notice the .wiki before the git extension at the end.

Structure

You can structure your Wiki files into any directory of your choice. However, a few things to remember:

  • The file names need to be unique
  • The file names will be set as the title of the Wiki page, so proper capitalization in your file names would make the titles readable.
  • Use a dash - to separate words as you would use a single space.
  • You can use special characters in the names of the files but would need to be turned into their URL safe versions when linking the files.

Linking

All files in the Wiki will be accessible from the root folder. The directory organization will not matter.

For example you might have a directory structure as follows:

1.-Introduction.md
  \introduction
     1.1.-Background.md

To get the link to the Background page; all you need is to use the name, as follows:

[1.1 Background](1.1-Background.md)

Anchors

Anchors on a page i.e. 1.1-Background#section-1 are handled by setting Section 1 as a heading. Also the text after the # will be all in lowercase. Special characters such as dots . are removed;

e.g. 1.1.1 Problem turns into #111-Problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment