diff --git a/README.md b/README.md index b0d81691..59f246a3 100644 --- a/README.md +++ b/README.md @@ -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 ` 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). diff --git a/lib/gollum/app.rb b/lib/gollum/app.rb index 3fde8bf2..e7deaaf0 100644 --- a/lib/gollum/app.rb +++ b/lib/gollum/app.rb @@ -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