Skip to content

Instantly share code, notes, and snippets.

@end2endzone
Created January 3, 2019 17:20
Show Gist options
  • Save end2endzone/c09831072b7be4d362026189168857be to your computer and use it in GitHub Desktop.
Save end2endzone/c09831072b7be4d362026189168857be to your computer and use it in GitHub Desktop.
Different URL constructs for documents hosted on GitHub's platform

GitHub URL structures

The following document shows how to create different kind of links (URL) to documents hosted on GitHub's.

The examples are based on a document hosted in end2endzone/RapidAssist repository. The path to the document inside the repository is: src/rapidassist/filesystem.cpp.

Urls

GitHub's viewer:

https://github.com/end2endzone/RapidAssist/blob/master/src/rapidassist/filesystem.cpp

Raw links to source document:

Links to raw file will be displayed directly in the browser if supported by the browser. Supported files include source code, text file, images, etc.

For examples,

https://raw.githubusercontent.com/end2endzone/RapidAssist/master/src/rapidassist/filesystem.cpp

or

https://github.com/end2endzone/RapidAssist/blob/master/src/rapidassist/filesystem.cpp?raw=true

or

https://github.com/end2endzone/RapidAssist/raw/master/src/rapidassist/filesystem.cpp

Download url:

Links to raw file will be downloaded automatically if not supported by the browser.

For examples,

https://raw.githubusercontent.com/end2endzone/NonBlockingRTTTL/master/docs/NonBlockingRtttl.xcf

or

https://github.com/end2endzone/NonBlockingRTTTL/blob/master/docs/NonBlockingRtttl.xcf?raw=true

or

https://github.com/end2endzone/NonBlockingRTTTL/raw/master/docs/NonBlockingRtttl.xcf

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