Skip to content

brege/ghrm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ghrm

Preview GitHub-flavored Markdown locally using Hugo. Renders admonitions, Mermaid diagrams, KaTeX math, GeoJSON/TopoJSON maps, and light/dark theme toggling all whilst matching GitHub's README style.

Ethos

People who lose internet and power often: this tool is for you. It renders Markdown the exact same way as GitHub would. If you are offline and still need to make meaningful contributions, focusing on documentation is often the cromulent choice (no coding agents, no Wikipedia/GitHub available, etc).

The point of this tool is offline preview. Install once, then keep working with no network connection when power, internet, or both are unreliable.

Requirements

Install

git clone https://github.com/brege/ghrm.git
cd ghrm
make install

Usage

# one file
ghrm README.md

# multiple files, recursively
ghrm .

Opens a live-reloading preview in your browser. Edits to the file are reflected automatically.

Neovim

Add to your lazy.nvim config:

{ "brege/ghrm", ft = "markdown", config = function() require("ghrm").setup() end }

Commands: :Ghrm to start, :GhrmStop to stop, or just exit nvim.

Supported Features

  • Works offline
  • GitHub alert admonitions ([!NOTE], [!TIP], [!WARNING], etc.)
  • Collapsible <details> sections and normal Markdown formatting and highlighting
  • Mermaid diagrams
  • KaTeX math (inline, display, and fenced math blocks)
  • GeoJSON and TopoJSON maps
  • Light/dark theme toggle

Examples

ghrm README.md
ghrm test/basics.md
ghrm test/diagrams.md
ghrm .

Uninstall

make uninstall
make clean

About

A NeoVim plugin and Hugo server for previewing GitHub-flavored README's in a browser

Topics

Resources

Stars

Watchers

Forks

Contributors