This commit is contained in:
Colby Johnson 2026-08-08 12:13:55 +08:00 committed by GitHub
commit 0d6e23307f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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
Wed love to hear your thoughts on this project. Feel free to drop us a note!
@ -229,6 +252,16 @@ Wed 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)