This repository has been archived by the owner on Sep 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
Home
Vlad Ivanov edited this page May 10, 2016
·
3 revisions
Welcome to the ghostbin wiki!
Guide by @Hekter (source)
- Install Go. This is relatively easy, and the Go team explains it far better than I can over on their getting started page.
- Install Mercurial, either from the project website or from your local Linux distributor's package repository.
- Get a copy of the Ghostbin source. You can find instructions on GitHub on how to do that, from cloning the repository to getting a zip file.
- Make sure the Ghostbin source is in your
GOPATH
. TheGOPATH
is explained further in the Go documentation.
- 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. - Ghostbin uses Pygments to syntax-highlight pastes. Pygments can be downloaded from its project page. 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 topygmentize
.
-
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 $STYLE > public/css/theme-pygments.css
. Pygments includes the following styles by default:['monokai', 'manni', 'rrt', 'perldoc', 'borland', 'colorful', 'default', 'murphy', 'vs', 'trac', 'tango', 'fruity', 'autumn', 'bw', 'emacs', 'vim', 'pastie', 'friendly', 'native']
-
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.
That's should be all! Let us know over on Github if you run into any further issues and we'll do our best to help out.