summaryrefslogtreecommitdiff
path: root/README.md
blob: 7d80df1457fb8a5947cbaaba07586a3b3bfbe157 (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
60
61
62
63
# Gitem

A static site generator for git repositories. Browse your git history locally with a GitHub-like interface.

## Installation

```
gem install gitem
```

## Usage

```
gitem serve                           # Generate and serve (default)
gitem serve -p 3000                   # Custom port
gitem serve --open                    # Open browser
gitem serve --no-generate             # Serve only
gitem generate                        # Generate only
gitem generate -o ./out               # Custom output
gitem generate -b /xlgmokha/gitem     # With base path for subdirectory hosting
```

### Hosting Multiple Projects

When hosting multiple projects under the same domain, use the `--base-path` option:

```bash
# For https://www.mokhan.ca/xlgmokha/net-hippie/
gitem generate -b /xlgmokha/net-hippie -o /var/www/mokhan.ca/xlgmokha/net-hippie

# For https://www.mokhan.ca/xlgmokha/gitem/
gitem generate -b /xlgmokha/gitem -o /var/www/mokhan.ca/xlgmokha/gitem
```

The base path will be automatically detected if not specified, but explicit configuration is recommended for production deployments.

## Requirements

- Ruby >= 3.4.0
- libgit2

### macOS

```
brew install libgit2
```

### Ubuntu/Debian

```
apt-get install libgit2-dev cmake
```

## Development

```
bin/setup
rake spec
```

## License

[MIT](https://opensource.org/licenses/MIT)