@@ 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
```