Skip to content

Instantly share code, notes, and snippets.

@nnja
Created May 26, 2016 20:25
Show Gist options
  • Star 28 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nnja/9136152c163091614e70defcf3753d06 to your computer and use it in GitHub Desktop.
Save nnja/9136152c163091614e70defcf3753d06 to your computer and use it in GitHub Desktop.
How to access the raw markdown source for a github wiki page
https://raw.github.com/wiki/user/repo/page.md?login=login&token=token
@ntcho
Copy link

ntcho commented Feb 7, 2018

very nice

@Clor
Copy link

Clor commented Apr 4, 2018

Adding '.md' at the end of the wiki-URL redirects to the raw page, as a potentially simpler solution.

@mrcampbell
Copy link

Or check the commit history, and copy the right-most panel.

@dlenski
Copy link

dlenski commented Jan 12, 2019

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

These URLs now redirect to a new domain… https://raw.githubusercontent.com/wiki/user/repo/page.md

@cdrubin
Copy link

cdrubin commented Feb 1, 2019

What token should be used in this context?

  • The tokens that are appending to URLs automatically when adding .md to a wiki page to see the raw content seem to expire after a few days and do not need the login query parameter.

  • Personal access tokens do not seem to work in this context either...

So what token needs to be used to get this to work? Thanks!

@nelsonjchen
Copy link

Just want to mention that this doesn't always work, especially if the Wiki is managed via Git and the actual source documents are at a different heirarchy.

@Kiuhbit
Copy link

Kiuhbit commented Feb 13, 2023

None of the solutions in these comments seem to work without edit access at the time of this comment

@nelsonjchen
Copy link

@Kiuhrly

Still seems to work

https://raw.githubusercontent.com/wiki/Microsoft/vscode-go/Features-for-Go-in-VS-Code.md

It's just linknum23's example is from a page that has since been moved/deleted as vscode-go themselves have migrated off GitHub Wikis (maybe due to documentation, indexing, or spam situation that I wrote/addressed/working around in https://github-wiki-see.page)

@Kiuhbit
Copy link

Kiuhbit commented Feb 15, 2023

Looks like I was doing it wrong when I tried to manually edit a URL. Oops. Here's a wiki link and a correct raw file link for future reference and comparison:

https://github.com/mattmikolay/chip-8/wiki/CHIP%E2%80%908-Technical-Reference
https://raw.githubusercontent.com/wiki/mattmikolay/chip-8/CHIP%E2%80%908-Technical-Reference.md

For anyone else getting 404s, note the missing /wiki after the repository name, the added /wiki at the start, and .md added at the end.

@herry-heni
Copy link

not sure if this helps, but you can clone the wiki

git clone git@github.com:organisation/repo.wiki.git

all wiki pages are in markdown files

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