# sgit
`sgit` builds static html pages from git repos.
## building
make dat shit
MARKDOWN= is set to 0, pass flag to make if you want markdown
formatting for readmes
run dat shit `./sgit repos out`
if `repos` is a repo (`.git/` exists), it generates one site in `out`.
if `repos` does not have a .git/ directory or bare repo it will scan direct child directories and generates one
site per repo, plus a top level index
## output layout
- `out/index.html` lists repos
- `out/repo1/index.html` summary/readme page
- `out/repo1/files.html` file tree
- `out/repo1/history.html` commit history
- `out/repo1/commits/.html`
- `out/repo1/file/.html`
## metadata
it reads meta data from .git/owner or .git/cloneurl or just repo/ if bare
- `owner` defaults to `unknown` if missing
- `cloneurl` shown when present; e.g.:
should probably make it so you can specify multiple clone urls neatly..
```
printf '%s\n' "https://git.larp.moe/dd/sgit.git > \
/path/to/repo/.git/cloneurl
```
## styling
all pages link to the relative path of your our dir for style.css
make a style.css in the root of the out directory.
- `out/style.css`
## caching
each repo output directory stores `.sgit-cache` with the last generated `head`.
if `head` has not changed, that repo is skipped.
## See Also
- [stagit](https://codemadness.org/git/stagit/)