Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (18 sloc) 950 Bytes
# -*- 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
You can’t perform that action at this time.