-
Notifications
You must be signed in to change notification settings - Fork 1
Example links from GitHub wiki to repo
I frequently want to link a GitHub repo to its associated wiki, and vice versa.
- See page in the repo associated with this wiki: Example Links from GitHub wiki to repo
This is a Markdown wiki page. The GitHub wiki reports other formats.
Links from wiki to wiki
-
Link from wiki to itself "."
- dot "." refers to the current neighborhood
- and defaults to the wiki Home page
- Link from wiki to itself "./Home"
Links from wiki to repo
-
Link from wiki to repo "../blob/master/README.md"
- other item within the repo
-
Link from wiki to repo base URL ".."
- typically shows repo README.md, as well as other repo stuff
The next stuff, linking from repo to wiki, will not work in this page within the wiki.
[Link from repo README.md to itself --> README.md](README.md)
- --> https://github.com/AndyGlew/Ag-stuff/blob/master/README.md,
- i.e. /blob/master/ is inserted between the repo URL base and the page
[Link from repo to wiki: ../../wiki](../../wiki)
- ../.. to get out of blob/master to the repo URL base, then add /wiki/
GitHub wiki URLs look like
- repo base URL
- /wiki/
- page name - with weaker than usual transformations :-(
GitHub repo URLs look like
- repo base URL
- /blob/master/
- pathname within repo
To get from wiki to repo,
- ../ <-- to get to repo base URL, out of /wiki/
- /blob/master/ <-- or other repo branch
- pathname
To get from repo to wiki
- ../../ <-- Get to repo base URL, out of /blob/master/
- /wiki/
- wiki page name
"master" is the fairly standard Git name of the main branch.
"blob" is a git concept
but AFAICT it is GitHub convention to form a URL for an item within the repo from the concatenation of
- repo base URL
- "blob"
- branch name "master"
- and the item pathname relative to the base of the repo
Q: can GitHub URL be formed in other ways, eg with something other than "blob/branchname" ?
The code repo has URL syntax to indicate different branches, and versions within a branch.
The wiki URL has similar syntax, but reversed, for commits(versions)
but AFAIK has no such syntax for branches within the git repository that tracks the wiki itself