gollum 2.3.9 → 2.3.10
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of gollum might be problematic. Click here for more details.
- data/README.md +9 -1
- data/bin/gollum +4 -0
- data/gollum.gemspec +1 -1
- data/lib/gollum.rb +1 -1
- data/lib/gollum/frontend/app.rb +2 -0
- data/lib/gollum/frontend/templates/layout.mustache +1 -0
- data/lib/gollum/frontend/views/page.rb +4 -0
- data/lib/gollum/wiki.rb +6 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -534,7 +534,15 @@ Note that filenames on windows must not contain any of the following characters
|
|
534
534
|
|
535
535
|
## CONFIG FILE
|
536
536
|
|
537
|
-
Gollum
|
537
|
+
Gollum optionally takes a `--config file`. See [config.rb](https://github.com/github/gollum/blob/master/config.rb) for an example.
|
538
|
+
|
539
|
+
## CUSTOM CSS
|
540
|
+
|
541
|
+
The `--css` flag will inject `custom.css` from the root of your git repository into each page. Here's an example of floating the sidebar to the left.
|
542
|
+
|
543
|
+
```css
|
544
|
+
#wiki-rightbar { float: left !important; }
|
545
|
+
```
|
538
546
|
|
539
547
|
## CONTRIBUTE
|
540
548
|
|
data/bin/gollum
CHANGED
@@ -45,6 +45,10 @@ opts = OptionParser.new do |opts|
|
|
45
45
|
options['irb'] = true
|
46
46
|
end
|
47
47
|
|
48
|
+
opts.on("--css", "Inject custom css. Uses custom.css from root repository") do
|
49
|
+
wiki_options[:css] = true
|
50
|
+
end
|
51
|
+
|
48
52
|
opts.on("--page-file-dir [PATH]", "Specify the sub directory for all page files (default: repository root).") do |path|
|
49
53
|
wiki_options[:page_file_dir] = path
|
50
54
|
end
|
data/gollum.gemspec
CHANGED
data/lib/gollum.rb
CHANGED
@@ -23,7 +23,7 @@ require File.expand_path('../gollum/web_sequence_diagram', __FILE__)
|
|
23
23
|
require File.expand_path('../gollum/frontend/uri_encode_component', __FILE__)
|
24
24
|
|
25
25
|
module Gollum
|
26
|
-
VERSION = '2.3.
|
26
|
+
VERSION = '2.3.10'
|
27
27
|
|
28
28
|
def self.assets_path
|
29
29
|
::File.expand_path('gollum/frontend/public', ::File.dirname(__FILE__))
|
data/lib/gollum/frontend/app.rb
CHANGED
@@ -238,6 +238,7 @@ module Precious
|
|
238
238
|
@content = @page.formatted_data
|
239
239
|
@toc_content = wiki.universal_toc ? @page.toc_data : nil
|
240
240
|
@mathjax = wiki.mathjax
|
241
|
+
@css = wiki.css
|
241
242
|
@editable = false
|
242
243
|
mustache :page
|
243
244
|
end
|
@@ -360,6 +361,7 @@ module Precious
|
|
360
361
|
@content = page.formatted_data
|
361
362
|
@toc_content = wiki.universal_toc ? @page.toc_data : nil
|
362
363
|
@mathjax = wiki.mathjax
|
364
|
+
@css = wiki.css
|
363
365
|
mustache :page
|
364
366
|
elsif file = wiki.file(fullpath)
|
365
367
|
content_type file.mime_type
|
@@ -6,6 +6,7 @@
|
|
6
6
|
<link rel="stylesheet" type="text/css" href="{{base_url}}/css/editor.css" media="all">
|
7
7
|
<link rel="stylesheet" type="text/css" href="{{base_url}}/css/dialog.css" media="all">
|
8
8
|
<link rel="stylesheet" type="text/css" href="{{base_url}}/css/template.css" media="all">
|
9
|
+
{{#css}}<link rel="stylesheet" type="text/css" href="{{base_url}}/custom.css" media="all">{{/css}}
|
9
10
|
|
10
11
|
<!--[if IE 7]>
|
11
12
|
<link rel="stylesheet" type="text/css" href="{{base_url}}/css/ie7.css" media="all">
|
data/lib/gollum/wiki.rb
CHANGED
@@ -137,6 +137,10 @@ module Gollum
|
|
137
137
|
# Gets the boolean live preview value.
|
138
138
|
attr_reader :live_preview
|
139
139
|
|
140
|
+
# Injects custom css from custom.css in root repo.
|
141
|
+
# Defaults to false
|
142
|
+
attr_reader :css
|
143
|
+
|
140
144
|
# Public: Initialize a new Gollum Repo.
|
141
145
|
#
|
142
146
|
# path - The String path to the Git repository that holds the Gollum
|
@@ -186,11 +190,12 @@ module Gollum
|
|
186
190
|
@sanitization = options.fetch :sanitization, self.class.sanitization
|
187
191
|
@ws_subs = options.fetch :ws_subs, self.class.default_ws_subs
|
188
192
|
@history_sanitization = options.fetch :history_sanitization, self.class.history_sanitization
|
189
|
-
@live_preview = options.fetch :live_preview,
|
193
|
+
@live_preview = options.fetch :live_preview, true
|
190
194
|
@universal_toc = options.fetch :universal_toc, false
|
191
195
|
@mathjax = options.fetch :mathjax, false
|
192
196
|
@show_all = options.fetch :show_all, false
|
193
197
|
@collapse_tree = options.fetch :collapse_tree, false
|
198
|
+
@css = options.fetch :css, false
|
194
199
|
end
|
195
200
|
|
196
201
|
# Public: check whether the wiki's git repo exists on the filesystem.
|