gettalong-webgen 0.5.4.20080929

Sign up to get free protection for your applications and to get access to all the features.
Files changed (290) hide show
  1. data/AUTHORS +5 -0
  2. data/COPYING +10 -0
  3. data/GPL +340 -0
  4. data/Rakefile +324 -0
  5. data/THANKS +17 -0
  6. data/bin/webgen +10 -0
  7. data/data/webgen/resources.yaml +3 -0
  8. data/data/webgen/webgui/controller/main.rb +129 -0
  9. data/data/webgen/webgui/overrides/win32console.rb +0 -0
  10. data/data/webgen/webgui/public/css/jquery.autocomplete.css +50 -0
  11. data/data/webgen/webgui/public/css/ramaze_error.css +90 -0
  12. data/data/webgen/webgui/public/css/style.css +55 -0
  13. data/data/webgen/webgui/public/img/headerbg.jpg +0 -0
  14. data/data/webgen/webgui/public/img/webgen_logo.png +0 -0
  15. data/data/webgen/webgui/public/js/jquery.autocomplete.js +15 -0
  16. data/data/webgen/webgui/public/js/jquery.js +32 -0
  17. data/data/webgen/webgui/view/create_website.xhtml +22 -0
  18. data/data/webgen/webgui/view/error.xhtml +64 -0
  19. data/data/webgen/webgui/view/index.xhtml +22 -0
  20. data/data/webgen/webgui/view/manage_website.xhtml +18 -0
  21. data/data/webgen/webgui/view/page.xhtml +40 -0
  22. data/data/webgen/website_skeleton/README +10 -0
  23. data/data/webgen/website_skeleton/Rakefile +40 -0
  24. data/data/webgen/website_skeleton/config.yaml +17 -0
  25. data/data/webgen/website_skeleton/ext/init.rb +6 -0
  26. data/data/webgen/website_styles/1024px/README +13 -0
  27. data/data/webgen/website_styles/1024px/src/default.css +188 -0
  28. data/data/webgen/website_styles/1024px/src/default.template +60 -0
  29. data/data/webgen/website_styles/1024px/src/images/background.gif +0 -0
  30. data/data/webgen/website_styles/andreas00/README +13 -0
  31. data/data/webgen/website_styles/andreas00/src/default.css +290 -0
  32. data/data/webgen/website_styles/andreas00/src/default.template +60 -0
  33. data/data/webgen/website_styles/andreas00/src/images/bg.gif +0 -0
  34. data/data/webgen/website_styles/andreas00/src/images/front.jpg +0 -0
  35. data/data/webgen/website_styles/andreas00/src/images/menubg.gif +0 -0
  36. data/data/webgen/website_styles/andreas00/src/images/menubg2.gif +0 -0
  37. data/data/webgen/website_styles/andreas01/README +14 -0
  38. data/data/webgen/website_styles/andreas01/src/default.css +310 -0
  39. data/data/webgen/website_styles/andreas01/src/default.template +61 -0
  40. data/data/webgen/website_styles/andreas01/src/images/bg.gif +0 -0
  41. data/data/webgen/website_styles/andreas01/src/images/front.jpg +0 -0
  42. data/data/webgen/website_styles/andreas01/src/print.css +35 -0
  43. data/data/webgen/website_styles/andreas03/README +14 -0
  44. data/data/webgen/website_styles/andreas03/src/default.css +223 -0
  45. data/data/webgen/website_styles/andreas03/src/default.template +58 -0
  46. data/data/webgen/website_styles/andreas03/src/images/bodybg.png +0 -0
  47. data/data/webgen/website_styles/andreas03/src/images/contbg.png +0 -0
  48. data/data/webgen/website_styles/andreas03/src/images/footerbg.png +0 -0
  49. data/data/webgen/website_styles/andreas03/src/images/gradient1.png +0 -0
  50. data/data/webgen/website_styles/andreas03/src/images/gradient2.png +0 -0
  51. data/data/webgen/website_styles/andreas04/README +15 -0
  52. data/data/webgen/website_styles/andreas04/src/default.css +290 -0
  53. data/data/webgen/website_styles/andreas04/src/default.template +81 -0
  54. data/data/webgen/website_styles/andreas04/src/images/blinkarrow.gif +0 -0
  55. data/data/webgen/website_styles/andreas04/src/images/bodybg.png +0 -0
  56. data/data/webgen/website_styles/andreas04/src/images/contentbg.png +0 -0
  57. data/data/webgen/website_styles/andreas04/src/images/entrybg.png +0 -0
  58. data/data/webgen/website_styles/andreas04/src/images/flash.gif +0 -0
  59. data/data/webgen/website_styles/andreas04/src/images/flash2.gif +0 -0
  60. data/data/webgen/website_styles/andreas04/src/images/globe.gif +0 -0
  61. data/data/webgen/website_styles/andreas04/src/images/globebottom.gif +0 -0
  62. data/data/webgen/website_styles/andreas04/src/images/linkarrow.gif +0 -0
  63. data/data/webgen/website_styles/andreas04/src/images/menuhover.png +0 -0
  64. data/data/webgen/website_styles/andreas05/README +14 -0
  65. data/data/webgen/website_styles/andreas05/src/default.css +33 -0
  66. data/data/webgen/website_styles/andreas05/src/default.template +40 -0
  67. data/data/webgen/website_styles/andreas05/src/images/bodybg.gif +0 -0
  68. data/data/webgen/website_styles/andreas05/src/images/front.png +0 -0
  69. data/data/webgen/website_styles/andreas06/README +14 -0
  70. data/data/webgen/website_styles/andreas06/src/default.css +354 -0
  71. data/data/webgen/website_styles/andreas06/src/default.template +70 -0
  72. data/data/webgen/website_styles/andreas06/src/images/bodybg.gif +0 -0
  73. data/data/webgen/website_styles/andreas06/src/images/boxbg.gif +0 -0
  74. data/data/webgen/website_styles/andreas06/src/images/greypx.gif +0 -0
  75. data/data/webgen/website_styles/andreas06/src/images/header.jpg +0 -0
  76. data/data/webgen/website_styles/andreas06/src/images/innerbg.gif +0 -0
  77. data/data/webgen/website_styles/andreas06/src/images/leaves.jpg +0 -0
  78. data/data/webgen/website_styles/andreas06/src/images/tabs.gif +0 -0
  79. data/data/webgen/website_styles/andreas07/README +15 -0
  80. data/data/webgen/website_styles/andreas07/src/browserfix.css +7 -0
  81. data/data/webgen/website_styles/andreas07/src/default.css +92 -0
  82. data/data/webgen/website_styles/andreas07/src/default.template +42 -0
  83. data/data/webgen/website_styles/andreas07/src/images/bodybg.gif +0 -0
  84. data/data/webgen/website_styles/andreas07/src/images/sidebarbg.gif +0 -0
  85. data/data/webgen/website_styles/andreas08/README +14 -0
  86. data/data/webgen/website_styles/andreas08/src/default.css +224 -0
  87. data/data/webgen/website_styles/andreas08/src/default.template +51 -0
  88. data/data/webgen/website_styles/andreas09/README +14 -0
  89. data/data/webgen/website_styles/andreas09/src/default.css +308 -0
  90. data/data/webgen/website_styles/andreas09/src/default.template +68 -0
  91. data/data/webgen/website_styles/andreas09/src/images/bodybg-black.jpg +0 -0
  92. data/data/webgen/website_styles/andreas09/src/images/bodybg-green.jpg +0 -0
  93. data/data/webgen/website_styles/andreas09/src/images/bodybg-orange.jpg +0 -0
  94. data/data/webgen/website_styles/andreas09/src/images/bodybg-purple.jpg +0 -0
  95. data/data/webgen/website_styles/andreas09/src/images/bodybg-red.jpg +0 -0
  96. data/data/webgen/website_styles/andreas09/src/images/bodybg.jpg +0 -0
  97. data/data/webgen/website_styles/andreas09/src/images/footerbg.jpg +0 -0
  98. data/data/webgen/website_styles/andreas09/src/images/menuhover-black.jpg +0 -0
  99. data/data/webgen/website_styles/andreas09/src/images/menuhover-green.jpg +0 -0
  100. data/data/webgen/website_styles/andreas09/src/images/menuhover-orange.jpg +0 -0
  101. data/data/webgen/website_styles/andreas09/src/images/menuhover-purple.jpg +0 -0
  102. data/data/webgen/website_styles/andreas09/src/images/menuhover-red.jpg +0 -0
  103. data/data/webgen/website_styles/andreas09/src/images/menuhover.jpg +0 -0
  104. data/data/webgen/website_styles/simple/README +6 -0
  105. data/data/webgen/website_styles/simple/src/default.css +84 -0
  106. data/data/webgen/website_styles/simple/src/default.template +36 -0
  107. data/data/webgen/website_templates/default/README +6 -0
  108. data/data/webgen/website_templates/default/src/index.page +8 -0
  109. data/data/webgen/website_templates/project/README +5 -0
  110. data/data/webgen/website_templates/project/src/about.page +12 -0
  111. data/data/webgen/website_templates/project/src/download.page +15 -0
  112. data/data/webgen/website_templates/project/src/features.page +8 -0
  113. data/data/webgen/website_templates/project/src/index.page +9 -0
  114. data/data/webgen/website_templates/project/src/screenshots.page +18 -0
  115. data/doc/contentprocessor.template +11 -0
  116. data/doc/contentprocessor/blocks.page +66 -0
  117. data/doc/contentprocessor/builder.page +80 -0
  118. data/doc/contentprocessor/erb.page +56 -0
  119. data/doc/contentprocessor/erubis.page +46 -0
  120. data/doc/contentprocessor/haml.page +47 -0
  121. data/doc/contentprocessor/maruku.page +41 -0
  122. data/doc/contentprocessor/rdiscount.page +37 -0
  123. data/doc/contentprocessor/rdoc.page +36 -0
  124. data/doc/contentprocessor/redcloth.page +39 -0
  125. data/doc/contentprocessor/sass.page +31 -0
  126. data/doc/contentprocessor/tags.page +73 -0
  127. data/doc/extensions.metainfo +29 -0
  128. data/doc/extensions.page +16 -0
  129. data/doc/extensions.template +17 -0
  130. data/doc/faq.page +214 -0
  131. data/doc/getting_started.page +134 -0
  132. data/doc/index.page +65 -0
  133. data/doc/manual.page +532 -0
  134. data/doc/reference_configuration.page +646 -0
  135. data/doc/reference_metainfo.page +213 -0
  136. data/doc/sourcehandler.template +21 -0
  137. data/doc/sourcehandler/copy.page +19 -0
  138. data/doc/sourcehandler/directory.page +27 -0
  139. data/doc/sourcehandler/feed.page +82 -0
  140. data/doc/sourcehandler/metainfo.page +41 -0
  141. data/doc/sourcehandler/page.page +30 -0
  142. data/doc/sourcehandler/sitemap.page +46 -0
  143. data/doc/sourcehandler/template.page +45 -0
  144. data/doc/sourcehandler/virtual.page +49 -0
  145. data/doc/tag.template +25 -0
  146. data/doc/tag/breadcrumbtrail.page +40 -0
  147. data/doc/tag/coderay.page +49 -0
  148. data/doc/tag/date.page +31 -0
  149. data/doc/tag/executecommand.page +26 -0
  150. data/doc/tag/includefile.page +32 -0
  151. data/doc/tag/langbar.page +22 -0
  152. data/doc/tag/menu.page +92 -0
  153. data/doc/tag/metainfo.page +29 -0
  154. data/doc/tag/relocatable.page +38 -0
  155. data/doc/tag/sitemap.page +31 -0
  156. data/doc/upgrading.page +139 -0
  157. data/doc/webgen_page_format.page +128 -0
  158. data/lib/webgen/blackboard.rb +73 -0
  159. data/lib/webgen/cache.rb +85 -0
  160. data/lib/webgen/cli.rb +118 -0
  161. data/lib/webgen/cli/create_command.rb +64 -0
  162. data/lib/webgen/cli/run_command.rb +20 -0
  163. data/lib/webgen/cli/utils.rb +86 -0
  164. data/lib/webgen/cli/webgui_command.rb +49 -0
  165. data/lib/webgen/common.rb +10 -0
  166. data/lib/webgen/common/sitemap.rb +76 -0
  167. data/lib/webgen/configuration.rb +147 -0
  168. data/lib/webgen/contentprocessor.rb +96 -0
  169. data/lib/webgen/contentprocessor/blocks.rb +46 -0
  170. data/lib/webgen/contentprocessor/builder.rb +26 -0
  171. data/lib/webgen/contentprocessor/context.rb +90 -0
  172. data/lib/webgen/contentprocessor/erb.rb +24 -0
  173. data/lib/webgen/contentprocessor/erubis.rb +40 -0
  174. data/lib/webgen/contentprocessor/haml.rb +25 -0
  175. data/lib/webgen/contentprocessor/maruku.rb +18 -0
  176. data/lib/webgen/contentprocessor/rdiscount.rb +15 -0
  177. data/lib/webgen/contentprocessor/rdoc.rb +17 -0
  178. data/lib/webgen/contentprocessor/redcloth.rb +15 -0
  179. data/lib/webgen/contentprocessor/sass.rb +18 -0
  180. data/lib/webgen/contentprocessor/tags.rb +134 -0
  181. data/lib/webgen/coreext.rb +10 -0
  182. data/lib/webgen/default_config.rb +198 -0
  183. data/lib/webgen/languages.rb +578 -0
  184. data/lib/webgen/loggable.rb +23 -0
  185. data/lib/webgen/logger.rb +78 -0
  186. data/lib/webgen/node.rb +347 -0
  187. data/lib/webgen/output.rb +37 -0
  188. data/lib/webgen/output/filesystem.rb +67 -0
  189. data/lib/webgen/page.rb +133 -0
  190. data/lib/webgen/path.rb +182 -0
  191. data/lib/webgen/source.rb +24 -0
  192. data/lib/webgen/source/filesystem.rb +58 -0
  193. data/lib/webgen/source/resource.rb +42 -0
  194. data/lib/webgen/source/stacked.rb +53 -0
  195. data/lib/webgen/sourcehandler.rb +202 -0
  196. data/lib/webgen/sourcehandler/base.rb +211 -0
  197. data/lib/webgen/sourcehandler/copy.rb +41 -0
  198. data/lib/webgen/sourcehandler/directory.rb +31 -0
  199. data/lib/webgen/sourcehandler/feed.rb +121 -0
  200. data/lib/webgen/sourcehandler/fragment.rb +71 -0
  201. data/lib/webgen/sourcehandler/metainfo.rb +117 -0
  202. data/lib/webgen/sourcehandler/page.rb +77 -0
  203. data/lib/webgen/sourcehandler/sitemap.rb +60 -0
  204. data/lib/webgen/sourcehandler/template.rb +68 -0
  205. data/lib/webgen/sourcehandler/virtual.rb +75 -0
  206. data/lib/webgen/tag.rb +23 -0
  207. data/lib/webgen/tag/base.rb +162 -0
  208. data/lib/webgen/tag/breadcrumbtrail.rb +71 -0
  209. data/lib/webgen/tag/coderay.rb +32 -0
  210. data/lib/webgen/tag/date.rb +18 -0
  211. data/lib/webgen/tag/executecommand.rb +29 -0
  212. data/lib/webgen/tag/includefile.rb +42 -0
  213. data/lib/webgen/tag/langbar.rb +52 -0
  214. data/lib/webgen/tag/menu.rb +186 -0
  215. data/lib/webgen/tag/metainfo.rb +25 -0
  216. data/lib/webgen/tag/relocatable.rb +53 -0
  217. data/lib/webgen/tag/sitemap.rb +42 -0
  218. data/lib/webgen/tree.rb +80 -0
  219. data/lib/webgen/version.rb +6 -0
  220. data/lib/webgen/webgentask.rb +148 -0
  221. data/lib/webgen/website.rb +214 -0
  222. data/lib/webgen/websiteaccess.rb +29 -0
  223. data/lib/webgen/websitemanager.rb +125 -0
  224. data/man/man1/webgen.1 +67 -0
  225. data/misc/default.css +360 -0
  226. data/misc/default.template +75 -0
  227. data/misc/htmldoc.metainfo +25 -0
  228. data/misc/htmldoc.virtual +5 -0
  229. data/misc/images/arrow.gif +0 -0
  230. data/misc/images/error.gif +0 -0
  231. data/misc/images/exclamation.gif +0 -0
  232. data/misc/images/headerbg.jpg +0 -0
  233. data/misc/images/information.gif +0 -0
  234. data/misc/images/quote.gif +0 -0
  235. data/setup.rb +1585 -0
  236. data/test/helper.rb +41 -0
  237. data/test/test_blackboard.rb +58 -0
  238. data/test/test_cache.rb +57 -0
  239. data/test/test_common_sitemap.rb +56 -0
  240. data/test/test_configuration.rb +66 -0
  241. data/test/test_contentprocessor.rb +31 -0
  242. data/test/test_contentprocessor_blocks.rb +34 -0
  243. data/test/test_contentprocessor_builder.rb +19 -0
  244. data/test/test_contentprocessor_context.rb +38 -0
  245. data/test/test_contentprocessor_erb.rb +20 -0
  246. data/test/test_contentprocessor_erubis.rb +47 -0
  247. data/test/test_contentprocessor_haml.rb +20 -0
  248. data/test/test_contentprocessor_maruku.rb +27 -0
  249. data/test/test_contentprocessor_rdiscount.rb +15 -0
  250. data/test/test_contentprocessor_rdoc.rb +16 -0
  251. data/test/test_contentprocessor_redcloth.rb +12 -0
  252. data/test/test_contentprocessor_sass.rb +20 -0
  253. data/test/test_contentprocessor_tags.rb +97 -0
  254. data/test/test_languages.rb +53 -0
  255. data/test/test_loggable.rb +30 -0
  256. data/test/test_logger.rb +73 -0
  257. data/test/test_node.rb +339 -0
  258. data/test/test_output_filesystem.rb +58 -0
  259. data/test/test_page.rb +203 -0
  260. data/test/test_path.rb +131 -0
  261. data/test/test_source_filesystem.rb +59 -0
  262. data/test/test_source_resource.rb +26 -0
  263. data/test/test_source_stacked.rb +34 -0
  264. data/test/test_sourcehandler_base.rb +92 -0
  265. data/test/test_sourcehandler_copy.rb +45 -0
  266. data/test/test_sourcehandler_directory.rb +25 -0
  267. data/test/test_sourcehandler_feed.rb +74 -0
  268. data/test/test_sourcehandler_fragment.rb +67 -0
  269. data/test/test_sourcehandler_metainfo.rb +93 -0
  270. data/test/test_sourcehandler_page.rb +70 -0
  271. data/test/test_sourcehandler_sitemap.rb +47 -0
  272. data/test/test_sourcehandler_template.rb +63 -0
  273. data/test/test_sourcehandler_virtual.rb +56 -0
  274. data/test/test_tag_base.rb +82 -0
  275. data/test/test_tag_breadcrumbtrail.rb +89 -0
  276. data/test/test_tag_coderay.rb +30 -0
  277. data/test/test_tag_date.rb +16 -0
  278. data/test/test_tag_executecommand.rb +39 -0
  279. data/test/test_tag_includefile.rb +48 -0
  280. data/test/test_tag_langbar.rb +60 -0
  281. data/test/test_tag_menu.rb +195 -0
  282. data/test/test_tag_metainfo.rb +17 -0
  283. data/test/test_tag_relocatable.rb +57 -0
  284. data/test/test_tag_sitemap.rb +44 -0
  285. data/test/test_tree.rb +69 -0
  286. data/test/test_webgentask.rb +21 -0
  287. data/test/test_website.rb +96 -0
  288. data/test/test_websiteaccess.rb +23 -0
  289. data/test/test_websitemanager.rb +68 -0
  290. metadata +575 -0
@@ -0,0 +1,45 @@
1
+ ---
2
+ title: Webgen::SourceHandler::Template
3
+ ---
4
+ ## Description
5
+
6
+ The template handler processes the templates files. Templates, as the name already implies, normally
7
+ specify the layout and the overall "picture" of a web page that is defined using a page file. These
8
+ files are in [Webgen Page Format]({relocatable: ../webgen_page_format.html}) (the format which is
9
+ also used for page files).
10
+
11
+ The configuration option `sourcehandler.template.default_template` specifies the name of the default
12
+ template which is used when no explicit template is set via the meta information `template`. webgen
13
+ assumes that the default template is in the same directory as the page file. However, if it can not
14
+ be found there, the parent directory is searched for it and so on. If a default template isn't found
15
+ in the root directory, no template is used at all. This means that when you create a default
16
+ template in the root directory, it is used as template for all page files that have no explicit
17
+ template set.
18
+
19
+ webgen also uses the concept of a template chain to support multiple templates for one page
20
+ file. For example, assume that
21
+
22
+ * the page file `index.page` has set the `template` meta information to `special.template`,
23
+ * the template `special.template` has no `template` meta information set and
24
+ * the page file `other.page` also has no `template` meta information set.
25
+
26
+ The template chain for `index.page` would look like this
27
+
28
+ default.template <-- special.template <-- index.page
29
+
30
+ whereas the template chain for `other.page` would look like this
31
+
32
+ default.template <-- index.page
33
+
34
+ The first case also means that the `special.template` is nested in the `default.template`. This
35
+ makes it possible, for example, to create a general website layout and then to create a special
36
+ image gallery layout which uses the general one.
37
+
38
+ To stop the template handler from further searching for a template, you explicitly need to set a
39
+ null template for the page or template file:
40
+
41
+ template: ~
42
+
43
+ This is useful if you want to have a different `default.template` in a sub directory which should
44
+ provide a different look-and-feel for this subtree as the `default.template` in the root of the
45
+ website.
@@ -0,0 +1,49 @@
1
+ ---
2
+ title: Webgen::SourceHandler::Virtual
3
+ ---
4
+ ## Description
5
+
6
+ This source handler uses files in [Webgen Page Format]({relocatable: ../webgen_page_format.html})
7
+ which are used to specify virtual paths. Virtual paths don't really exist as source paths but are
8
+ useful nonetheless. For example, they allow to include links to external content in automatically
9
+ generated menus. They are never written out since they define no real content!
10
+
11
+ The `content` block of the source path is used and its content needs to be a hash in YAML
12
+ format. The keys are relative or absolute source paths names and the values meta information for
13
+ them. Any meta information can be set on a virtual path but one meta information key is special:
14
+ `url`. This meta information specifies, relative to the directory in which the source file is in,
15
+ the output path for the virtual node. If no `url` meta information is specified, the source path
16
+ itself is used as output path.
17
+
18
+ Following is a sample virtual source files with explanations afterwards:
19
+
20
+ \--- !omap
21
+ - /documentation/:
22
+
23
+ - /documentation/index.html:
24
+ routed_title: Documentation
25
+
26
+ - download_and_installation.html:
27
+ in_menu: true
28
+ sort_info: 25
29
+ url: index.html#download__installation
30
+
31
+ - /documentation/api.html:
32
+ title: API Reference
33
+ url: http://myhost.com/api
34
+
35
+ > The example does not use a normal hash but an ordered YAML map. This ensures that the virtual
36
+ > nodes are created in the order they appear in the file.
37
+ {.information}
38
+
39
+ The first entry specifies that a directory `/documentation` should be created. The virtual file
40
+ handler recognizes this because the given path ends in a slash!. Then a virtual index file for the
41
+ virtual directory is created. This would be done, for example, when the documentation directory is
42
+ created by an external program.
43
+
44
+ The third entry specifies a virtual file that should in the menu and should have a certain sort
45
+ information. When this virtual file is referenced, the path given by the `url` key is returned. This
46
+ example shows how to make a single link to a fragment appear in automatically generated menus.
47
+
48
+ And the fourth entry specifies another virtual file whose output path is an URL pointing to
49
+ `http://myhost.com/api`.
data/doc/tag.template ADDED
@@ -0,0 +1,25 @@
1
+ ---
2
+ template: extensions.template
3
+ --- name:summary pipeline:erb,tags,maruku,blocks
4
+
5
+ The following tag names are registered for this tag class:
6
+ <%= context.website.config['contentprocessor.tags.map'].
7
+ select {|k,v| v == context.content_node['title']}.
8
+ map {|k,v| '`' + (k.kind_of?(Symbol) ? k.inspect : k.to_s) + '`'}.join(', ') %>
9
+
10
+ <% if context.content_node['used_options'] %>
11
+ This tag uses the following options:
12
+
13
+ <%
14
+ for option in context.content_node['used_options']
15
+ temp = 'mandatory' if !context.website.config.meta_info[option][:mandatory].nil?
16
+ temp += ' default' if context.website.config.meta_info[option][:mandatory] == 'default'
17
+ %>* [`<%= option %>`]({relocatable: reference_configuration.html#<%= option.tr('.', '') %>}) <%= temp ? '(' + temp + ')' : '' %>
18
+ <%
19
+ temp = nil
20
+ end
21
+ %>
22
+
23
+ <% end %>
24
+ --- name:content
25
+ <webgen:block name='content' />
@@ -0,0 +1,40 @@
1
+ ---
2
+ title: Webgen::Tag::BreadcrumbTrail
3
+ used_options:
4
+ - tag.breadcrumbtrail.separator
5
+ - tag.breadcrumbtrail.omit_index_path
6
+ - tag.breadcrumbtrail.start_level
7
+ - tag.breadcrumbtrail.end_level
8
+ ---
9
+ ## Description
10
+
11
+ The breadcrumb trail tag is used for displaying the hierarchy of the current page. The behavior of
12
+ the `tag.breadcrumbtrail.omit_index_path` option can be overridden for individual index paths by
13
+ setting the meta information `omit_index_path` accordingly.
14
+
15
+ The amount of levels shown can be customized by using the options `tag.breadcrumbtrail.start_level`
16
+ and `tag.breadcrumbtrail.end_level`, see the examples below.
17
+
18
+ ## Examples
19
+
20
+ <table class="examples">
21
+ <tr>
22
+ <th>Usage</th><th>Output</th>
23
+ </tr>
24
+ <tr>
25
+ <td>\{breadcrumb_trail:}</td>
26
+ <td>{breadcrumb_trail:}</td>
27
+ </tr>
28
+ <tr>
29
+ <td>\{breadcrumb_trail: {separator: " HELLO "}}</td>
30
+ <td>{breadcrumb_trail: {separator: " HELLO "}}</td>
31
+ </tr>
32
+ <tr>
33
+ <td>\{breadcrumb_trail: {end_level: -2}}</td>
34
+ <td>{breadcrumb_trail: {end_level: -2}}</td>
35
+ </tr>
36
+ <tr>
37
+ <td>\{breadcrumb_trail: {start_level: 1}}</td>
38
+ <td>{breadcrumb_trail: {start_level: 1}}</td>
39
+ </tr>
40
+ </table>
@@ -0,0 +1,49 @@
1
+ ---
2
+ title: Webgen::Tag::Coderay
3
+ used_options:
4
+ - tag.coderay.lang
5
+ - tag.coderay.process_body
6
+ - tag.coderay.wrap
7
+ - tag.coderay.line_numbers
8
+ - tag.coderay.line_number_start
9
+ - tag.coderay.bold_every
10
+ - tag.coderay.tab_width
11
+ ---
12
+ ## Description
13
+
14
+ This tag applies syntax highlighting to its body by using the [coderay][1] library which can be used
15
+ to highlight many different languages (see `tag.coderay.lang` documentation). The body of the tag
16
+ specifies what should be highlighted.
17
+
18
+ > It is easy to include and highlight an entire file by combining this tag with the `include_file` tag:
19
+ >
20
+ > \{coderay:: ruby}{include_file: test.rb}{coderay}
21
+ {.information}
22
+
23
+ > This extension is only available if you have installed the [coderay][1] library. The preferred
24
+ > way to do this is via Rubygems:
25
+ >
26
+ > gem install coderay
27
+ {.exclamation}
28
+
29
+ [1]: http://coderay.rubychan.de/ "The Coderay homepage"
30
+
31
+ ## Examples
32
+
33
+ <table class="examples">
34
+ <tr>
35
+ <th>Usage</th><th>Output</th>
36
+ </tr>
37
+ <tr>
38
+ <td>\{coderay:: {lang: ruby, bold_every: 2}}{include_file: lib/webgen/version.rb}{coderay}</td>
39
+ <% if File.exists?(File.join(context.website.directory, 'lib/webgen/version.rb')) %>
40
+ <td>{coderay:: {lang: ruby, bold_every: 2}}{include_file: lib/webgen/version.rb}{coderay}</td>
41
+ <% else %>
42
+ <td>{coderay:: {lang: ruby, bold_every: 2}}{include_file: ../lib/webgen/version.rb}{coderay}</td>
43
+ <% end %>
44
+ </tr>
45
+ <tr>
46
+ <td>\{coderay:: {lang: ruby, wrap: span}}puts 5+5{coderay}</td>
47
+ <td><code>{coderay:: {lang: ruby, wrap: span}}puts 5+5{coderay}</code></td>
48
+ </tr>
49
+ </table>
data/doc/tag/date.page ADDED
@@ -0,0 +1,31 @@
1
+ ---
2
+ title: Webgen::Tag::Date
3
+ used_options:
4
+ - tag.date.format
5
+ ---
6
+ ## Description
7
+
8
+ The date tag is used to display the current time in a specific format (the format of Ruby's inbuilt
9
+ method [Time#strftime][1]). Have a look a the examples below to see some possible outputs.
10
+
11
+ [1]: http://www.ruby-doc.org/core/classes/Time.html
12
+
13
+ ## Examples
14
+
15
+ <table class="examples">
16
+ <tr>
17
+ <th>Usage</th><th>Output</th>
18
+ </tr>
19
+ <tr>
20
+ <td>\{date:}</td>
21
+ <td>{date:}</td>
22
+ </tr>
23
+ <tr>
24
+ <td>\{date: {format: '%A, %Y-%m-%d'}}</td>
25
+ <td>{date: {format: '%A, %Y-%m-%d'}}</td>
26
+ </tr>
27
+ <tr>
28
+ <td>\{date: {format: %x - %X}}</td>
29
+ <td>{date: {format: %x - %X}}</td>
30
+ </tr>
31
+ </table>
@@ -0,0 +1,26 @@
1
+ ---
2
+ title: Webgen::Tag::ExecuteCommand
3
+ used_options:
4
+ - tag.executecommand.command
5
+ - tag.executecommand.process_output
6
+ - tag.executecommand.escape_html
7
+ ---
8
+ ## Description
9
+
10
+ The execute command tag is used to include the output from a shell command.
11
+
12
+ ## Examples
13
+
14
+ <table class="examples">
15
+ <tr>
16
+ <th>Usage</th><th>Output</th>
17
+ </tr>
18
+ <tr>
19
+ <td>\{execute_cmd: uname -p}</td>
20
+ <td><pre>{execute_cmd: uname -p}</pre></td>
21
+ </tr>
22
+ <tr>
23
+ <td>\{execute_cmd: {command: 'ruby -v'}}</td>
24
+ <td><pre>{execute_cmd: {command: 'ruby -v'}}</pre></td>
25
+ </tr>
26
+ </table>
@@ -0,0 +1,32 @@
1
+ ---
2
+ title: Webgen::Tag::IncludeFile
3
+ used_options:
4
+ - tag.includefile.filename
5
+ - tag.includefile.process_output
6
+ - tag.includefile.escape_html
7
+ ---
8
+ ## Description
9
+
10
+ The include file tag is used to include the content of a file. The filename needs to be specified
11
+ relative to the website directory or an absolute filename.
12
+
13
+ > By surrounding the include file tag with a syntax highlighting tag it is possible to highlight the
14
+ > contents of a file.
15
+ {.information}
16
+
17
+
18
+ ## Examples
19
+
20
+ <table class="examples">
21
+ <tr>
22
+ <th>Usage</th><th>Output</th>
23
+ </tr>
24
+ <tr>
25
+ <td>\{include_file: {filename: AUTHORS, process_output: false}}</td>
26
+ <% if File.exists?(File.join(context.website.directory, 'AUTHORS')) %>
27
+ <td><pre>{include_file: {filename: AUTHORS, process_output: false}}</pre></td>
28
+ <% else %>
29
+ <td><pre>{include_file: {filename: ../AUTHORS, process_output: false}}</pre></td>
30
+ <% end %>
31
+ </tr>
32
+ </table>
@@ -0,0 +1,22 @@
1
+ ---
2
+ title: Webgen::Tag::Langbar
3
+ used_options:
4
+ - tag.langbar.separator
5
+ - tag.langbar.show_own_lang
6
+ - tag.langbar.show_single_lang
7
+ ---
8
+ ## Description
9
+
10
+ This tag is used to display a list of links to translations of the page.
11
+
12
+ ## Examples
13
+
14
+ <table class="examples">
15
+ <tr>
16
+ <th>Usage</th><th>Output</th>
17
+ </tr>
18
+ <tr>
19
+ <td>\{langbar:}</td>
20
+ <td>{langbar:}</td>
21
+ </tr>
22
+ </table>
data/doc/tag/menu.page ADDED
@@ -0,0 +1,92 @@
1
+ ---
2
+ title: Webgen::Tag::Menu
3
+ used_options:
4
+ - tag.menu.used_nodes
5
+ - tag.menu.start_level
6
+ - tag.menu.min_levels
7
+ - tag.menu.max_levels
8
+ - tag.menu.show_current_subtree_only
9
+ ---
10
+ ## Description
11
+
12
+ The menu tag builds a seemingly simple menu using HTML lists. However, it is very flexible due to
13
+ its many options that let you decide every detail of the menu.
14
+
15
+ > The menu is constructed using HTML lists with `ul` and `li` tags. However, the menu normally
16
+ > looks better if no discs are shown for the menu items (using the CSS directive `list-style-type:
17
+ > none`).
18
+ {.information}
19
+
20
+ It uses the meta information `in_menu` and `sort_info` to determine which nodes should be in the
21
+ menu and how they should be ordered. A separate menu tree is then created from all nodes for each
22
+ language.
23
+
24
+ By setting the option `tag.menu.used_nodes` to `fragments`, the menu tag can also be used for
25
+ generating an in-page content menu of all the header sections.
26
+
27
+ > When using the option value `files` for `tag.menu.used_nodes`, all nodes which are only in the
28
+ > menu because they have fragment nodes beneath them are not included in the menu.
29
+ {.exclamation}
30
+
31
+ The rendered menu consists of `ul` and `li` tags and the links (or `span` elements) to the menu
32
+ entries . The `li` tags have special CSS classes set for styling. These CSS class names are as
33
+ follows:
34
+
35
+ * `webgen-menu-levelNUMBER`: Set on all menu items and can be used to style specific menu levels
36
+ only. `NUMBER` is replaced with the actual menu level, so the first level menu entries will get a
37
+ `webgen-menu-level1` class.
38
+ * `webgen-menu-submenu`: Set if the menu item contains sub menu items.
39
+ * `webgen-menu-submenu-inhierarchy`: Set if the menu item contains sub menu items and it is in the
40
+ sub tree of the rendered node.
41
+ * `webgen-menu-item-selected`: Set if the menu item corresponds to the rendered node.
42
+
43
+ ## "Static" Menus
44
+
45
+ It is also possible to define a "static" menu or to augment the dynamic menu with static entries by
46
+ using virtual files. They can be used to structure the menu the way you like it. This way it is also
47
+ possible to add one page under two different headings:
48
+
49
+ features.en.html:
50
+ in_menu: true
51
+ title: Features
52
+ url: index.en.html#features
53
+
54
+ newdir:
55
+ sort_info: 2
56
+
57
+ newdir/new.en.html:
58
+ sort_info: 1
59
+ in_menu: true
60
+ url: ../features.en.html
61
+
62
+ There is no need to specify `in_menu` for `newdir` since a page under the directory is in the
63
+ menu. Also be aware that you need to set the language explicitly if a file should only appear in the
64
+ menu for a specific language. Otherwise it appears in every menu. The `url` specifies the file that
65
+ should be shown when clicked on the generated link.
66
+
67
+ A completely "static" menu can be generated by only using virtual directories and files and not
68
+ setting `in_menu` for any other node.
69
+
70
+ ## Examples
71
+
72
+ <table class="examples">
73
+ <tr>
74
+ <th>Usage</th><th>Output</th>
75
+ </tr>
76
+ <tr>
77
+ <td>\{menu: }</td>
78
+ <td>{menu:}</td>
79
+ </tr>
80
+ <tr>
81
+ <td>\{menu: {used_nodes: all}}</td>
82
+ <td>{menu: {used_nodes: all}}</td>
83
+ </tr>
84
+ <tr>
85
+ <td>\{menu: {used_nodes: files}}</td>
86
+ <td>{menu: {used_nodes: files}}</td>
87
+ </tr>
88
+ <tr>
89
+ <td>\{menu: {used_nodes: fragments}}</td>
90
+ <td>{menu: {used_nodes: fragments}}</td>
91
+ </tr>
92
+ </table>
@@ -0,0 +1,29 @@
1
+ ---
2
+ title: Webgen::Tag::Metainfo
3
+ ---
4
+ ## Description
5
+
6
+ The meta tag is used to copy meta information verbatim. It is used as fallback when no other tag
7
+ class for a specific tag name could not be found. For example, if you define a meta information with
8
+ the key `revision`, you can put the tag `\{revision:}` into a block of a page file and the value
9
+ gets substituted automatically.
10
+
11
+ An every day usage example for the meta tag would be including the title of a page in the
12
+ `head`-section of a HTML template or specifying the language of the HTML file by using the
13
+ `\{lang:}` tag.
14
+
15
+ ## Examples
16
+
17
+ <table class="examples">
18
+ <tr>
19
+ <th>Usage</th><th>Output</th>
20
+ </tr>
21
+ <tr>
22
+ <td>\{title: }</td>
23
+ <td>{title:}</td>
24
+ </tr>
25
+ <tr>
26
+ <td>\{lang: }</td>
27
+ <td>{lang:}</td>
28
+ </tr>
29
+ </table>