Wiki
Overview
GitHub Wikis are a great way to document your project, share information, and collaborate with others. They are simple to create and maintain, and they can be used to store project documentation, guidelines, and other useful information.
Manage Wiki Content Locally
To manage your GitHub Wiki by editing or creating new markdown files locally, you'll need to clone the repository specifically associated with the Wiki. GitHub automatically generates a separate Git repository for each project's Wiki. Here’s how you can clone and work with your GitHub Wiki:
Steps to Clone a GitHub Wiki
-
Wiki Repository URL: GitHub Wikis reside in a dedicated Git repository, which is separate from the main project repository. To get the URL for the Wiki's repository, you can manually construct it. For your project,
buildmotion/github-motion, the Wiki repo URL is:https://github.com/buildmotion/github-motion.wiki.git -
Clone the Wiki Repository: Use the following command to clone it to your local machine:
git clone https://github.com/buildmotion/github-motion.wiki.gitThis will create a new directory named
github-motion.wikicontaining the markdown files of the Wiki. -
Edit and Create Files:
- You can now navigate into this folder and edit the existing markdown files or add new ones.
- Remember that each page in the Wiki corresponds to a markdown file.
-
Commit and Push Changes: After editing or creating new files, you can commit and push your changes back to the Wiki repository:
cd github-motion.wiki
git add .
git commit -m "docs(wiki): Update or add new markdown files"
git push origin main # or `master`, depending on your branch -
Additional Management:
- Ensure you have contributor access to the Wiki repository if it's private.
- You might not see the branch as "master" or "main" immediately; check what branch is used when you clone and adjust the push command accordingly.
By following these steps, you can effectively manage your GitHub Wiki with local file edits and keep the Wiki content up to date.
Wide Sidebar
The _Sidebar in a GitHub Wiki is a special page that allows you to customize the navigation sidebar that appears on the left side of the Wiki pages. This can be incredibly useful for organizing content and improving navigation within the Wiki.
Purpose of the _Sidebar
-
Navigation Aid: It provides a consistent navigation structure throughout the Wiki, allowing users to quickly access important pages or sections.
-
Customization: You can include links to Wiki pages, section headers, or any relevant information that enhances the user experience. The content is written in Markdown, just like any other Wiki page.
-
Visibility: Once the
_Sidebarpage is created and populated, it is automatically displayed on every page of your Wiki, offering a permanent navigation context to users.
How to Use the _Sidebar
- Creating/Editing the
_Sidebar:- Navigate to your GitHub project's Wiki tab.
- Create or edit a page named
_Sidebar(make sure to use the exact name with underscore). - Add links and content using Markdown syntax to structure it as desired.
Example of a _Sidebar
### Table of Contents
- [Home](Home)
- [Getting Started](Getting-Started)
- [API Documentation](API-Documentation)
- [FAQ](FAQ)
- [Contributing](Contributing)
This simple structure provides users with quick links to key sections of the Wiki.
By utilizing the _Sidebar, you can make your Wiki more user-friendly and ensure users have quick access to important information.