Beautiful markdown previews for GNOME - Press Space in Nautilus to preview .md files with rich formatting, syntax highlighting, and multiple flavor support.
Similar to macOS QLMarkdown, this extension brings Quick Look-style markdown previews to GNOME Linux desktops.
- π 8 Markdown Flavors - GitHub, CommonMark, Pandoc, GitLab, and more
- π¨ Auto Theme Detection - Seamlessly adapts to GNOME light/dark themes
- π§ Syntax Highlighting - Powered by Pygments with 40+ styles
- π Rich Content - Tables, task lists, math equations, Mermaid diagrams
- β‘ Instant Preview - Sub-second rendering with WebKit2GTK
- π Standards Compliant - Full HTML5 + CSS3 + JavaScript support
curl -fsSL https://raw.githubusercontent.com/noboomu/gnome-markdown-quicklook/main/install.sh | bashThat's it! The installer will handle dependencies, setup, and configuration automatically.
| Flavor | Specification | Key Features |
|---|---|---|
| GFM | GitHub Flavored Markdown | Tables, task lists, strikethrough, @mentions |
| CommonMark | CommonMark 0.31.2 | Standards-compliant parsing |
| PyMdown | Enhanced GitHub-like | Emoji, keyboard keys, advanced highlighting |
| Pandoc | Pandoc Markdown | Extensive extensions, citations, metadata |
| Extra | PHP Markdown Extra | Definition lists, abbreviations, footnotes |
| GitLab | GitLab Flavored Markdown | GFM + GitLab-specific references (!123, etc.) |
| MMD | MultiMarkdown v6 | Metadata, citations, advanced tables |
| Standard | Python Markdown | Basic markdown features |
- Open Nautilus (GNOME Files)
- Select any
.mdfile - Press
Spaceβ Preview opens instantly! - Press
Escapeto close
Test different flavors:
sushi-markdown-converter document.md --flavor gfm
sushi-markdown-converter document.md --flavor commonmark
sushi-markdown-converter document.md --flavor pandocExport to HTML:
sushi-markdown-converter document.md --output preview.html --flavor gfmList all flavors:
sushi-markdown-converter --help.md- Standard Markdown.markdown- Markdown document.mdown- Markdown document.mkd- Markdown document.mkdn- Markdown document
- OS: Linux with GNOME desktop
- GNOME Sushi: File previewer (
sudo apt install gnome-sushi) - WebKit2GTK: Web rendering (
sudo apt install libwebkit2gtk-4.1-dev) - Python: 3.8+ with pip or uv
The installer automatically handles:
- Python Markdown - Core markdown processing
- Pygments - Syntax highlighting
- PyMdown Extensions - Enhanced features
- CommonMark - Spec compliance
- markdown-it-py - Modern parser
- python-markdown-math - Math support
βββββββββββββββ ββββββββββββββββ βββββββββββββββ ββββββββββββββββ
β Markdown βββββΆβ Python βββββΆβ Styled βββββΆβ WebKit2 β
β File β β Converter β β HTML β β Preview β
β (.md) β β (Multi-flavor)β β (CSS+JS) β β (Sushi) β
βββββββββββββββ ββββββββββββββββ βββββββββββββββ ββββββββββββββββ
Components:
- GNOME Sushi - File preview framework
- Python Converter - Multi-flavor markdown processor
- JavaScript Viewer - WebKit2GTK integration
- MIME Integration - File type associations
- Automatically detects GNOME light/dark theme
- Switches styling and syntax highlighting accordingly
- Consistent with system appearance
- Light Theme: GitHub-style highlighting
- Dark Theme: Dark-optimized color schemes
- 40+ Languages: Powered by Pygments
- Rendering: < 100ms for typical documents
- Memory: ~10MB per preview
- CPU: Minimal impact, efficient caching
- Large Files: Handles 1MB+ documents smoothly
| Feature | QLMarkdown (macOS) | GNOME Markdown QuickLook |
|---|---|---|
| Platform | macOS only | Linux/GNOME |
| Flavors | 1 (Custom GFM-like) | 8 markdown specifications |
| Themes | Built-in themes | System theme integration |
| Math | β MathJax | β MathJax |
| Diagrams | β | β Mermaid |
| Syntax Highlighting | β | β Pygments |
| Tables | β | β |
| Task Lists | β | β |
| Extensibility | Limited | Highly extensible |
| Performance | Native (Swift) | WebKit2GTK |
git clone https://github.com/noboomu/gnome-markdown-quicklook.git
cd gnome-markdown-quicklook
uv sync # or pip install -e .# Test converter directly
uv run python -m gnome_markdown_quicklook.converter tests/sample.md
# Test different flavors
uv run python -m gnome_markdown_quicklook.converter tests/sample.md --flavor gfm
uv run python -m gnome_markdown_quicklook.converter tests/sample.md --flavor commonmark- Implement
render_<flavor>()method inconverter.py - Add to
FLAVORSdictionary - Update CLI choices and documentation
- Test with various markdown documents
Click to expand manual installation steps
# 1. Install system dependencies
sudo apt install gnome-sushi libwebkit2gtk-4.1-dev python3-pip
# 2. Clone repository
git clone https://github.com/noboomu/gnome-markdown-quicklook.git
cd gnome-markdown-quicklook
# 3. Install Python dependencies
uv sync # or pip install -r requirements.txt
# 4. Install converter
sudo cp src/gnome_markdown_quicklook/converter.py /usr/local/bin/sushi-markdown-converter
sudo chmod +x /usr/local/bin/sushi-markdown-converter
# 5. Install Sushi viewer
sudo cp src/sushi-viewers/markdown.js /usr/share/sushi/viewers/
# 6. Update MIME database
sudo cp mime/markdown.xml /usr/share/mime/packages/
sudo update-mime-database /usr/share/mime
# 7. Restart Sushi
pkill -f sushi- Check Sushi:
which sushiand restart withpkill -f sushi - Check converter:
sushi-markdown-converter --help - Check logs:
journalctl --user -f | grep sushi
- Python packages:
uv syncorpip install markdown pygments - System packages:
sudo apt install gnome-sushi libwebkit2gtk-4.1-dev - WebKit version: Try both
webkit2gtk-4.0andwebkit2gtk-4.1
- Update database:
update-mime-database ~/.local/share/mime - Check associations:
file --mime-type document.md - Restart session: Log out and back in
# Remove files
sudo rm -f /usr/local/bin/sushi-markdown-converter
sudo rm -f /usr/share/sushi/viewers/markdown.js
sudo rm -f /usr/share/mime/packages/markdown.xml
# Update MIME database
sudo update-mime-database /usr/share/mime
# Restart Sushi
pkill -f sushiThis project is licensed under the GNU General Public License v2.0 - see the LICENSE file for details.
- QLMarkdown - Original macOS inspiration by Sbarex
- GNOME Sushi - File preview framework by GNOME Project
- Python Markdown - Core markdown processing
- PyMdown Extensions - Enhanced markdown features by facelessuser
- Pygments - Syntax highlighting by Georg Brandl
Contributions welcome! Please read our Contributing Guide and submit pull requests to our GitHub repository.
Ready to use! π
curl -fsSL https://raw.githubusercontent.com/noboomu/gnome-markdown-quicklook/main/install.sh | bash