forked from gettalong/cmdparse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webgen.config
22 lines (18 loc) · 950 Bytes
/
webgen.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# -*- ruby -*-
website.config['website.base_url'] = 'https://cmdparse.gettalong.org/'
website.config['sources'] =[['/', :file_system, 'doc']]
website.config['destination'] = [:file_system, 'htmldoc']
website.config['website.tmpdir'] = 'webgen-tmp'
website.config['content_processor.kramdown.options'] = {
syntax_highlighter: 'coderay',
syntax_highlighter_opts: {css: 'class', line_numbers: nil}
}
website.config['content_processor.sass.options'] = {:style => :compressed}
website.config.define_option('tag.extract.file', 'example/net.rb')
website.config.define_option('tag.extract.lines', nil)
website.ext.tag.register('extract', :config_prefix => 'tag.extract',
:mandatory => ['lines']) do |tag, body, context|
file = context[:config]['tag.extract.file']
lines = context[:config]['tag.extract.lines']
File.readlines(File.join(context.website.directory, file)).unshift('unused line')[lines].join("").rstrip
end