How to Work With GitHub Flavored Markdown in Linux?

GitHub Flavored Markdown (GFM) is an enhanced version of standard Markdown developed by GitHub, featuring additional syntax elements that make it perfect for technical documentation, README files, and collaborative development. Unlike basic Markdown, GFM includes support for tables, task lists, strikethrough text, automatic URL linking, and syntax highlighting for code blocks.

This guide demonstrates how to work with GFM on Linux systems, covering both basic syntax and advanced features with practical examples.

Basic GitHub Flavored Markdown Syntax

Headers and Text Formatting

Headers use hash symbols (#) with levels from 1 to 6

# Header 1
## Header 2  
### Header 3
#### Header 4

Text emphasis uses asterisks or underscores

*Italic text* or _italic text_
**Bold text** or __bold text__
***Bold and italic*** or ___bold and italic___
~~Strikethrough text~~ (GFM only)

Lists and Links

Create ordered and unordered lists

1. First ordered item
2. Second ordered item
   1. Nested ordered item
   2. Another nested item

* Unordered item
* Another item
  * Nested unordered item
  * Another nested item

Links and images use bracket notation

[Link text](https://github.com)
![Alt text for image](/path/to/image.png)

GitHub Flavored Markdown Extensions

Task Lists

GFM introduces interactive task lists with checkboxes

- [x] Completed task
- [ ] Incomplete task
- [x] Another completed task

Tables

Create formatted tables using pipe characters

| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Cell 1   | Cell 2   | Cell 3   |
| Data A   | Data B   | Data C   |
Feature Standard Markdown GitHub Flavored Markdown
Tables Not supported Full support
Task Lists Not supported Interactive checkboxes
Strikethrough Not supported ~~text~~ syntax
Auto URL linking Manual linking only Automatic conversion

Code Blocks with Syntax Highlighting

GFM supports syntax highlighting for various programming languages

```python
def hello_world():
    print("Hello, World!")
```

```bash
sudo apt update && sudo apt upgrade
```

```javascript
function greet(name) {
    return `Hello, ${name}!`;
}
```

Setting Up Markdown Tools on Linux

Installing Markdown Viewers

Install ReText for GUI-based Markdown editing

sudo apt install retext

Install Grip for GitHub-flavored rendering in browser

pip3 install grip

Use Grip to preview your Markdown files

grip README.md
# Opens preview at http://localhost:6419

Advanced Markdown Tools

Install Pandoc for document conversion

sudo apt install pandoc
pandoc README.md -o README.html

Install Marp for Markdown presentations

npm install -g @marp-team/marp-cli
marp slides.md --pdf

Advanced GFM Features

GitHub-Specific Elements

Reference issues, pull requests, and mention users

See issue #123 for details
Check pull request #456
Thanks @username for the contribution!

Blockquotes and HTML

Create blockquotes and embed HTML when needed

> This is a blockquote
> spanning multiple lines

<details>
<summary>Click to expand</summary>
Hidden content here
</details>

Emoji and Special Features

GFM supports emoji shortcodes and automatic URL linking

:smile: :rocket: :heart:
https://github.com (automatically becomes a link)
`https://github.com` (prevents auto-linking)

Best Practices

  • Consistent formatting Use consistent spacing and indentation throughout your documents.

  • Meaningful headers Structure your content with descriptive headers for better navigation.

  • Code language specification Always specify the language for code blocks to enable syntax highlighting.

  • Alt text for images Include descriptive alt text for accessibility and when images fail to load.

Conclusion

GitHub Flavored Markdown extends standard Markdown with powerful features like tables, task lists, and syntax highlighting, making it ideal for technical documentation and collaborative projects. Linux provides excellent tools like Grip, Pandoc, and various editors to work with GFM efficiently. Mastering these features will significantly improve your documentation quality and development workflow.

Updated on: 2026-03-17T09:01:39+05:30

333 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements