-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.rb
39 lines (30 loc) · 947 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
###
# Page options, layouts, aliases and proxies
###
# Per-page layout changes:
#
# With no layout
page '/*.xml', layout: false
page '/*.json', layout: false
page '/*.txt', layout: false
set :source, 'ut'
set :markdown_engine, :kramdown
set :markdown, fenced_code_blocks: true, smartypants: true
activate :syntax, line_numbers: false
require 'middleman-syntax'
helpers do
def example(&block)
content = capture_html(&block)
html = Middleman::Syntax::Highlighter.highlight(content, 'html')
concat_content content
concat_content "<div class='toggle-code-wrapper'><a href='#' class='toggle-code'>Toggle code</a></div>\n"
concat_content html
end
end
activate :external_pipeline,
name: :webpack,
command: build? ?
"./node_modules/webpack/bin/webpack.js --bail" :
"./node_modules/webpack/bin/webpack.js --watch -d --progress --color",
source: ".tmp/dist",
latency: 1