|
|
Welcome to the ghostbin wiki!
|
|
|
## Installation
|
|
|
<sup>Guide by @Hekter (<a href="https://github.com/DHowett/ghostbin/issues/32#issuecomment-158693412">source</a>)</sup>
|
|
|
|
|
|
1. Install Go. This is relatively easy, and the Go team explains it far better than I can over on their [getting started page](https://golang.org/doc/install).
|
|
|
2. Install [Mercurial](https://www.mercurial-scm.org/wiki/Download), either from the project website or from your local Linux distributor's package repository.
|
|
|
3. Get a copy of the Ghostbin source. You can find instructions on GitHub on how to do that, from cloning the [repository](https://github.com/DHowett/ghostbin) to getting a zip file.
|
|
|
- Make sure the Ghostbin source is in your `GOPATH`. The `GOPATH` is explained further [in the Go documentation](https://golang.org/doc/code.html#GOPATH).
|
|
|
4. Run `go get` from the Ghostbin directory.
|
|
|
- If you get an error stating that `$GOPATH` is not set, see step 3.
|
|
|
Run "go build". This should be the easiest step assuming Step 3 went off without a hitch.
|
|
|
5. Run `go build`.
|
|
|
6. Ghostbin uses Pygments to syntax-highlight pastes. Pygments can be downloaded from [its project page](http://pygments.org/download/). Keep in mind the path to `pygmentize` as you install it.
|
|
|
- Your local Linux distributor may have a pygments package. If you install the aforementioned package, the path to `pygmentize` will probably be something like `/usr/bin/pygmentize`.
|
|
|
- Update Ghostbin's `languages.yml` to reflect the path to `pygmentize`.
|
|
|
7. Pygments is great, but the highlighted code it generates will be decidedly free of colour. To fix that, we need a stylesheet. You can generate one with `pygmentize -f html -S <theme> > public/css/pygments.css`, or you can grab [the official Ghostbin stylesheet](/css/pygments.css) and place it in `public/css`.
|
|
|
8. Presuming that everything was done correctly, you should be able to run `./ghostbin` in your Ghostbin directory now! Ghostbin will by default bind to port 8080, and you can access this on the host machine by visiting [http://localhost:8080](http://localhost:8080).
|
|
|
|
|
|
That's should be all! Let us know over on [Github](https://github.com/DHowett/ghostbin) if you run into any further issues and we'll do our best to help out. |