mirror of
https://github.com/charmbracelet/glow.git
synced 2026-08-21 07:34:18 +02:00
Merge d7f4525ab3 into e5cb757278
This commit is contained in:
commit
0d6e23307f
1 changed files with 36 additions and 3 deletions
39
README.md
39
README.md
|
|
@ -110,13 +110,20 @@ Or just install it with `go`:
|
|||
go install github.com/charmbracelet/glow/v2@latest
|
||||
```
|
||||
|
||||
### Build (requires Go 1.21+)
|
||||
## Quickstart
|
||||
|
||||
Requirements: Go 1.21+.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/charmbracelet/glow.git
|
||||
cd glow
|
||||
go build
|
||||
```
|
||||
go version # confirm >= 1.21
|
||||
go build # produces ./glow
|
||||
./glow # TUI: browse Markdown in the current repo/dir
|
||||
./glow README.md # render a single file
|
||||
|
||||
### Build (requires Go 1.21+)
|
||||
|
||||
|
||||
[releases]: https://github.com/charmbracelet/glow/releases
|
||||
|
||||
|
|
@ -214,6 +221,14 @@ showLineNumbers: false
|
|||
# preserve newlines in the output
|
||||
preserveNewLines: false
|
||||
```
|
||||
## Keybindings (TUI)
|
||||
|
||||
| Action | Key |
|
||||
|---|---|
|
||||
| Quit | `q` |
|
||||
| Up/Down | `↑ / ↓` |
|
||||
| Page Up/Down | `PgUp / PgDn` |
|
||||
| Open Link | `Enter` |
|
||||
|
||||
## Contributing
|
||||
|
||||
|
|
@ -221,6 +236,14 @@ See [contributing][contribute].
|
|||
|
||||
[contribute]: https://github.com/charmbracelet/glow/contribute
|
||||
|
||||
## Testing
|
||||
|
||||
Runs all packages with go
|
||||
|
||||
```bash
|
||||
go test .
|
||||
```
|
||||
|
||||
## Feedback
|
||||
|
||||
We’d love to hear your thoughts on this project. Feel free to drop us a note!
|
||||
|
|
@ -229,6 +252,16 @@ We’d love to hear your thoughts on this project. Feel free to drop us a note!
|
|||
- [The Fediverse](https://mastodon.social/@charmcli)
|
||||
- [Discord](https://charm.sh/chat)
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- **Build fails:** Confirm `go version` is ≥ 1.21, then `go clean -modcache && go mod tidy`.
|
||||
- **“Undefined symbols when testing:** Use `go test .`, not `go test file_test.go`.
|
||||
- **No files in TUI:** Run `glow` from a directiory actually containing Markdown or a git repo; try `glow README.md` to verify/
|
||||
|
||||
|
||||
## License
|
||||
|
||||
[MIT](https://github.com/charmbracelet/glow/raw/master/LICENSE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue