Mercurial
comparison hg-web/README.md @ 195:f8f5004a920a
Merging back hg-web-tip
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Tue, 27 Jan 2026 06:51:44 -0800 |
| parents | b818a4561a3c |
| children |
comparison
equal
deleted
inserted
replaced
| 189:14cc84ba35a0 | 195:f8f5004a920a |
|---|---|
| 1 # hg-web | |
| 2 | |
| 3 A web-based Mercurial repository browser. Provides a GitHub-style interface for browsing files, viewing code with syntax highlighting, and reading markdown documentation. | |
| 4 | |
| 5 ## Features | |
| 6 | |
| 7 - Browse repository files and directories | |
| 8 - View code files with syntax highlighting (highlight.js) | |
| 9 - Render markdown files with WASM-based converter | |
| 10 - Dark/light theme support with system preference detection | |
| 11 - Prefetch on hover for faster navigation | |
| 12 | |
| 13 ## Structure | |
| 14 | |
| 15 ``` | |
| 16 hg-web/ | |
| 17 ├── BUILD # Bazel build configuration | |
| 18 ├── deploy.sh # Deployment script | |
| 19 ├── main.c # C server handling API routes | |
| 20 └── src/ # Frontend source files | |
| 21 ``` | |
| 22 | |
| 23 ## Building | |
| 24 | |
| 25 ```bash | |
| 26 bazel build //hg-web:hg_web | |
| 27 ``` | |
| 28 | |
| 29 ## API Endpoints | |
| 30 | |
| 31 The C server (`main.c`) provides: | |
| 32 | |
| 33 - `GET /api/repo/list?path=` - List directory contents | |
| 34 - `GET /api/repo/file?path=` - Fetch file contents |