Linking Pages and Navigation - vfa-taithd/git-wikis GitHub Wiki
One of the key features of a GitHub Wiki is the ability to easily link pages together and create an intuitive navigation structure. This allows users to move through your documentation seamlessly and find the information they need.
Internal Links
To link between different pages within your Wiki, you can use internal links. This is especially useful when you want to reference related topics or guide readers through a series of pages.
How to Create an Internal Link
Use the following Markdown syntax to create a link to another Wiki page:
[Link Text](Page-Name)
- Link Text: This is the text that will be clickable.
- Page-Name: This is the title of the page you are linking to. Make sure to match the exact page name and case.
For example, to link to an "Introduction" page:
[Introduction](Introduction)
Linking to Specific Sections
You can also link to specific sections or headings within a page. To do this, you’ll need to link to the heading’s "anchor." Headings automatically generate an anchor based on the text.
Example of linking to a specific section on the "Introduction" page:
[Getting Started](Introduction#why-use-a-github-wiki?)
This link will take the user directly to the "Why Use a GitHub Wiki?" section of the "Introduction" page.
External Links
You can also link to external resources, such as websites or other repositories. The syntax is similar to internal links:
[GitHub](https://github.com)
This would create a link to GitHub’s homepage.
Sidebar Navigation
For easier access to your important Wiki pages, you can customize the sidebar to act as a navigation menu. The sidebar appears on all pages of the Wiki, making it an excellent tool for quick navigation.
How to Create a Sidebar
- Go to the Wiki tab of your repository.
- Click the Edit button next to the sidebar on the right side.
- Add links to your most important pages using Markdown:
[Home](Home)
[Introduction](Introduction)
[Features of GitHub Wikis](Features-of-GitHub-Wikis)
The sidebar will now display these links, making it easy for users to jump to specific sections of your Wiki.
Table of Contents (TOC)
For larger Wiki pages, it’s helpful to include a Table of Contents (TOC) at the beginning. This allows users to quickly navigate to sections within the page.
How to Create a TOC
You can manually create a Table of Contents by linking to the headings within the same page. For example:
## Table of Contents
- [Introduction](#introduction)
- [Features](#features)
- [Getting Started](#getting-started)
Breadcrumb Navigation
For large Wikis, it’s useful to give users a way to track where they are. You can add "breadcrumb" navigation at the top of each page to help users understand the hierarchy of the Wiki.
Example of breadcrumb navigation:
[Home](Home) > [Features](Features) > Current Page
Linking to Other GitHub Assets
- Issues: Link to specific issues by using # followed by the issue number.
See [Issue #10](https://github.com/your-repo/issues/10) for details.
- Pull Requests: Link to specific pull requests.
View the progress in [Pull Request #42](https://github.com/your-repo/pull/42).
- Commits: Link to specific commits.
Check out this [commit](https://github.com/your-repo/commit/abcdef123456).