This commit is contained in:
Bart Kamphorst
2015-11-30 00:28:30 +01:00
2 changed files with 11 additions and 7 deletions
+9 -6
View File
@@ -98,14 +98,17 @@ Simply:
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.
### Running from source
1. `git clone https://github.com/gollum/gollum`
2. `cd gollum`
3. `[sudo] bundle install` (may not always be necessary).
4. `bundle exec bin/gollum`
* Like that, gollum assumes the target wiki (git repository) is the project repository itself. If it's not, execute `bundle exec bin/gollum <path-to-wiki>` instead.
5. Open `http://localhost:4567` in your browser.
### 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).
+2 -1
View File
@@ -179,7 +179,7 @@ module Precious
halt 500 unless tempfile.is_a? Tempfile
# Remove page file dir prefix from upload path if necessary -- committer handles this itself
dir = wiki.per_page_uploads ? params[:upload_dest].match(/^(#{wiki.page_file_dir}\/+)?(.*)/)[2] : 'uploads'
dir = wiki.per_page_uploads ? params[:upload_dest] : ::File.join([wiki.page_file_dir, 'uploads'].compact)
ext = ::File.extname(fullname)
format = ext.split('.').last || 'txt'
filename = ::File.basename(fullname, ext)
@@ -358,6 +358,7 @@ module Precious
@mathjax = wiki.mathjax
@h1_title = wiki.h1_title
@editable = false
@bar_side = wiki.bar_side
@allow_uploads = wiki.allow_uploads
mustache :page
end