smithy

ref: 636a57e0955298464f1f2546de923c6d434d3431

./README.md


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
Smithy
===============================================================================

*smithy* (n) A blacksmith's shop; a forge.

Smithy is a web frontend for git repositories.  It's implemented entirely in
Golang, compiles to a single binary, and it's fast and easy to deploy.  Smithy
is an alternative to cgit or gitweb, and doesn't seek to compete with Gitea and
the like.

* Golang
* Single binary
* Easy to deploy
* Fast
* Customizable
* Free software
* Javascript-free

Building
-------------------------------------------------------------------------------

The only dependency is [Golang](https://golang.org/).

```
$ git clone https://github.com/honza/smithy
$ make
$ ./smithy --help
```

Installing
-------------------------------------------------------------------------------

```
$ smithy generate > config.yaml
$ smithy serve --config smithy.yaml
```

Configuration
-------------------------------------------------------------------------------

``` yaml
title: Smithy, a lightweight git forge
description: Publish your git repositories with ease
port: 3456
git:
  root: "/var/www/git"
  repos:
    - path: "some-cool-project"
      slug: "some-cool-project"
      title: "Some Cool Project"
      description: "Something really cool to change the world"
    - path: "ugly-hacks"
      exclude: true

static:
  root:
  prefix: /static/

templates:
  dir:
```

Customizing templates and css
-------------------------------------------------------------------------------

Out of the box, smithy bundles templates and css in the binary.  Setting
`static.root`, and `templates.dir` to empty string will cause smithy to use the
bundled assets.

If you'd like to customize the templates or the css, copy the `include`
directory somewhere, and then set `static.root`, and `templates.dir` to that
directory.

Demo
-------------------------------------------------------------------------------

Smithy is currently hosting [itself on my
domain](https://smithy.honza.ca/smithy).

Contributing
-------------------------------------------------------------------------------

Contributions are most welcome.  You can open a pull request on
[GitHub](https://github.com/honza/smithy), or email a patch to `me@honza.ca`.

License
-------------------------------------------------------------------------------

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with
this program.  If not, see <https://www.gnu.org/licenses/>.