~kornellapacz/gmnigit

3d32dc6d1aba0d4f63a74f48a613a61be1e1dc44 — Korneliusz Łapacz 5 months ago 2452840
add documentation
1 files changed, 22 insertions(+), 3 deletions(-)

M README.md
M README.md => README.md +22 -3
@@ 1,12 1,12 @@
# gmnigit

Static git gemini viewer. Inspired by [stagit](https://codemadness.org/git/stagit/log.html). Project is in early development, use in production is not recommended. Help is appreciated!
Static git gemini viewer written in golang. Inspired by [stagit](https://codemadness.org/git/stagit/log.html). Project is in early development, help is appreciated!

This repository is available at [sourcehut](https://git.sr.ht/~kornellapacz/gmnigit) and [gemini](gemini://lapacz-kornel.dev/git/gmnigit/).

## Installation

Unfortunately because of `replace` directive in `go.mod` you cannot simply get binary by running `go get …` but you can install it by running
Unfortunately because of `replace` directive in `go.mod` you cannot simply get binary by running `go get` but you can install it by running

```sh
git clone https://git.sr.ht/~kornellapacz/gmnigit


@@ 18,6 18,25 @@ place `gmnigit` binary somewhere in your `$PATH`.

## Usage

(optional) in root of bare git repository put file called `url` with url for cloning, for example
```
gmnigit ./path/to/repository/dir ./path/to/dist/dir
echo "https://git.sr.ht/~kornellapacz/gmnigit" > url
```

if the destination folder exists it will be deleted!
```
gmnigit ./path/to/repository/dir ./path/to/dest/dir
```

## Tips

You can automate building pages on push with git `post-receive` hook
```
#!/bin/sh

while read -r _ _ ref; do
	[ "$ref" != "refs/heads/master" ] && continue

	gmnigit . /dest/dir
done
```