2024-10-09 23:48:08 +02:00
<!-- PROJECT LOGO -->
2024-10-09 22:03:53 +02:00
<br />
<div align="center">
<a href="#">
2024-10-09 23:48:08 +02:00
<img src=".github/docs/logo-1.png" alt="Logo" height="120">
2024-10-09 22:03:53 +02:00
</a>
2024-10-09 23:48:08 +02:00
<h3 align="center">go-grip</h3>
<p align="center">
Render your markdown files local<br>- with the look of GitHub
</p>
2024-10-09 22:03:53 +02:00
</div>
2024-10-11 00:02:52 +02:00
## ⚡️ Features
2024-12-18 23:27:18 +01:00
* ⚡️ Written in Go :+1:
2024-10-11 00:02:52 +02:00
* 📄 Render markdown to HTML and view it in your browser
* 📱 Dark and white mode
* 🎨 Syntax highlighting for code
* [x] Todo list like the one on GitHub
2024-12-18 23:27:18 +01:00
* Support for github markdown emojis :+1: :bowtie:
2024-10-31 18:36:41 +01:00
* Support for mermaid diagrams
```mermaid
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
```
2024-10-11 00:02:52 +02:00
> [!TIP]
> Support of blockquotes (note, tip, important, warning and caution) [see here](https://github.com/orgs/community/discussions/16925)
2024-10-31 18:36:41 +01:00
2024-10-10 00:13:28 +02:00
## 🚀 Getting started
2024-10-09 23:48:08 +02:00
To install go-grip, simply:
```bash
go install github.com/chrishrb/go-grip@latest
```
2024-10-09 22:03:53 +02:00
2024-10-10 18:31:41 +02:00
> [!TIP]
> You can also use nix flakes to install this plugin.
> More useful information [here](https://nixos.wiki/wiki/Flakes).
2024-10-10 00:13:28 +02:00
## 🔨 Usage
2024-10-09 22:03:53 +02:00
2024-10-10 00:13:28 +02:00
To render the `README.md` file simply execute:
2024-10-09 22:03:53 +02:00
2024-10-09 23:48:08 +02:00
```bash
go-grip README.md
2024-10-10 00:13:28 +02:00
# or
go-grip
2024-10-09 22:03:53 +02:00
```
2024-10-09 23:48:08 +02:00
2024-10-10 00:13:28 +02:00
The browser will automatically open on http://localhost:6419. You can disable this behaviour with the `-b=false` option.
2024-10-09 23:48:08 +02:00
You can also specify a port:
```bash
go-grip -p 80 README.md
2024-10-09 22:03:53 +02:00
```
2024-10-09 23:48:08 +02:00
or just open a file-tree with all available files in the current directory:
```bash
2024-10-10 00:13:28 +02:00
go-grip -r=false
2024-10-09 23:48:08 +02:00
```
It's also possible to activate the darkmode:
```bash
go-grip -d .
```
To terminate the current server simply press `CTRL-C` .
2024-10-10 00:13:28 +02:00
## 📝 Examples
2024-10-09 23:48:08 +02:00
2024-10-11 00:02:52 +02:00
<img src="./.github/docs/example-1.png" alt="examples" width="1000"/>
2024-10-09 23:48:08 +02:00
2024-10-10 00:34:56 +02:00
## 🐛 Known TODOs / Bugs
* [ ] Tests and refactoring
2024-10-11 00:02:52 +02:00
* [ ] Make it possible to export the generated html
2024-10-10 00:34:56 +02:00
2024-10-10 00:13:28 +02:00
## 📌 Similar tools
2024-10-09 23:48:08 +02:00
2024-10-11 00:02:52 +02:00
This tool is a Go-based reimplementation of the original [grip ](https://github.com/joeyespo/grip ), offering the same functionality without relying on GitHub's web API.