config_test.rb
... ...
@@ -0,0 +1,288 @@
1
+ # Launch Gollum using a specific git adapter. See https://github.com/gollum/gollum/wiki/Git-adapters
2
+ # Default: rugged
3
+ #
4
+ # Equivalent to --adapter [ADAPTER]
5
+
6
+require 'gollum/app'
7
+require 'pandoc-ruby'
8
+
9
+ module Gollum
10
+ # to require 'my_adapter':
11
+ Gollum::GIT_ADAPTER = "my"
12
+ end
13
+
14
+ wiki_options = {
15
+
16
+ ##############################################################################
17
+ #-----------------------------------------------------------------------------
18
+
19
+ #-----------------------------------------------------------------------------
20
+ # Enable file uploads. If set to 'dir', Gollum will store all uploads in the
21
+ # /uploads/ directory in repository root. If set to 'page', Gollum will
22
+ # store each upload at the currently edited page.
23
+ # Default: false
24
+
25
+ # Equivalent to --allow-uploads dir
26
+ #allow_uploads: true,
27
+
28
+ # Equivalent to --allow-uploads page
29
+ #allow_uploads: true,
30
+ #per_page_uploads: true,
31
+
32
+ #-----------------------------------------------------------------------------
33
+ # Set the path to look for static assets.
34
+ #
35
+ # Equivalent to --assets [PATH]
36
+
37
+ #static_assets_path: [PATH]
38
+
39
+ #-----------------------------------------------------------------------------
40
+ # Tell Gollum that the git repository should be treated as bare.
41
+ #
42
+ # Equivalent to --bare
43
+
44
+ #repo_is_bare: true,
45
+
46
+ #-----------------------------------------------------------------------------
47
+ # Specify the leading portion of all Gollum URLs (path info). Setting this to
48
+ # /wiki will make the wiki accessible under http://localhost:4567/wiki/.
49
+ # Default: /
50
+ #
51
+ # Equivalent to --base-path [PATH]
52
+
53
+ #base_path: [PATH],
54
+
55
+ #-----------------------------------------------------------------------------
56
+ # Enable support for annotations using CriticMarkup.
57
+ #
58
+ # Equivalent to --critic-markup
59
+
60
+ #critic_markup: true,
61
+
62
+ #-----------------------------------------------------------------------------
63
+ # Tell Gollum to inject custom CSS into each page. Uses custom.css from wiki
64
+ # root
65
+ #
66
+ # Equivalent to --css
67
+
68
+ css: true,
69
+
70
+ #-----------------------------------------------------------------------------
71
+ # What should the default keybinding be on the edit page? Note: the editor will anyway remember the last choice the user made, so this is only to specify the default.
72
+
73
+ #default_keybinding: vim
74
+ #default_keybinding: emacs
75
+
76
+ #-----------------------------------------------------------------------------
77
+ # Parse and interpret emoji tags (e.g. :heart:) except when the leading colon
78
+ # is backslashed (e.g. \:heart:).
79
+ #
80
+ # Equivalent to --emoji
81
+
82
+ #emoji: true,
83
+
84
+ #-----------------------------------------------------------------------------
85
+ # Tell Gollum to use the first <h1> as page title.
86
+ #
87
+ # Equivalent to --h1-title
88
+
89
+ h1_title: true,
90
+
91
+ #-----------------------------------------------------------------------------
92
+ # Specify the hostname or IP address to listen on.
93
+ # Default: '0.0.0.0'.
94
+ #
95
+ # Equivalent to --host [HOST]
96
+
97
+ # ???
98
+
99
+ #-----------------------------------------------------------------------------
100
+ # Launch Gollum in "console mode", with a predefined API.
101
+ #
102
+ # Equivalent to --irb
103
+
104
+ # ???
105
+
106
+ #-----------------------------------------------------------------------------
107
+ # Tell Gollum to inject custom JS into each page. Uses custom.js from wiki
108
+ # root.
109
+ #
110
+ # Equivalent to --js
111
+
112
+ #js: true,
113
+
114
+ #-----------------------------------------------------------------------------
115
+ # Compatibility with 4.x
116
+ # https://github.com/gollum/gollum/wiki/5.0-release-notes#compatibility-option
117
+ #
118
+ # Internal links resolve case-insensitively, will treat spaces as hyphens, and
119
+ # will match the first page found with a certain filename, anywhere in the
120
+ # repository. Provides compatibility with Gollum 4.x.
121
+ #
122
+ # Equivalent to --lenient-tag-lookup
123
+
124
+ #hyphened_tag_lookup: true,
125
+ #case_insensitive_tag_lookup: true,
126
+ #global_tag_lookup: true,
127
+
128
+ #-----------------------------------------------------------------------------
129
+ # Use the browser's local timezone instead of the server's timezone for displaying dates.
130
+
131
+ #show_local_time: true
132
+
133
+ #-----------------------------------------------------------------------------
134
+ # Equivalent to --math. Set math parsing to either mathjax or katex (default)
135
+
136
+ #math: :mathjax,
137
+ #math: :katex,
138
+
139
+ #-----------------------------------------------------------------------------
140
+ # Specify path to a custom MathJax configuration.
141
+ # Default: mathjax.config.js file from repository root.
142
+ #
143
+ # Equivalent to --mathjax-config [FILE]
144
+
145
+ #mathjax_config: [FILE],
146
+
147
+ #-----------------------------------------------------------------------------
148
+ # Do not render metadata tables in pages.
149
+ #
150
+ # Equivalent to --no-display-metadata
151
+
152
+ display_metadata: false,
153
+
154
+ #-----------------------------------------------------------------------------
155
+ # Disable the feature of editing pages.
156
+ # Default: true
157
+ #
158
+ # Equivalent to --no-edit
159
+
160
+ allow_editing: false,
161
+
162
+ #-----------------------------------------------------------------------------
163
+ # Specify the subdirectory for all pages. If set, Gollum will only serve pages
164
+ # from this directory and its subdirectories.
165
+ # Default: repository root.
166
+ #
167
+ # Equivalent to --page-file-dir [PATH]
168
+
169
+ #page_file_dir: [PATH],
170
+
171
+ #-----------------------------------------------------------------------------
172
+ # Follow pages across renames in the History view. You may set this to `false` to improve performance on wikis with very large histories.
173
+ # Default: true.
174
+
175
+ #follow_renames: true,
176
+
177
+ #-----------------------------------------------------------------------------
178
+ # Specify the port to bind Gollum with.
179
+ # Default: 4567.
180
+ #
181
+ # Equivalent to --port [PORT]
182
+
183
+ # ???
184
+
185
+ #-----------------------------------------------------------------------------
186
+ # Specify the git branch to serve.
187
+ # Default: master.
188
+ #
189
+ # Equivalent to --ref [REF]
190
+
191
+ #ref: [REF],
192
+
193
+ #-----------------------------------------------------------------------------
194
+ # Use static assets.
195
+ # Defaults to false in development/test, true in
196
+ # production/staging.
197
+
198
+ # Equivalent to --static
199
+ #static: true,
200
+
201
+ # Equivalent to --no-static
202
+ #static: false,
203
+
204
+ #-----------------------------------------------------------------------------
205
+ # Specify custom mustache template directory.
206
+ #
207
+ # Equivalent to --template-dir [PATH]
208
+
209
+ #template_dir: [PATH],
210
+
211
+ #-----------------------------------------------------------------------------
212
+ # Use _Template in root as a template for new pages. Must be committed.
213
+ #
214
+ # Equivalent to --template-page
215
+
216
+ #template_page: true,
217
+
218
+ #-----------------------------------------------------------------------------
219
+ # Tell Gollum to use specific user icons for history view. Can be set to
220
+ # gravatar, identicon or none.
221
+ # Default: none.
222
+ #
223
+ # Equivalent to --user-icons [MODE]
224
+
225
+ #user_icons: [MODE],
226
+
227
+ ##############################################################################
228
+ # Metadata (front matter)
229
+
230
+ #-----------------------------------------------------------------------------
231
+ # Header counting
232
+ # Default: false
233
+ # Can also be a pre-defined counter. See
234
+ # https://www.w3.org/TR/css-counter-styles-3/#predefined-counters
235
+
236
+ #header_enum: false,
237
+ #header_enum: 'decimal-leading-zero',
238
+
239
+ #-----------------------------------------------------------------------------
240
+ # Global metadata. Arbitrary metadata that will be applied to each page.
241
+
242
+ #metadata: {
243
+ # monkeyboys: 'are loose in the facility'
244
+ #},
245
+
246
+ ##############################################################################
247
+ # Tips
248
+
249
+ #-----------------------------------------------------------------------------
250
+ # Force table of contents tag ([[_TOC_]]) into each page.
251
+ # ??? How to set the level in the configuration file?
252
+ # https://github.com/gollum/gollum/wiki#table-of-contents-toc-tag
253
+ # Default: false
254
+
255
+ #universal_toc: false,
256
+
257
+ #-----------------------------------------------------------------------------
258
+ # Move the sidebar to the left of the page
259
+ # https://github.com/gollum/gollum/issues/1450#issuecomment-599124384
260
+
261
+ #sidebar: :left,
262
+
263
+ #-----------------------------------------------------------------------------
264
+ # Change the home page name
265
+ # https://github.com/gollum/gollum/issues/1569#issuecomment-633033895
266
+
267
+ #index_page: 'index',
268
+
269
+ #-----------------------------------------------------------------------------
270
+ # Change the number of changes in the rss feed
271
+
272
+ #pagination_count: 15
273
+ }
274
+
275
+ #-------------------------------------------------------------------------------
276
+ # Change default markup
277
+ #Precious::App.set(:default_markup, :asciidoc)
278
+
279
+ #Precious::App.set(:wiki_options, wiki_options)
280
+
281
+Precious::App.set(:markdown, {
282
+ :extensions => {
283
+ 'md' => 'markdown'
284
+ },
285
+ :format => lambda { |content|
286
+ PandocRuby.convert(content, from: :markdown, to: :html)
287
+ }
288
+})