-
Notifications
You must be signed in to change notification settings - Fork 4
Using the Github wiki
The Github wiki parser supports several markup languages. We have chosen to use Markdown because it is the default, is easily portable and Github has enhanced it to integrate with other Github services.
- Markdown Basics - "intro to Markdown".
- Writing on Github - Github enhancements to traditional Markdown.
- GitHub Flavored Markdown - Differences from traditional Markdown.
Github does not provide a mechanism for directly searching wiki contents. There are two recommended work-arounds: Perform a Google site: search (which does not appear to work), and the Github Wiki Search browser add-on. (@shawn-bellevuecollege has confirmed the add-on on Firefox.)
This section documents oddities and/or syntax not well documented elsewhere. It is assumed that you have already familiarized yourself with the reference material listed above.
The parser doesn't seem to handle nesting bold and italic formatting unless the characters are different. For example, this will confuse the parser:
**bold text *with italics***
Instead, use the following syntax:
**bold text _with italics_**
The image syntax for traditional Markdown works:

But if you want more control over how the image is placed, the Github wiki now supports a syntax that will allow you to do that:
[[images/someImage.png|frame|align=right|float|alt=alt text]]
You can use any, all or none of the additional attributes to control how the image is displayed. For more information, see the Gollum documentation for image syntax.
Yes, you can store your images in the wiki repository itself, and in sub-folders. There is a difference to be aware of in the two formats listed above, however.
- In the first example, the
images
folder is expected to be at the root of the repository. - In the second example (of the newer syntax) the
images
folder is relative to the folder for the currently-displayed wiki page.
This latter behavior can be confusing because from the viewer's standpoint there is no hierarchy to pages. Given the following folder structure in the repository:
- (root)
- Page1.md
- images
- SubFolder
- Page2.md
The URLs are:
http://github.com/someRepo/wiki/Page1
http://github.com/someRepo/wiki/Page2
Also, you cannot traverse parent folders to reference an image. The following does not work:
[[../images/someImage.png]]
The Github wiki seems particularly picky when linking to headings within a wiki page. An anchor-enabled link looks something like this:
[[Some Page#some heading]]
Anchors must
- be in all lower case
- have spaces replaced with dashes (-)
- have all(?) punctuation stripped out (stripping of periods (.) and ampersands (&) has been observed)
- be prefixed with wiki-
The parser will take care of numbers 2-4, but if any of the characters are upper cased, it will link to the page but not be able to find the anchor. (If the wiki- prefix already exists, the parser will not add it.)
After being parsed, the link for the example above would look something like this:
http://github.com/someRepo/wiki/Some-Page#wiki-some-heading
The normal wiki page-link syntax doesn't seem to work for this. Use the standard link syntax with just the anchor:
[some text](#some-heading)