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
GOPATHis explained further in the Go documentation.
go getfrom the Ghostbin directory.
- If you get an error stating that
$GOPATHis not set, see step 3.
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
pygmentizeas you install it.
- Your local Linux distributor may have a pygments package. If you install the aforementioned package, the path to
pygmentizewill probably be something like
- Update Ghostbin's
languages.ymlto reflect the path to
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
./ghostbinin 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.