Method: Webby.site

Defined in:
lib/webby.rb

.siteObject

call-seq:

Webby.site    => struct

Returns a struct containing the configuration parameters for the Webby site. These defaults should be overridden as needed in the site specific Rakefile.



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/webby.rb', line 28

def self.site
  return @site if defined? @site
  @site = OpenStruct.new(
    :output_dir    => 'output',
    :content_dir   => 'content',
    :layout_dir    => 'layouts',
    :template_dir  => 'templates',
    :exclude       => %w(tmp$ bak$ ~$ CVS \.svn),
    :page_defaults => {
      'layout'     => 'default'
    },
    :find_by       => 'title',
    :base          => nil,
    :create_mode   => 'page',
    :blog_dir      => 'blog',
    :tumblog_dir   => 'tumblog',

    # Items for running the embedded webserver
    :use_web_server => true,
    :web_port      => 4331,

    # Items used to deploy the website
    :user       => ENV['USER'] || ENV['USERNAME'],
    :host       => 'example.com',
    :remote_dir => '/not/a/valid/dir',
    :rsync_args => %w(-av),

    # Global options for HAML and SASS
    :haml_options => {},
    :sass_options => {},

    # Options passed to the 'tidy' program when the tidy filter is used
    :tidy_options => '-indent -wrap 80',

    # List of valid URIs (these automatically pass validation)
    :valid_uris => [],

    # Options for coderay processing
    :coderay => {
      :lang => :ruby,
      :line_numbers => nil,
      :line_number_start => 1,
      :bold_every => 10,
      :tab_width => 8
    },

    # Options for graphviz processing
    :graphviz => {
      :path => nil,
      :cmd => 'dot',
      :type => 'png'
    },

    # Options for tex2img processing
    :tex2img => {
      :path => nil,
      :type => 'png',
      :bg => 'white',
      :fg => 'black',
      :resolution => '150x150'
    },

    # Options for ultraviolet syntax highlighting
    :uv => {
      :lang => 'ruby',
      :line_numbers => false,
      :theme => 'mac_classic'
    },

    # XPath identifiers used by the basepath filter
    :xpaths => %w(
        /html/head//base[@href]
        /html/head//link[@href]
        //script[@src]
        /html/body[@background]
        /html/body//a[@href]
        /html/body//object[@data]
        /html/body//img[@src]
        /html/body//area[@href]
        /html/body//form[@action]
        /html/body//input[@src]
    )
    # other possible XPaths to include for base path substitution
    #   /html/body//object[@usemap]
    #   /html/body//img[@usemap]
    #   /html/body//input[@usemap]
  )
end