-
Notifications
You must be signed in to change notification settings - Fork 0
Collapse file tree
Files
Search this repository
/
Copy pathgollum-config.rb
More file actions
More file actions
42 lines (37 loc) · 1.04 KB
/
gollum-config.rb
File metadata and controls
42 lines (37 loc) · 1.04 KB
You must be signed in to make or propose changes
More edit options
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
##
# Configuration for Gollum.
#
# frozen_string_literal: true
#
# Options for the `Gollum::Wiki` constructor.
GOLLUM_OPTIONS = {
# Base path for internal links.
base_path: HOME_URL.to_s,
# Convert spaces to hyphens in internal links.
hyphened_tag_lookup: true,
# Do not add `class="editable"` to section headings.
allow_editing: false,
# Override Gollum's filter chain to keep it minimal.
# `:Tags` - Convert internal links to standard Markdown links.
# `:Render` - Render Markdown to HTML.
filter_chain: [:Tags, :Render],
}
# Use Commonmarker as the Markdown renderer.
GitHub::Markup::Markdown::MARKDOWN_GEMS.clear
GitHub::Markup::Markdown::MARKDOWN_GEMS['commonmarker'] = proc do |markdown|
::Commonmarker.to_html(markdown, options: {
render: {
# Allow raw HTML tags to support `<details>` tags etc.
unsafe: true,
},
extension: {
# Enable GFM extensions.
strikethrough: true,
tagfilter: true,
table: true,
autolink: true,
tasklist: true,
footnotes: true,
},
})
end