-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.rb
executable file
·67 lines (58 loc) · 1.54 KB
/
config.rb
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Time.zone = 'US/Pacific'
require 'action_view'
require 'slim/include'
Slim::Engine.set_options(
tabsize: 2,
include_dirs: ["#{Dir.pwd}/source/partials"],
pretty: true,
shortcut: {
# rubocop:disable Style/StringHashKeys
'#' => { attr: 'id' },
'.' => { attr: 'class' },
'&' => { attr: 'role' },
'@' => { attr: 'href' }
# rubocop:enable all
})
page '/*.xml', layout: false
activate :asset_hash
activate(:blog) { |blog|
blog.default_extension = '.md'
blog.generate_day_pages = false
blog.generate_month_pages = false
blog.generate_year_pages = false
blog.layout = 'article'
blog.permalink = 'articles/{title}'
blog.sources = 'articles/{title}.html'
blog.summary_separator = /\n+/
blog.taglink = 'tags/{tag}.html'
blog.tag_template = 'tag.html'
blog.paginate = true
}
activate :directory_indexes
activate(:syntax) { |syntax|
syntax.css_class = ''
}
require 'lib/artisanal_markdown'
config[:markdown] = {
autolink: true,
fenced_code_blocks: true,
footnotes: true,
highlight: true,
quote: true,
renderer: ArtisanalMarkdown,
smartypants: true,
space_after_headers: true,
strikethrough: true,
superscript: true,
underline: true
}
Slim::Embedded.options[:markdown] = config[:markdown]
config[:markdown_engine] = :redcarpet
config[:css_dir] = 'assets/css'
config[:host] = 'https://artisanalsoftware.com'
config[:images] = 'assets/img'
config[:images_dir] = 'assets/img'
config[:js_dir] = 'assets/js'
config[:layout] = :site
config[:port] = 80
config[:trailing_slash] = false