GitHub wikis allow you to link to other pages in the wiki like so:
[[Wiki Page Name]]
However, I want to display different text than the wiki page name when making the link. Is there a way to do this? Am I linking to wiki pages all wrong?
GitHub wikis allow you to link to other pages in the wiki like so:
[[Wiki Page Name]]
However, I want to display different text than the wiki page name when making the link. Is there a way to do this? Am I linking to wiki pages all wrong?
Using the Markdown link syntax
[Link Text](WikiPage)
seems to work in the edit preview but not on the actual wiki page. At least for me the generated link is WikiPage
instead of wiki/WikiPage
and I get the famous GitHub 404.
However the MediaWiki syntax
[[Link Text|WikiPage]]
works for me, even for Markdown wiki pages.
[[My Wonderful Wiki Page]]
. This will link to wiki/My-Wonderful-Wiki-Page
.
[[Link Text|WikiPage]]
works for me. Pleas edit your answer
Commented
Apr 15, 2013 at 12:31
foo
|Foo]] ``` will render the (code-formatted) source markup, not the intended link. If anyone knows a way around this, please let me know.
Commented
Mar 2, 2019 at 6:19
GitHub by default uses Markdown syntax for the wikis so you can just use the page's path:
[Arbitrary Link Text](Wiki-Page-Name)
Check out Markdown and this blog post for more information about their wikis and the other markup syntaxes they support.
This solution has issues when you're on the home page because it creates relative URLs. Check out Sven's answer, below.
[[Link Text|WikiPage]]
works for me. Pleas add to your answer
Commented
Apr 15, 2013 at 12:34
The internal-ref part is relative to your project. For wiki pages use:
[Page Name](wiki/Page-Name)
In the preview the link will be broken but when the page is saved it will work.
wiki/Page-Name
, then in the wiki/Page-Name
page's sidebar, links are broken having a double wiki
element like wiki/wiki/Page-Name
.
<html>...</html>
tags whereas [[Link text|Page Name]]
does.
Commented
Dec 2, 2022 at 22:44
[Link Text](WikiPageURL)
[[Link Text|WikiPageURL]]
[Link Text]
and at the end of the page use once [Link Text]:WikiPageURL
Check the wiki editor's help. It tells you:
To create a reference link, use two sets of square brackets.
[my internal link][internal-ref]
will link to the internal referenceinternal-ref
.