formatting with markdown - vfa-taithd/git-wikis GitHub Wiki

Markdown is a lightweight markup language that allows you to format text easily. GitHub Wikis use Markdown to help you create well-structured and readable documentation. In this guide, we’ll explore the basics of Markdown and how you can use it to format your Wiki pages.

Basic Formatting

Headings

Headings help you structure your content and make it easier to navigate.

  • Use # for a main heading and add more # symbols for subheadings.

Examples:

# Main Heading
## Subheading
### Sub-subheading

Bold and Italic

  • Bold: Use double asterisks ** or double underscores __ around text to make it bold.
  • Italic: Use single asterisks * or single underscores _ around text to italicize it.

Examples:

This is bold text

This is italic text

Lists

  • You can create ordered (numbered) and unordered (bulleted) lists to organize information.

  • Unordered Lists: Use -, *, or + to create bullet points.

  • Ordered Lists: Use numbers followed by a period to create a numbered list.

Examples:

- Item 1
- Item 2
  - Sub-item 2.1

1. First item
2. Second item
   1. Sub-item 2.1

Links

You can create links to other pages within your Wiki or to external resources.

  • Internal Links: Link to other Wiki pages.
[Introduction](Introduction)
  • External Links: Link to an external website.
[GitHub](https://github.com)

Images

You can embed images in your Wiki using the following syntax:

![Alt text](image_url)

Code Blocks

For displaying code snippets, use triple backticks ``` to create a code block. Specify the language for syntax highlighting (optional).

Example:

function greet() {
  console.log("Hello, World!");
}

Inline Code

For smaller bits of code or commands, use single backticks.

Example:

Use the `git status` command to check your working directory.

Advanced Formatting

Blockquotes

Use > to create blockquotes, which are great for highlighting important information or quotes.

Example:

> This is an important note or quote.

This is an important note or quote.

We can combine with five types of alerts: [!NOTE], [!TIP], [!IMPORTANT], [!WARNING], and [!CAUTION]. You can use any of them:

> [!NOTE]
> Useful information that users should know, even when skimming content.

> [!TIP]
> Helpful advice for doing things better or more easily.

> [!IMPORTANT]
> Key information users need to know to achieve their goal.

> [!WARNING]
> Urgent info that needs immediate user attention to avoid problems.

> [!CAUTION]
> Advises about risks or negative outcomes of certain actions.

Note

Useful information that users should know, even when skimming content.

Tip

Helpful advice for doing things better or more easily.

Important

Key information users need to know to achieve their goal.

Warning

Urgent info that needs immediate user attention to avoid problems.

Caution

Advises about risks or negative outcomes of certain actions.

Horizontal Lines

Use three dashes (---) or three underscores (___) to create a horizontal line.

Example:

---

Tables

You can create tables in Markdown to present data in rows and columns. Separate columns with pipes |, and use dashes --- to create headers.

Example:

| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Row 1    | Data 1   | Data 2   |
| Row 2    | Data 3   | Data 4   |
Column 1 Column 2 Column 3
Row 1 Data 1 Data 2
Row 2 Data 3 Data 4

Task Lists

You can create task lists with checkboxes using - [ ] for unchecked boxes and - [x] for checked boxes.

Example:

- [x] Write documentation
- [ ] Add tests
- [ ] Review pull requests
  • Write documentation
  • Add tests
  • Review pull requests
⚠️ **GitHub.com Fallback** ⚠️