git.nmyk.io / bidet

@ 2b9e13786d6dff5c324880d0a26bd000123e9156

refs | commits



README.md

# [bidet](https://nmyk.io/bidet)

```
 ___
[___]       _
|  ~|     =)_)=
|   |      (_(
|   |      )_)
\___|
 |  `========,
__`.  BIDET .'___
    `.    .'
    _|    |_...
   (________);;;;
        :::::::'
```
Bidet is a pure HTML server-side rendered web interface for git repositories.
It is hooked up to the plumbing, but it's all output, no input.

* Minimal, fast, easy to deploy
* Supports clone, fetch, and pull operations
* Straightforward to style with custom CSS; templates use no custom classes

## Installation

```
go install nmyk.io/bidet/cmd/bidet@latest
```

## Usage

### Options
  * `-p`, `--port`: port for the server (default: 8080)
  * `-h`, `--hostname`: hostname of server
  * `-g`, `--greeting`: greeting for index page
  * `-d`, `--directory`: directory containing your bare git repositories (default: `.`)
  * `-s`, `--css`: path or URL to a CSS stylesheet

Bidet can also be configured with environment variables:
```
BIDET_PORT
BIDET_HOSTNAME
BIDET_GREETING
BIDET_DIRECTORY
BIDET_CSS
```

### Hostname

The `--hostname` flag or `BIDET_HOSTNAME` variable should match the host people will use in `git clone` commands.

### Greeting

The `--greeting` flag or `BIDET_GREETING` variable is an optional subheader for your repository index page.
Describe the purpose of your site, write a funny message, or leave it blank.

### Custom CSS

Unlike centralized, corporate-owned git web hosts, Bidet's appearance is fully customizable.
Its templates only use classless elements so there's no naming scheme you need to learn before writing your own stylesheet.
It's pretty much just `<p>`, `<a>`, `<hr>`, some lists (`<ul>`/`<li>`), heading elements (`<h1>` to `<h4>`), and `<pre>`.

The `--css` flag or `BIDET_CSS` environment variable accepts a local CSS file path or a URL.
The custom stylesheet is loaded once at startup, so external CSS files will not be hotlinked.

## Contributing

```shell
git clone https://git.nmyk.io/bidet.git
```

Send your patch in plain text `git diff` format to bidet@git.nmyk.io.

## Version history

* 0.1.0: initial release