-
Notifications
You must be signed in to change notification settings - Fork 21
/
config.rb
33 lines (25 loc) · 880 Bytes
/
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
# frozen_string_literal: true
require 'lib/playbook'
require 'lib/playbook/chapter'
require 'lib/playbook/section'
set :css_dir, 'assets/stylesheets'
set :js_dir, 'assets/javascripts'
set :images_dir, 'assets/images'
set :fonts_dir, 'assets/fonts'
set :helpers_dir, 'lib/helpers'
page '/404.html', layout: 'error', directory_index: false
page '/', layout: 'home'
page /.+\.html$/, layout: 'playbook/chapter'
# Ignored chapter indexes
ignore /^(?!.*\/.*)(?!(index|404)\.html).*/
activate :directory_indexes
activate :playbook
## Playbook settings
set :playbook_chapter_belongs_to_section_key, :title
set :playbook_section_has_many_chapters_key, :'playbook-section-chapters'
configure :build do
activate :minify_css
activate :minify_javascript
activate :asset_hash, ignore: %r{^assets/not-hashed/.*}
end
import_file File.expand_path('_redirects', root), '/_redirects'