blob: 80169d3cef7909ea6cdaf3dbfb13f2608321fd82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# gitmal
A static site generator for Git repositories. Generates browsable HTML pages similar to GitHub's repository interface, with code browsing, commit history, branches, and tags.
## Usage
```bash
gitmal [options] [path]
```
### Options
- `--output` - Output directory (default: `output`)
### Example
```bash
gitmal --output=./site /path/to/repo
```
## Output
Generates a static site with:
- **Code browser** - Syntax-highlighted source files with line numbers
- **Markdown rendering** - README files rendered with GitHub-flavored markdown
- **Commit history** - Paginated commit logs with diff views
- **Branches & Tags** - Navigation between refs
- **Atom feeds** - For commits, tags, and releases
## URL Structure
Generated paths follow GitHub repository conventions:
| Path | Description |
|------|-------------|
| `/index.html` | Repository root (file listing) |
| `/blob/<ref>/<path>/index.html` | Directory listing |
| `/blob/<ref>/<file>.html` | File view (syntax highlighted) |
| `/commit/<hash>.html` | Commit diff view |
| `/commits/<ref>/index.html` | Commit history (page 1) |
| `/commits/<ref>/page-N.html` | Commit history (page N) |
| `/branches.html` | Branches list |
| `/tags.html` | Tags list |
| `/compare/<base>...<head>/` | Diff between refs |
### Feeds & API
| Path | Description |
|------|-------------|
| `/commits/<ref>.atom` | Commits Atom feed |
| `/commits/<ref>.json` | Commits JSON |
| `/tags.atom` | Tags Atom feed |
| `/releases.atom` | Releases Atom feed |
| `/branches.json` | Branches JSON |
## License
MIT
|