Linking to other Wiki pages on GitHub? - github

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.

GitHub by default uses Markdown syntax for the wikis so you can just do:
[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.

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.

The most common use [Link Text](WikiPageURL)
The second way: [[Link Text|WikiPageURL]]
The third way, if you do not want to repeat and need to use the hyperlink several times: [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 reference internal-ref.

Related

The github pages blog can upload but cannot display the content

I have a github.io blog which can display very well before. But recently when I added a new articles and pushed it to github(by "hexo generate" and "hexo deploy"), I found that there isn't any contet words on my blog. In github blog repository ((https://github.com/zwdnet/zwdnet.github.io) I can see the pages pushed successfully. And when I check the blog's source code in my brower, I can see the newest article. My blog url is: https://zwdnet.github.io/ It is a Chinese blog. I can visit other github.io blogs, so maybe this is not the network problem. How can I solve this problem? Reseting the github pages? Thanks for any helping!
After opening your website, according to the console errors. Your blog is missing the JQuery $ library.
Check the header part of your code, add in a JQuery link will fix this problem.
Add this in the header tag.
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>

How can I create a link from my github README.md to some static html in the repository?

I want the link to resolve as a web page, not as a github source of a web page.
check out this link
They suggest trying
[a link](https://github.com/user/repo/blob/branch/other_file.md)
but without screenshots or examples, we don't know exactly what you are trying to accomplish

GitHub Pages with repos as links

I'm just a regular user on GitHub. I don't have an enterprise or anything like that. I was wondering can I still create a https://myusername.github.io/ page like a blog or portfolio, and can that page contain links to individual repo github pages like https://myusername.github.io/myrepo1 That way this can act like a portfolio website.
Is this possible? I keep having issues with setting up the https://myusername.github.io/ page but the repo-based url works fine and is easy to set up
A User GitHub page will contain markdown files which, in turn, can include any URL you want.
Incuding URLs referencing your other repositories.

Remove md Webpage header in github

I made a .md file in my GitHub repo. The site automatic added a header with the link to the repo index page. I can't find any way to remove it.The repo name is called school The webpage is on /school/ss/1
Link to the code: Github
What it shows
Follow the "Layouts" instructions as shown on the Primer theme github site to edit website style: https://github.com/pages-themes/primer#layouts
Then, in your _layouts/default.html, remove lines 13-15 which add the title to your page
In their issues, I propose a simpler way to do this: https://github.com/pages-themes/primer/issues/21

In GitHub Wiki, how do I make a link to another page with a title containing colons?

I know how to make a page link in GitHub's wiki. Normally you can just do:
[Arbitrary Link Text](Wiki Page Name)
Ref: Stack Overflow question Linking to other Wiki pages on GitHub? [closed].
But, in my GitHub repository I have a wiki page named "ExampleModule::ExampleClass" with two colons. How do I make a link for it?
I've tried:
[Arbitrary Link Text](ExampleModule::ExampleClass)
It doesn't work.
Based on the answer, here's my discovering:
Say if I have a page in a GitHub project's wiki repository called overview>:
Link to overview from wiki repository Home page:
[Overview](wiki/overview)
Link to overview from wiki repository that is NOT Home:
[Overview](../wiki/overview)
Link to overview from project repository:
[Overview](../../wiki/Overview)
If you create a page named Example::Page, you could link it with:
[Click here](wiki/Example::Page)
The colon isn't a problem.
I made a simple example here.