forked from ruby/TryRuby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.rb
48 lines (35 loc) · 930 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
require 'bundler'
Bundler.require
# Build Opal part with Tilt, with our customized pipeline
require 'opal-config'
set :rb, builder: OpalBuilder.new
# Enable the collector extension, used to create
# try_ruby_<language>.json files
require 'collector'
activate :collector
set :markdown_engine, :redcarpet
set :markdown,
fenced_code_blocks: true,
lax_html_blocks: true,
smartypants: true
activate :syntax
activate :blog do |blog|
blog.publish_future_dated = true
blog.prefix = "articles"
blog.permalink = "{title}.html"
end
activate :directory_indexes
set :build_dir, '_site' # for GitHub Pages
set :css_dir, 'stylesheets'
set :js_dir, 'javascripts'
configure :development do
set :debug_assets, true
activate :livereload
end
activate :relative_assets
set :relative_links, true
activate :minify_css
configure :build do
activate :minify_javascript,
compressor: -> { Terser.new }
end