File: webgen.config

package info (click to toggle)
ruby-cmdparse 3.0.7-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 312 kB
  • sloc: ruby: 1,736; makefile: 11
file content (22 lines) | stat: -rw-r--r-- 950 bytes parent folder | download | duplicates (2)
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