Show HN: A Standalone/GitHub CLI Extension to Preview GitHub Flavored Markdown
a year ago
- #markdown
- #cli
- #github
- A Go program named 'gh-gfm-preview' for previewing GitHub Flavored Markdown (GFM) locally.
- Starts a local web server to serve and render markdown documents using yuin/goldmark and extensions.
- Can be used as a GitHub CLI extension.
- Hard fork of yusukebe/gh-markdown-preview, focusing on offline functionality.
- Features include offline operation, fast rendering, no dependencies, zero-configuration, live reloading, auto browser opening, auto port finding, and graceful degradation.
- Supports most GitHub Flavored Markdown specs, emojis, alerts, syntax highlighting, section links, MathJax, Mermaid diagrams, GeoJSON/TopoJSON diagrams, and STL 3D diagrams.
- Installation methods include using Go, Nix with Flakes enabled, or as a GitHub CLI extension.
- Usage involves running the command with a markdown file or letting it detect a README file automatically.
- Options include dark/light mode, disabling auto-open/reload, setting host/port, and verbose output.
- Example provided for integrating with Neovim for markdown previews.
- Commands for regenerating assets and building the program are listed.
- References to related projects and tools are provided.