http://blogs.clariusconsulting.net/kzu

Daniel Cazzulino's Blog

Go Back to
kzu′s Latest post

How to access the raw markdown source for a github wiki page

This is not entirely obvious (at least it wasn’t for me), but since Github wikis are actually backed by a proper Git repo, I figured it should be possible to access the raw markdown for a page by using Github’s https://raw.github.com/ style URLs.

After some minor trial/error, it turns out to be very predictable (as many things in github):

https://raw.github.com/wiki/[user]/[project]/[page].md

Just replace the square brackets’ stuff with your values and that’s it. I think I’ll be trying this out with a wiki page as a Release Notes landing page, which I just pull in raw format on a build script and replace the Nuget <releaseNotes> node with its content…

Comments

5 Comments

  1. Another tip for private repos:

    https://raw.github.com/wiki/user/repo/page.md?login=login&token=token

    You can get your token by appending “.md” to any wiki page; it will redirect you to the raw URL.

  2. to further specify, as i just found out: because it is a git repo, wiki files can be moved into subdirectories. this does not affect their public url, but it does affect the raw url.

    in general replace the name of the page with the full path inside the repo.

    so if the above hint does not work, clone the repo and check for the path, then use that.

    example: https://github.com/sup-heliotrope/sup/wiki/manpage ->
    https://github.com/sup-heliotrope/sup/wiki/man/manpage.md
    (which then redirects to https://raw.githubusercontent.com/wiki/sup-heliotrope/sup/man/manpage.md but can also be accessed as https://raw.github.com/wiki/sup-heliotrope/sup/man/manpage.md )

    greetings, eMBee.

  3. Your tip about, “How to access the raw markdown source for a github wiki page,” just helped me.

    Thanks!