Hsu's Blog!

Home
Blog
  • Cats.
  • Tags
Mine
  • Friends
  • ChangeLog
About
Search
0

markdownGFM

Published on 7/30/2023
Updated on 7/30/2023
Quick Start
Estimated reading 1.365 minutes
1908 words

Github Extended Markdown (GFM)

This article offers a brief introduction (and only includes the extensions that can be rendered as highlighted by the colorHsuBlog). For a more detailed exploration, please refer to the official GitHub documentation.

Github Extended Markdown, often abbreviated as GFM, is a dialect or variant of Markdown used on GitHub. It introduces some extended features to the standard Markdown syntax, making Markdown more adaptable for web displays and presentations related to code.

Task Lists

You can create task lists using a - followed by [ ] and [x] to represent unfinished and finished tasks, respectively.

markdown
- [x] Completed task
- [ ] Unfinished task
- [x] Completed task
- [ ] Unfinished task
  • Completed task
  • Unfinished task

Code Highlighting

In standard Markdown, we can create code blocks. But in GFM, we can also specify the language for the code block, enabling code highlighting.

javascript
function sayHello() {
    console.log("Hello, GFM!");
}
function sayHello() {
    console.log("Hello, GFM!");
}

Tables

GFM allows you to create tables. Use | to separate columns, and - to create headers. Additionally, you can align the text in columns to the left, right, or center by adding colons (:) to the left, right, or both sides of the hyphens in the header row.

markdown
| Header Left  | Header Center  |  Header Right |
| :----------- | :------------: | ------------: |
| Content Left | Content Center | Content Right |
| Content Left | Content Center | Content Right |
| Header Left  | Header Center  |  Header Right |
| :----------- | :------------: | ------------: |
| Content Left | Content Center | Content Right |
| Content Left | Content Center | Content Right |
Header LeftHeader CenterHeader Right
Content LeftContent CenterContent Right
Content LeftContent CenterContent Right

PS: To create tables more swiftly, you can use the graphical interface.

Automatic Links

GFM will automatically turn URLs into links:

https://github.com: https://github.com

Strikethrough

Text wrapped with two ~ characters will be struck through.

markdown
This is a~~strikethrough~~example.
This is a~~strikethrough~~example.

This is astrikethroughexample.

Emojis

GFM supports the shortcodes for emojis. For instance:

:smile:: 😀

For more emojis, check out the emoji shortcode list.

Related Post
Comments
author-avatar
KraHsu
A front-end developer.
87
Arts.
9
Cats.
10
Tags
Custom Card
This is the custom content section
Everything can be placed here
TOC
  1. Github Extended Markdown (GFM)
  2. Task Lists
  3. Code Highlighting
  4. Tables
  5. Automatic Links
  6. Strikethrough
  7. Emojis
© 2022-2023 By KraHsu
由 Astro v2.10.3 构建 | 主题 HsuBlog
Design & Build with ❤ by KraHsu
Search
Extended SearchHelloWorld
You can use a unix-like format: Extended Search