main
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:
# 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