webgen 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. data/ChangeLog +154 -0
  2. data/Rakefile +1 -1
  3. data/TODO +7 -4
  4. data/VERSION +1 -1
  5. data/doc/plugin/extension.rb +9 -1
  6. data/doc/src/about.page +2 -2
  7. data/doc/src/default.css +2 -2
  8. data/doc/src/default.template +4 -2
  9. data/doc/src/documentation/cli.page +1 -1
  10. data/doc/src/documentation/gettingstarted.page +4 -4
  11. data/doc/src/documentation/index.page +5 -5
  12. data/doc/src/documentation/meta_info_reference.page +21 -0
  13. data/doc/src/documentation/plugins/filehandler/directory.page +12 -0
  14. data/doc/src/documentation/plugins/filehandler/index.page +21 -5
  15. data/doc/src/documentation/plugins/filehandler/pagehandler.page +31 -3
  16. data/doc/src/documentation/plugins/index.page +2 -2
  17. data/doc/src/documentation/plugins/tags/index.page +7 -2
  18. data/doc/src/documentation/plugins/tags/multilang.fr.page +1 -1
  19. data/doc/src/download.page +1 -1
  20. data/doc/src/features.page +3 -2
  21. data/doc/src/generated_by_webgen.png +0 -0
  22. data/doc/src/index.page +18 -5
  23. data/doc/src/meta.info +8 -5
  24. data/install.rb +1 -1
  25. data/lib/{util → webgen}/composite.rb +1 -1
  26. data/lib/webgen/configuration.rb +2 -2
  27. data/lib/{util → webgen}/listener.rb +1 -1
  28. data/lib/webgen/node.rb +10 -10
  29. data/lib/webgen/plugin.rb +19 -12
  30. data/lib/webgen/plugins/filehandler/backing.rb +7 -4
  31. data/lib/webgen/plugins/filehandler/directory.rb +10 -9
  32. data/lib/webgen/plugins/filehandler/filecopy.rb +5 -6
  33. data/lib/webgen/plugins/filehandler/filehandler.rb +104 -89
  34. data/lib/webgen/plugins/filehandler/page.rb +45 -16
  35. data/lib/webgen/plugins/filehandler/picturegallery.rb +4 -3
  36. data/lib/webgen/plugins/filehandler/template.rb +4 -2
  37. data/lib/webgen/plugins/tags/langbar.rb +2 -2
  38. data/lib/webgen/plugins/tags/menu.rb +48 -35
  39. data/lib/webgen/plugins/tags/relocatable.rb +18 -6
  40. data/lib/webgen/plugins/tags/sitemap.rb +10 -9
  41. data/lib/webgen/plugins/tags/wikilink.rb +3 -1
  42. data/testsite/src/projects/00.index.de.page +1 -1
  43. data/testsite/src/projects/subproj/index.page +1 -1
  44. metadata +7 -5
data/ChangeLog CHANGED
@@ -1,4 +1,158 @@
1
1
  ------------------------------------------------------------------------
2
+ r277 | thomas | 2005-05-12 10:43:54 +0200 (Thu, 12 May 2005) | 1 line
3
+ Changed paths:
4
+ M /trunk/webgen/lib/webgen/plugins/filehandler/page.rb
5
+
6
+ * fixed bug in PageHandler where duplicate files were not recognized
7
+ ------------------------------------------------------------------------
8
+ r276 | thomas | 2005-05-12 10:36:50 +0200 (Thu, 12 May 2005) | 4 lines
9
+ Changed paths:
10
+ M /trunk/webgen/TODO
11
+ M /trunk/webgen/doc/src/default.css
12
+ M /trunk/webgen/doc/src/default.template
13
+ A /trunk/webgen/doc/src/generated_by_webgen.png
14
+ M /trunk/webgen/doc/src/index.page
15
+ A /trunk/webgen/otherdata/generated_logo.svg
16
+
17
+ * added dates of releases to main page
18
+ * added xhtml11, css logos to footer
19
+ * added "generated by webgen" logo
20
+ * fixed syntax errors in css file
21
+ ------------------------------------------------------------------------
22
+ r275 | thomas | 2005-05-11 19:30:20 +0200 (Wed, 11 May 2005) | 2 lines
23
+ Changed paths:
24
+ M /trunk/webgen/TODO
25
+ M /trunk/webgen/doc/plugin/extension.rb
26
+ A /trunk/webgen/doc/src/documentation/meta_info_reference.page
27
+ M /trunk/webgen/doc/src/index.page
28
+ M /trunk/webgen/lib/webgen/plugin.rb
29
+ M /trunk/webgen/lib/webgen/plugins/filehandler/backing.rb
30
+ M /trunk/webgen/lib/webgen/plugins/filehandler/directory.rb
31
+ M /trunk/webgen/lib/webgen/plugins/filehandler/page.rb
32
+ M /trunk/webgen/lib/webgen/plugins/filehandler/template.rb
33
+ M /trunk/webgen/lib/webgen/plugins/tags/menu.rb
34
+ M /trunk/webgen/lib/webgen/plugins/tags/sitemap.rb
35
+ M /trunk/webgen/lib/webgen/plugins/tags/wikilink.rb
36
+
37
+ * added PageHandler#get_html_link, simplified use of #get_html_link in menu and sitemap tag
38
+ * added documentation page for meta information
39
+ ------------------------------------------------------------------------
40
+ r274 | thomas | 2005-05-11 14:52:27 +0200 (Wed, 11 May 2005) | 4 lines
41
+ Changed paths:
42
+ M /trunk/webgen/TODO
43
+ M /trunk/webgen/doc/plugin/extension.rb
44
+ M /trunk/webgen/doc/src/about.page
45
+ M /trunk/webgen/doc/src/documentation/cli.page
46
+ M /trunk/webgen/doc/src/documentation/gettingstarted.page
47
+ M /trunk/webgen/doc/src/documentation/plugins/filehandler/directory.page
48
+ M /trunk/webgen/doc/src/documentation/plugins/index.page
49
+ M /trunk/webgen/doc/src/documentation/plugins/tags/index.page
50
+ M /trunk/webgen/doc/src/index.page
51
+ M /trunk/webgen/doc/src/meta.info
52
+ M /trunk/webgen/lib/webgen/plugins/filehandler/directory.rb
53
+ M /trunk/webgen/lib/webgen/plugins/filehandler/page.rb
54
+ M /trunk/webgen/lib/webgen/plugins/filehandler/picturegallery.rb
55
+ M /trunk/webgen/lib/webgen/plugins/filehandler/template.rb
56
+ M /trunk/webgen/lib/webgen/plugins/tags/langbar.rb
57
+ M /trunk/webgen/lib/webgen/plugins/tags/menu.rb
58
+ M /trunk/webgen/lib/webgen/plugins/tags/sitemap.rb
59
+ M /trunk/webgen/test/webgen/filehandlers/tc_page.rb
60
+ M /trunk/webgen/testsite/src/projects/00.index.de.page
61
+ M /trunk/webgen/testsite/src/projects/subproj/index.page
62
+
63
+ * changed meta info menuOrder to orderInfo
64
+ * if two items have the same order information, they are sorted using their title meta info
65
+ * BUGs fixed for sitemap tag: order information now used, multi language pages now displayed only once
66
+ * add some documentation
67
+ ------------------------------------------------------------------------
68
+ r273 | thomas | 2005-05-11 12:07:38 +0200 (Wed, 11 May 2005) | 3 lines
69
+ Changed paths:
70
+ M /trunk/webgen/TODO
71
+ M /trunk/webgen/doc/src/about.page
72
+ M /trunk/webgen/doc/src/default.template
73
+ M /trunk/webgen/doc/src/documentation/gettingstarted.page
74
+ M /trunk/webgen/doc/src/documentation/index.page
75
+ M /trunk/webgen/doc/src/documentation/plugins/filehandler/pagehandler.page
76
+ M /trunk/webgen/doc/src/documentation/plugins/index.page
77
+ M /trunk/webgen/doc/src/documentation/plugins/tags/index.page
78
+ M /trunk/webgen/doc/src/features.page
79
+ M /trunk/webgen/doc/src/index.page
80
+ M /trunk/webgen/lib/webgen/plugins/tags/relocatable.rb
81
+
82
+ * now only webgen with lower case letters in docu
83
+ * fixed pagehandler.page (problem with embedded ERB code)
84
+ * tag relocatable now accepts complex URIs (with query/fragment part)
85
+ ------------------------------------------------------------------------
86
+ r272 | thomas | 2005-05-09 10:53:04 +0200 (Mon, 09 May 2005) | 1 line
87
+ Changed paths:
88
+ M /trunk/webgen/lib/webgen/node.rb
89
+ M /trunk/webgen/lib/webgen/plugins/filehandler/filehandler.rb
90
+ M /trunk/webgen/test/util/tc_composite.rb
91
+ M /trunk/webgen/test/util/tc_listener.rb
92
+
93
+ * changed require util/listener and util/composite to webgen/...
94
+ ------------------------------------------------------------------------
95
+ r271 | thomas | 2005-05-09 10:50:47 +0200 (Mon, 09 May 2005) | 1 line
96
+ Changed paths:
97
+ D /trunk/webgen/lib/util
98
+ A /trunk/webgen/lib/webgen/composite.rb (from /trunk/webgen/lib/util/composite.rb:212)
99
+ A /trunk/webgen/lib/webgen/listener.rb (from /trunk/webgen/lib/util/listener.rb:212)
100
+
101
+ * removed util directory, moved files into webgen dir
102
+ ------------------------------------------------------------------------
103
+ r270 | thomas | 2005-05-09 10:40:14 +0200 (Mon, 09 May 2005) | 3 lines
104
+ Changed paths:
105
+ M /trunk/webgen/doc/src/documentation/plugins/filehandler/pagehandler.page
106
+ M /trunk/webgen/doc/src/index.page
107
+ M /trunk/webgen/lib/webgen/plugins/filehandler/directory.rb
108
+ M /trunk/webgen/lib/webgen/plugins/filehandler/filehandler.rb
109
+ M /trunk/webgen/lib/webgen/plugins/filehandler/page.rb
110
+ M /trunk/webgen/lib/webgen/plugins/tags/menu.rb
111
+ M /trunk/webgen/lib/webgen/plugins/tags/relocatable.rb
112
+ M /trunk/webgen/lib/webgen/plugins/tags/sitemap.rb
113
+
114
+ * renamed #get_page_node_for_lang to #get_node_for_lang for file handlers
115
+ * changed PageHandler: ERB is now useable within a template and with content blocks of page files
116
+ * tag relocatable modified to allow linking to directories and other file types, not only page files
117
+ ------------------------------------------------------------------------
118
+ r269 | thomas | 2005-05-08 18:06:40 +0200 (Sun, 08 May 2005) | 6 lines
119
+ Changed paths:
120
+ M /trunk/webgen/TODO
121
+ M /trunk/webgen/doc/src/documentation/plugins/filehandler/index.page
122
+ M /trunk/webgen/doc/src/features.page
123
+ M /trunk/webgen/doc/src/index.page
124
+ M /trunk/webgen/lib/webgen/node.rb
125
+ M /trunk/webgen/lib/webgen/plugins/filehandler/backing.rb
126
+ M /trunk/webgen/lib/webgen/plugins/filehandler/directory.rb
127
+ M /trunk/webgen/lib/webgen/plugins/filehandler/filecopy.rb
128
+ M /trunk/webgen/lib/webgen/plugins/filehandler/filehandler.rb
129
+ M /trunk/webgen/lib/webgen/plugins/filehandler/picturegallery.rb
130
+ M /trunk/webgen/test/webgen/tc_node.rb
131
+
132
+ * adapted tests for Node class
133
+ * updated documentation and added better info on FileHandler class
134
+ * FileHandler now processes files based on path patterns and not on extensions -> more flexible
135
+ * updated BackingFileHandler
136
+ * changed name of parameter FileCopyHandler:types to :paths, parameters now uses path patterns instead of extensions
137
+ * Node#node_for_string and Node#node_for_string? accept optional second parameter now
138
+ ------------------------------------------------------------------------
139
+ r268 | thomas | 2005-05-02 17:28:31 +0200 (Mon, 02 May 2005) | 1 line
140
+ Changed paths:
141
+ M /trunk/webgen/Rakefile
142
+ M /trunk/webgen/doc/src/documentation/plugins/tags/multilang.fr.page
143
+ M /trunk/webgen/doc/src/download.page
144
+ M /trunk/webgen/doc/src/index.page
145
+ M /trunk/webgen/lib/webgen/configuration.rb
146
+ M /trunk/webgen/lib/webgen/plugins/filehandler/filehandler.rb
147
+
148
+ * some small changes
149
+ ------------------------------------------------------------------------
150
+ r267 | thomas | 2005-04-27 15:32:18 +0200 (Wed, 27 Apr 2005) | 1 line
151
+ Changed paths:
152
+ M /trunk/webgen/lib/webgen/plugin.rb
153
+
154
+ * Fixed bug #1828
155
+ ------------------------------------------------------------------------
2
156
  r264 | thomas | 2005-04-21 12:46:59 +0200 (Thu, 21 Apr 2005) | 1 line
3
157
  Changed paths:
4
158
  M /trunk/webgen/doc/src/index.page
data/Rakefile CHANGED
@@ -181,7 +181,7 @@ else
181
181
  #### Dependencies, requirements and files
182
182
 
183
183
  s.files = PKG_FILES.to_a
184
- s.add_dependency( 'cmdparse', '>= 1.0.1' )
184
+ s.add_dependency( 'cmdparse', '>= 1.0.2' )
185
185
 
186
186
  s.require_path = 'lib'
187
187
  s.autorequire = nil
data/TODO CHANGED
@@ -1,10 +1,10 @@
1
1
  ---- CURRENT ----
2
2
 
3
+ * implement command "webgen clean" (options -f (force) -a (all files in dir, not only generated ones)
3
4
  * implement plugin which creates nodes for fragment identifiers (#info) in html
4
5
  * modify tags system sothat tags can be specified via a tag directive (like extension with file handlers)
5
6
  * create tests for methods in webgen.rb
6
7
  * webgen -c => output same info as on docu pages
7
- * reloctable tag: correct output for complex URLS???
8
8
  * check if duplicate nodes are created??? by using a tag in a template
9
9
  * allow a template to use another template (templates as page description files?) (template2 uses template1)
10
10
  * security concerns (setting different $SAFE level???)
@@ -13,14 +13,11 @@
13
13
  ---- DOCU ----
14
14
 
15
15
  * DEV: self.logger.warn/error/info/debug can be used for messages
16
- * document the various meta info entries that the plugins use (inMenu, menuOrdering, ...)
17
- --> define: Plugin.used_meta_info( name, desc )
18
16
 
19
17
  ---- FUTURE ----
20
18
 
21
19
  * tag 'resume', uses xmlresume2x to provide HTML version of xml resume
22
20
  * multi-lingual picture/gallery files
23
- * create logo "Created with webgen"
24
21
  * refactor menu: abstract menu generator+parser, concrete impls (vert. menu, horz. menu, ...)
25
22
  * include exif info for pictures
26
23
 
@@ -167,3 +164,9 @@ W do not allow two or more page files in the same language, print warn
167
164
  * create file for logging plugin
168
165
  * document the existence of the mailing list
169
166
  * webgen create -> create basic template/css + index.page
167
+ * update FileCopyHandler
168
+ * menu order: if order number equal, sort alphabetically
169
+ * RF bug: sitemap displays multilingual sites more times, sitemap should respect menuOrder
170
+ * reloctable tag: correct output for complex URLS???
171
+ * document the various meta info entries that the plugins use (inMenu, menuOrdering, ...) --> define: Plugin.used_meta_info( name, desc )
172
+ * create logo "Created with webgen"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.3
1
+ 0.3.4
@@ -41,14 +41,17 @@ module OtherPlugins
41
41
  s = "<table>"
42
42
  row = lambda {|desc, value| "<tr style='vertical-align: top'><td style='font-weight:bold'>#{CGI::escapeHTML( desc )}:</td><td>#{value}</td></tr>" }
43
43
 
44
+ # plugin, summary, description
44
45
  [['Plugin Name', 'plugin'], ['Summary', 'summary'], ['Description', 'description']].each do |desc, name|
45
46
  s += row[desc, CGI::escapeHTML( data.send( name ) )] if eval( "data.#{name}" )
46
47
  end
47
48
 
49
+ # dependencies
48
50
  s += row['Dependencies', CGI::escapeHTML( data.dependencies.join( ', ') )] if data.dependencies
49
51
 
52
+ # parameters
50
53
  unless data.params.nil?
51
- params = data.params.collect do |k,v|
54
+ params = data.params.sort.collect do |k,v|
52
55
  "<span style='color: red'>#{v.name}</span>" + \
53
56
  ( v.mandatory.nil? \
54
57
  ? "&nbsp;=&nbsp;<span style='color: blue'>#{CGI::escapeHTML( v.default.inspect )}</span>" \
@@ -57,6 +60,11 @@ module OtherPlugins
57
60
  end
58
61
  s += row['Parameters', params.join( "<br />\n" )]
59
62
  end
63
+
64
+ # used meta info
65
+ s += row['Used meta information', CGI::escapeHTML( data.used_meta_info.join( ', ') )] if data.used_meta_info
66
+
67
+ # tag name, file ext
60
68
  s += row['Name of tag', (data.tag == :default ? "Default tag" : data.tag)] if data.tag
61
69
  s += row['File extension', data.extension.inspect.gsub(/"/, '')] if data.extension
62
70
 
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  title: About
3
3
  inMenu: true
4
- menuOrder: 2
4
+ orderInfo: 2
5
5
  ---
6
6
  h2. About _webgen_
7
7
 
8
- Webgen is used to generate web pages from page description and template files. You create one
8
+ webgen is used to generate web pages from page description and template files. You create one
9
9
  template file in which you define the layout of your page and where the content should go. After
10
10
  that you can create page description files in which you only define the content.
11
11
 
@@ -8,7 +8,7 @@
8
8
  body {
9
9
  margin: 0px 2em;
10
10
  font-size: 12px;
11
- font-family: Verdana, Arial, Helvetica;
11
+ font-family: Verdana, Arial, Helvetica, sans-serif;
12
12
  border: 1px solid black;
13
13
  color: black;
14
14
  }
@@ -38,7 +38,7 @@
38
38
  color: white;
39
39
  }
40
40
 
41
- , #headerbar { border-bottom: 1px solid black; }
41
+ #headerbar { border-bottom: 1px solid black; }
42
42
  #footer { border-top: 1px solid black; }
43
43
 
44
44
  #body {
@@ -13,7 +13,7 @@
13
13
  <table>
14
14
  <tr>
15
15
  <td><img src="{relocatable: logo.png}" alt="Logo" title="Logo" /></td>
16
- <td><h1>Webgen<span style="font-size: 60%"> - template based static website generator</span></h1>
16
+ <td><h1>webgen<span style="font-size: 60%"> - template based static website generator</span></h1>
17
17
  <p>The solution for your static website generation needs!</p></td>
18
18
  </tr>
19
19
  </table>
@@ -35,7 +35,9 @@
35
35
  </div>
36
36
 
37
37
  <div id="footer" class="bar">
38
- generated with <a href="http://webgen.rubyforge.org"><em><b>webgen</b></em></a> on <b>{date: }</b>
38
+ <a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml11" alt="Valid XHTML 1.1!" height="31" width="88" /></a>
39
+ <a href="http://jigsaw.w3.org/css-validator/check/referer"><img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88" /></a>
40
+ <a href="http://webgen.rubyforge.org"><img src="generated_by_webgen.png" alt="Generated by webgen" /></a> on <b>{date: }</b>
39
41
  </div>
40
42
  </div>
41
43
  <!-- Start of StatCounter Code -->
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: Command Line Interface
3
3
  inMenu: true
4
- menuOrder: 20
4
+ orderInfo: 20
5
5
  ---
6
6
  h2. Command Line Interface
7
7
 
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  title: Getting Started
3
3
  inMenu: true
4
- menuOrder: 10
4
+ orderInfo: 10
5
5
  ---
6
6
  h1. Getting Started with webgen
7
7
 
8
8
  h2. The Needed Directories
9
9
 
10
- Webgen utilizes the following directories. These directories are in the direcctory in which the
10
+ webgen utilizes the following directories. These directories are in the direcctory in which the
11
11
  webgen command is issued.
12
12
 
13
13
  * @src@: The source directory in which all the source files for the website are.
@@ -32,7 +32,7 @@ First, you need to create the basic directories. You can let webgen do this:
32
32
  ~ > webgen create sample_site
33
33
  </pre>
34
34
 
35
- Webgen created the @sample_site@ directory which holds all directories necessary for running webgen.
35
+ webgen created the @sample_site@ directory which holds all directories necessary for running webgen.
36
36
  So you can run webgen to create your website. Just change into the @sample_site@ directory and run
37
37
  webgen
38
38
 
@@ -41,7 +41,7 @@ webgen
41
41
  ~/sample_site > webgen
42
42
  </pre>
43
43
 
44
- Easy! Webgen has parsed the @src@ directory and has created the HTML output. However, as we did not
44
+ Easy! webgen has parsed the @src@ directory and has created the HTML output. However, as we did not
45
45
  write any content yet, there is not much to see (only the default page). So let's do that now!
46
46
 
47
47
  h2. Add Content to the Website
@@ -3,7 +3,7 @@ directoryName: Documentation
3
3
  ---
4
4
  h2. Information
5
5
 
6
- p={font-size: 150%; color: red}. *!!! This documentation is for Webgen {version: } !!!*
6
+ p={font-size: 150%; color: red}. *!!! This documentation is for webgen {version: } !!!*
7
7
 
8
8
  The source files for this website are in the @doc/src@ directory of the webgen package. Have a look
9
9
  at them to see a real world example on how to use webgen!
@@ -13,7 +13,7 @@ h2. Philosophy
13
13
  There are some things about webgen which I think are important to mention. It's about how webgen
14
14
  works and what you can expect when you start webgen.
15
15
 
16
- * <b>Webgen runs till the end and does not stop on errors!</b>
16
+ * <b>webgen runs till the end and does not stop on errors!</b>
17
17
 
18
18
  I did not like it when webgen stopped because there was an error in the configuration file or an
19
19
  error in a page description file. So if something exceptional happens it is logged so that the
@@ -26,7 +26,7 @@ works and what you can expect when you start webgen.
26
26
 
27
27
  * <b>Useful default values for everything!</b>
28
28
 
29
- You _do not need_ to configure webgen if you are happy with the default values. Webgen provides
29
+ You _do not need_ to configure webgen if you are happy with the default values. webgen provides
30
30
  default values for every configuration option.
31
31
 
32
32
  * <b>Every important thing gets logged!</b>
@@ -38,9 +38,9 @@ works and what you can expect when you start webgen.
38
38
 
39
39
  h2. Configuration
40
40
 
41
- Webgen provides a default configuration out of the box. If you can live with that, you do not need
41
+ webgen provides a default configuration out of the box. If you can live with that, you do not need
42
42
  to write any configuration files. Because most people cannot, you can use your own configuration
43
- file. The configuration file has to be written in YAML and is called @config.yaml@. Webgen searches
43
+ file. The configuration file has to be written in YAML and is called @config.yaml@. webgen searches
44
44
  in the current directory for the configuration file.
45
45
 
46
46
  If you want to get the configuration values you can run webgen like this
@@ -0,0 +1,21 @@
1
+ ---
2
+ title: Meta Info Reference
3
+ inMenu: true
4
+ orderInfo: 25
5
+ ---
6
+ h2. Meta Information Reference
7
+
8
+ Following is a list of all the meta information items that are used in one way or another by a
9
+ plugin, be it a file handler plugin, a tag plugin...
10
+
11
+ table{border: 1px solid black}.
12
+ |_. Name |_. Type |_. Example |_. Valid for |_. Description|
13
+ |*blocks* |Hash |\{format: markdown, name: sidebar}|Page file|Sets the name and format of content blocks.|
14
+ |*directoryName* |String |Img Directory |Page file |Only used if set on a directory index page file; specifies the title of the directory for which it is the index file. If it is not specified, the title of the directory will be used.|
15
+ |*indexFile* |String |getting.page |Directory |Sets the directory index file for the directory overriding the default value.|
16
+ |*inMenu* |Boolean |true |Any |Specifies if the file/directory should appear in menus.|
17
+ |*lang* |String |de |Page file |Sets the language for the page file. Has to be the two character code for the language.|
18
+ |*orderInfo* |Integer |15 |Any |Sets the orderering information for the file/directory.|
19
+ |*template* |String |my.template |Page file |Sets the template for the page file overriding the default value.|
20
+ |*title* |String |New Title |Any |Sets the title for the file/directory.|
21
+ |*useERB* |Boolean |false |Page file |Specifies if the content blocks of the page file should be processed with ERB overriding the default value.|
@@ -12,3 +12,15 @@ The directory handler is used for processing directories. It creates the target
12
12
  additionally an index file for each directory can be specified. If specified, this file is used
13
13
  instead of the plain directory index for displaying purposes. For example, the menu item for the
14
14
  file handlers page is generated by the index file of the @filehandler@ directory.
15
+
16
+ Normally, webgen shows a warning if it could not find the directory index file for a directory.
17
+ However, there are most certainly directories which should not have an index file, e.g. a directory
18
+ with pictures only. To prevent webgen from displaying warnings for such directories, you can add the
19
+ following meta information to a backing file:
20
+
21
+ <pre>
22
+ dirWithOnlyImages:
23
+ indexFile: ~
24
+ </pre>
25
+
26
+ This will prevent webgen from showing warnings because you explicitly define a null index file.
@@ -1,13 +1,29 @@
1
1
  ---
2
2
  directoryName: File Handlers
3
3
  ---
4
- h2. About
4
+ h2. Information
5
+
6
+ <notextile>{describe: FileHandler}</notextile>
7
+
8
+ h2. Description
5
9
 
6
10
  File handlers are used to handle different types of input files. You can see the currently exisiting
7
11
  file handlers in the menu. Choose one to get a description for it!
8
12
 
9
- Each file handler can handle one or more different file extensions. During the processing of the
10
- website, files with a registered extension are processed by the corresponding file handler.
13
+ Each file handler specifies path patterns or extensions for the files he handles. During the
14
+ processing of the website, the FileHandler instance calls the approriate file handler for each file
15
+ and builds the internal representation of the source directory.
16
+
17
+ h2. Path Patterns
18
+
19
+ Path patterns are more like shell globs than regular expressions. One can use any path pattern that
20
+ the @Dir.glob@ method understands. Here are some examples:
21
+
22
+ table{border: 1px solid black}.
23
+ |^. <notextile><code>*/*.html</code></notextile>|^. All files with the extension @html@ in the subdirectories of the root source directory|
24
+ |^. <notextile><code>**/*.html</code></notextile>|^. All files with the extension @html@ in all directories|
25
+ |^. <notextile><code>**/{foo,bar}*</code></notextile>|^. All files in all directories which start with @foo@ or @bar@|
26
+ |^. <notextile><code>**/???</code></notextile>|^. All files in all directories whose file name is exactly three characters long|
27
+
28
+
11
29
 
12
- A special "file" handler is used to handle directories; this file handler registers the extension
13
- @:dir@.