+
Skip to content

alegrey91/go-grip

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

go-grip

Render your markdown files local
- with the look of GitHub

❓ About

go-grip is a lightweight, Go-based tool designed to render Markdown files locally, replicating GitHub's style. It offers features like syntax highlighting, dark mode, and support for mermaid diagrams, providing a seamless and visually consistent way to preview Markdown files in your browser.

This project is a reimplementation of the original Python-based grip, which uses GitHub's web API for rendering. By eliminating the reliance on external APIs, go-grip delivers similar functionality while being fully self-contained, faster, and more secure - perfect for offline use or privacy-conscious users.

⚡ Features

  • ⚡ Written in Go 👍
  • 📄 Render markdown to HTML and view it in your browser
  • 📱 Dark and light theme
  • 🎨 Syntax highlighting for code
  • Todo list like the one on GitHub
  • Support for github markdown emojis 👍 :bowtie:
  • Support for mermaid diagrams
graph TD;
      A-->B;
      A-->C;
      B-->D;
      C-->D;
Loading

Tip

Support of blockquotes (note, tip, important, warning and caution) see here

🚀 Getting started

To install go-grip, simply:

go install github.com/chrishrb/go-grip@latest

Tip

You can also use nix flakes to install this plugin. More useful information here.

🔨 Usage

To render the README.md file simply execute:

go-grip README.md
# or
go-grip

The browser will automatically open on http://localhost:6419. You can disable this behaviour with the -b=false option.

You can also specify a port:

go-grip -p 80 README.md

or just open a file-tree with all available files in the current directory:

go-grip -r=false

It's also possible to activate the darkmode:

go-grip -d .

To terminate the current server simply press CTRL-C.

📝 Examples

examples

🐛 Known TODOs / Bugs

  • Tests and refactoring
  • Make it possible to export the generated html

📌 Similar tools

This tool is a Go-based reimplementation of the original grip, offering the same functionality without relying on GitHub's web API.

About

Preview Markdown files locally before committing them.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 65.7%
  • Go 22.4%
  • HTML 8.3%
  • Makefile 2.4%
  • Nix 1.2%
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载