GitHub Tutorial
- 1. Introduction to GitHub
- 2. Account Setup & SSH
- 3. Repository Management
- 4. Remotes & Syncing
- 5. Collaborating Via Branches
- 6. Forking & Pull Requests
- 7. Code Reviews & Branch Protection
- 8. Merge Strategies
- 9. Issues & Projects
- 10. Markdown & Project Wikis
- 11. Deploying to GitHub Pages
- 12. CI/CD with GitHub Actions
- 13. Packages & Releases
- 14. Gists & Discussions
- 15. Security & Dependabot
10. Markdown & Project Wikis
Clear documentation is a hallmark of professional software development. GitHub utilizes GitHub Flavored Markdown (GFM) across issues, PRs, comments, and readmes. Additionally, it provides **Wikis** for writing long-form developer documentation. In this chapter, we will learn how to write rich GFM and structure a project Wiki.
1. GitHub Flavored Markdown (GFM) Guide
Markdown is a lightweight markup language that allows you to format plain text using simple symbols. Here is a cheatsheet of the most commonly used GFM syntax:
Headers
# Heading 1 (h1)
## Heading 2 (h2)
### Heading 3 (h3)Text Formatting
This is **bold text** and this is *italic text*.
You can also use ~~strikethrough text~~.Lists & Task Checklists
# Unordered List
- Mangoes
- Apples
# Task Checklist
- [x] Complete landing page design
- [ ] Add form validation rulesCode Blocks with Syntax Highlighting
Wrap code in three backticks and specify the language to enable professional syntax highlighting:
```javascript
const sayHello = () => {
console.log("Hello GitHub!");
};
```Tables
| Header 1 | Header 2 |
|----------|----------|
| Row 1 | Value 1 |
| Row 2 | Value 2 |2. Structuring Project Wikis
While a README.md is great for a quick introduction, complex projects with extensive guides, architecture diagrams, and API documentation require a **Wiki**.
To activate and create a Wiki:
- Go to your repository and click the Wiki tab.
- Click "Create the first page".
- Give the page a title (e.g.,
HomeorAPI-Specification) and write the content in Markdown. - Click "Save page".
You can create a structured sidebar on the right by adding a page named _Sidebar, which lets you link pages together like a book index!
git clone https://github.com/username/project.wiki.git