diff --git a/Home.md b/Home.md deleted file mode 100644 index 6edf0edb..00000000 --- a/Home.md +++ /dev/null @@ -1,3 +0,0 @@ -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vulputate tincidunt sollicitudin. Quisque sit amet leo sed nunc eleifend rhoncus in consectetur leo. Vivamus posuere semper convallis. Duis malesuada lacus sed erat lobortis tincidunt mattis ligula consectetur. Sed aliquam vulputate eros at euismod. Aenean egestas lorem ligula, quis faucibus turpis. Curabitur a eros in ipsum gravida ornare. Sed elementum enim vel mi scelerisque dapibus. Nulla id libero ligula, quis tempus sem. Morbi nec felis tortor, ac cursus risus. Mauris elementum tortor id lacus eleifend non lobortis tellus pharetra. Etiam posuere cursus vestibulum. $x \lt y$ - -Morbi tincidunt dolor vel massa dictum volutpat. Vestibulum quis nibh metus, id tincidunt nisl. Vivamus eget sem ac risus eleifend rhoncus at eu nisl. Nunc elit massa, vulputate ac gravida eget, condimentum quis justo. Integer scelerisque, libero vel consequat ultricies, eros libero sagittis libero, pellentesque bibendum quam massa ut orci. Maecenas sit amet urna eget quam aliquam posuere. Nulla facilisi. Duis imperdiet augue sit amet metus ornare et hendrerit dui feugiat. Aenean a lacus neque. Sed eu enim tincidunt dolor pharetra porttitor. Vestibulum ut felis dui, rutrum iaculis orci. Duis eu bibendum tortor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse mollis sagittis purus sit amet sollicitudin. Phasellus vel interdum erat. \ No newline at end of file diff --git a/README.md b/README.md index 7e04c898..8022b102 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -gollum -- A wiki built on top of Git +gollum -- A git-based Wiki ==================================== [](http://badge.fury.io/rb/gollum) @@ -7,181 +7,208 @@ gollum -- A wiki built on top of Git ## DESCRIPTION -**New: Gollum is now [compatible with JRuby](https://github.com/gollum/gollum/wiki/Git-adapters#rjgit-java). Just run `gem install gollum` to install.** +Gollum is a simple wiki system built on top of Git. A Gollum Wiki is simply a git repository (either bare or regular) of a specific nature: +* A Gollum repository's contents are human-editable, unless the repository is bare. Pages are unique text files which may be organized into directories any way you choose. Other content can also be included, for example images, PDFs and headers/footers for your pages. +* Gollum pages: + * May be written in a variety of [markups](#markups). + * Can be edited with your favourite system editor or IDE (changes will be visible after committing) or with the built-in web interface. + * Can be displayed in all versions (commits). -Gollum is a simple wiki system built on top of Git. +Gollum can be launched either as a webserver (with the web interface) or in "console mode", where you can use a predefined API to query and manipulate the repository. For more information, see the [Running](#running) and [Configuration](#configuration) sections. -Gollum wikis are simply Git repositories that adhere to a specific format. -Gollum pages may be written in a variety of formats and can be edited in a -number of ways depending on your needs. You can edit your wiki locally: +For more information on Gollum's capabilities and pitfalls: -* With your favorite text editor or IDE (changes will be visible after committing). -* With the built-in web interface. -* With the Gollum Ruby API. - -Gollum follows the rules of [Semantic Versioning](http://semver.org/) and uses -[TomDoc](http://tomdoc.org/) for inline documentation. +1. [Syntax/capability overview for pages](https://github.com/gollum/gollum/wiki). +2. [Known limitations](https://github.com/gollum/gollum/wiki/Known-limitations). +3. [Security overview](https://github.com/gollum/gollum/wiki/Security). ## SYSTEM REQUIREMENTS -- Python 2.5+ (2.7.3 recommended) -- Ruby 1.9.3+ (1.9.3 recommended) (JRuby compatible!) -- Unix like operating system (OS X, Ubuntu, Debian, and more) -- Will not work on Windows with the default [grit](https://github.com/github/grit) adapter, but might work via JRuby (please let us know!) +| Operating System | Ruby | Adapters | Supported | +| ---------------- | -------------- | ------------------ | --------- | +| Unix/Linux-like | Ruby 1.9.3+ | all except [RJGit](https://github.com/repotag/rjgit) | yes | +| Unix/Linux-like | [JRuby](https://github.com/jruby/jruby) (1.9.3+ compatible) | [RJGit](https://github.com/repotag/rjgit) | yes | +| Windows | Ruby 1.9.3+ | all except [RJGit](https://github.com/repotag/rjgit) | no | +| Windows | [JRuby](https://github.com/jruby/jruby) (1.9.3+ compatible) | [RJGit](https://github.com/repotag/rjgit) | almost1 | -## SECURITY +**Notes:** -Don't enable `--custom-css`, `--custom-js` or `--mathjax-config` unless you trust every user who has the ability to edit the wiki. -A better solution with more security is being tracked in [#665](https://github.com/gollum/gollum/issues/665). +1. There are still some bugs and this setup is not ready for production yet. You can track the progress at #1044. ## INSTALLATION -The best way to install Gollum is with RubyGems: +Varies depending on operating system, package manager and Ruby installation. Generally, you should first install Ruby and then Gollum. -```bash -$ [sudo] gem install gollum -``` -You may first need to install some additional [development packages](https://github.com/gollum/gollum/wiki/Installation) for your OS. +1. Ruby is best installed either via [RVM](https://rvm.io/) or a package manager of choice. +2. Gollum is best installed via RubyGems: + ``` + [sudo] gem install gollum + ``` -If you're installing from source, you can use [Bundler][bundler] to pick up all the -gems: +Installation examples for individual systems can be seen [here](https://github.com/gollum/gollum/wiki/Installation). -```bash -$ bundle install -``` +**Notes:** +* Whichever Ruby implementation you're using, Gollum ships with the appropriate default git adapter. So the above installation procedure is common for both MRI and JRuby. +* If you're installing from source: + * Optionally uninstall any previous versions of Gollum: + ``` + [sudo] gem uninstall -aIx gollum + ``` + * Install [Bundler](http://bundler.io/). + * Navigate to the cloned source of Gollum. + * Install dependencies: + ``` + [sudo] bundle install + ``` + * Build: + ``` + rake build + ``` + * And install: + ``` + [sudo] gem install --no-ri --no-rdoc pkg/gollum*.gem + ``` -In order to use the various formats that Gollum supports, you will need to -separately install the necessary dependencies for each format. You only need -to install the dependencies for the formats that you plan to use. +### Markups -* [AsciiDoc](http://asciidoctor.org) -- `gem install asciidoctor` -* [Creole](http://www.wikicreole.org/) -- `gem install creole` -* [Markdown](http://daringfireball.net/projects/markdown/) -- `gem install redcarpet` -* [GitHub Flavored Markdown](https://help.github.com/articles/github-flavored-markdown) -- `gem install github-markdown` -* [Org](http://orgmode.org/) -- `gem install org-ruby` -* [Pod](http://search.cpan.org/dist/perl/pod/perlpod.pod) -- `Pod::Simple::HTML` comes with Perl >= 5.10. Lower versions should install Pod::Simple from CPAN. +Gollum presently ships with support for the following markups: +* [Markdown](http://daringfireball.net/projects/markdown/syntax) * [RDoc](http://rdoc.sourceforge.net/) -* [ReStructuredText](http://docutils.sourceforge.net/rst.html) -- `easy_install docutils` -* [Textile](http://en.wikipedia.org/wiki/Textile_(markup_language)) -- `gem install RedCloth` -* [MediaWiki](http://www.mediawiki.org/wiki/Help:Formatting) -- `gem install wikicloth` -[bundler]: http://gembundler.com/ - - -## SYNTAX - -Gollum supports a variety of formats and extensions (Markdown, MediaWiki, Textile, …). -On top of these formats Gollum lets you insert headers, footers, links, image, math and more. - -Check out the [Gollum Wiki](https://github.com/gollum/gollum/wiki) for all of Gollum's formats and syntactic options. +Since all markups are rendered by the [github-markup](https://github/com/github/markup) gem, you can easily add support for other markups by additional installation: +* [AsciiDoc](http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/) -- `[sudo] gem install asciidoctor` +* [Creole](http://www.wikicreole.org/wiki/CheatSheet) -- `[sudo] gem install creole` +* [GitHub Flavored Markdown](https://help.github.com/articles/github-flavored-markdown) -- `[sudo] gem install github-markdown` +* [MediaWiki](http://www.mediawiki.org/wiki/Help:Formatting) -- `[sudo] gem install wikicloth` +* [Org](http://orgmode.org/worg/dev/org-syntax.html) -- `[sudo] gem install org-ruby` +* [Pod](http://perldoc.perl.org/perlpod.html) -- requires Perl >= 5.10 (the `perl` command must be available on your command line) + * Lower versions should install `Pod::Simple` from CPAN. +* [ReStructuredText](http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html) -- requires python >= 2 (the `python2` command must be available on your command line) + * Note that Gollum will also need you to install `docutils` for your Python 2. Installation procedure can, again, vary depending on operating system and package manager. +* [Textile](http://redcloth.org/hobix.com/textile/quick.html) -- `[sudo] gem install RedCloth` +By default, Gollum ships with the `kramdown` gem to render Markdown. However, you can use any [Markdown renderer supported by github-markup](https://github.com/github/markup/blob/master/lib/github/markup/markdown.rb). The thing to remember is that the first installed renderer from the list will be used. So, for example, `redcarpet` will NOT be used if `github/markdown` is installed. ## RUNNING -To view and edit your Gollum repository locally via the built in web -interface, simply install the Gollum gem, navigate to your repository via the -command line, and run the executable: +Simply: + +1. Navigate to your git repository (wiki) via the command line. +2. Run: `gollum`. +3. Open `http://localhost:4567` in your browser. + +If you wish to run from source, simply: + +1. Navigate to your git repository (wiki) via the command line. +2. Run: `bundle exec bin/gollum` +3. Open `http://localhost:4567` in your browser. + +This will start up a web server (WEBrick) running Gollum with a web interface, where you can view and edit your wiki. + +### Rack + +Gollum can also be ran with any [rack-compatible web server](https://github.com/rack/rack#supported-web-servers). More on that [over here](https://github.com/gollum/gollum/wiki/Gollum-via-Rack). + +### Docker + +Gollum can also be ran via [Docker](https://www.docker.com/). More on that [over here](https://github.com/gollum/gollum/wiki/Gollum-via-Docker). + +### Service + +Gollum can also be ran as a service. More on that [over here](https://github.com/gollum/gollum/wiki/Gollum-as-a-service). + +## CONFIGURATION + +Gollum comes with the following command line options: + +| Option | Arguments | Description | +| ----------------- | --------- | ----------- | +| --host | [HOST] | Specify the hostname or IP address to listen on. Default: `0.0.0.0`.1 | +| --port | [PORT] | Specify the port to bind Gollum with. Default: `4567`. | +| --gollum-path | [PATH] | Specify path to the Gollum git repository. Default: current working directory. | +| --config | [CONFIG] | Path to the configuration file. | +| --ref | [REF] | Specify the git branch to serve. Default: `master`. | +| --bare | none | Tell Gollum that the git repository should be treated as bare. This is only necessary when using the default grit adapter. | +| --base-path | [PATH] | Specify the leading portion of all page URLs. Default: `/`. For example, if set to `wiki`, all pages will be accessible under `http://localhost:4567/wiki/` by default. | +| --page-file-dir | [PATH] | Specify the subdirectory for all pages. If set, Gollum will only serve pages from this directory. Default: repository root. | +| --css | none | Tell Gollum to inject custom CSS into each page. Uses `custom.css` from repository root.2,4 | +| --js | none | Tell Gollum to inject custom JS into each page. Uses `custom.js` from repository root.2,4 | +| --no-edit | none | Disables the feature of editing pages. | +| --live-preview | none | Enables the live preview feature in page editor. | +| --no-live-preview | none | Disables the live preview feature in page editor. | +| --allow-uploads | [MODE] | Enables file uploads. If set to `dir`, Gollum will store all uploads in the `/uploads/` directory. If set to `page`, Gollum will store each upload at the same location as the page that is currently being edited.3 | +| --template-dir | [PATH] | Specify custom mustache template directory. | +| --show-all | none | Tell Gollum to also show files in the file view. By default, only valid pages are shown. | +| --collapse-tree | none | Tell Gollum to collapse the file tree, when the file view is opened. By default, the tree is expanded. | +| --mathjax | none | Enables MathJax (renders mathematical equations). By default, uses the `TeX-AMS-MML_HTMLorMML` config with the `autoload-all` extension.4 | +| --mathjax-config | [PATH] | Specify path for custom MathJax config. By default, uses `mathjax.config.js` from repository root. | +| --h1-title | none | Tell Gollum to use the first `