thewoolleyman-webgen 0.5.8.20090419

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (309) hide show
  1. data/AUTHORS +8 -0
  2. data/COPYING +10 -0
  3. data/GPL +340 -0
  4. data/Rakefile +334 -0
  5. data/THANKS +18 -0
  6. data/bin/webgen +12 -0
  7. data/data/webgen/resources.yaml +3 -0
  8. data/data/webgen/webgui/controller/main.rb +135 -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 +10 -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 +62 -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 +129 -0
  117. data/doc/contentprocessor/builder.page +80 -0
  118. data/doc/contentprocessor/erb.page +59 -0
  119. data/doc/contentprocessor/erubis.page +46 -0
  120. data/doc/contentprocessor/fragments.page +25 -0
  121. data/doc/contentprocessor/haml.page +47 -0
  122. data/doc/contentprocessor/maruku.page +41 -0
  123. data/doc/contentprocessor/rdiscount.page +37 -0
  124. data/doc/contentprocessor/rdoc.page +36 -0
  125. data/doc/contentprocessor/redcloth.page +39 -0
  126. data/doc/contentprocessor/sass.page +31 -0
  127. data/doc/contentprocessor/tags.page +73 -0
  128. data/doc/extensions.metainfo +29 -0
  129. data/doc/extensions.page +16 -0
  130. data/doc/extensions.template +17 -0
  131. data/doc/faq.page +219 -0
  132. data/doc/getting_started.page +135 -0
  133. data/doc/index.page +65 -0
  134. data/doc/manual.page +589 -0
  135. data/doc/reference_configuration.page +959 -0
  136. data/doc/reference_metainfo.page +222 -0
  137. data/doc/source/filesystem.page +39 -0
  138. data/doc/source/tararchive.page +40 -0
  139. data/doc/sourcehandler.template +21 -0
  140. data/doc/sourcehandler/copy.page +19 -0
  141. data/doc/sourcehandler/directory.page +27 -0
  142. data/doc/sourcehandler/feed.page +105 -0
  143. data/doc/sourcehandler/metainfo.page +41 -0
  144. data/doc/sourcehandler/page.page +14 -0
  145. data/doc/sourcehandler/sitemap.page +46 -0
  146. data/doc/sourcehandler/template.page +45 -0
  147. data/doc/sourcehandler/virtual.page +49 -0
  148. data/doc/tag.template +25 -0
  149. data/doc/tag/breadcrumbtrail.page +40 -0
  150. data/doc/tag/coderay.page +49 -0
  151. data/doc/tag/date.page +31 -0
  152. data/doc/tag/executecommand.page +26 -0
  153. data/doc/tag/includefile.page +32 -0
  154. data/doc/tag/langbar.page +44 -0
  155. data/doc/tag/link.page +44 -0
  156. data/doc/tag/menu.page +106 -0
  157. data/doc/tag/metainfo.page +29 -0
  158. data/doc/tag/relocatable.page +38 -0
  159. data/doc/tag/sitemap.page +31 -0
  160. data/doc/tag/tikz.page +158 -0
  161. data/doc/upgrading.page +139 -0
  162. data/doc/webgen_page_format.page +129 -0
  163. data/lib/webgen/blackboard.rb +78 -0
  164. data/lib/webgen/cache.rb +87 -0
  165. data/lib/webgen/cli.rb +124 -0
  166. data/lib/webgen/cli/apply_command.rb +64 -0
  167. data/lib/webgen/cli/create_command.rb +66 -0
  168. data/lib/webgen/cli/run_command.rb +22 -0
  169. data/lib/webgen/cli/utils.rb +88 -0
  170. data/lib/webgen/cli/webgui_command.rb +72 -0
  171. data/lib/webgen/common.rb +21 -0
  172. data/lib/webgen/common/sitemap.rb +83 -0
  173. data/lib/webgen/configuration.rb +153 -0
  174. data/lib/webgen/contentprocessor.rb +99 -0
  175. data/lib/webgen/contentprocessor/blocks.rb +60 -0
  176. data/lib/webgen/contentprocessor/builder.rb +30 -0
  177. data/lib/webgen/contentprocessor/context.rb +89 -0
  178. data/lib/webgen/contentprocessor/erb.rb +28 -0
  179. data/lib/webgen/contentprocessor/erubis.rb +40 -0
  180. data/lib/webgen/contentprocessor/fragments.rb +25 -0
  181. data/lib/webgen/contentprocessor/haml.rb +30 -0
  182. data/lib/webgen/contentprocessor/maruku.rb +20 -0
  183. data/lib/webgen/contentprocessor/rdiscount.rb +17 -0
  184. data/lib/webgen/contentprocessor/rdoc.rb +19 -0
  185. data/lib/webgen/contentprocessor/redcloth.rb +17 -0
  186. data/lib/webgen/contentprocessor/sass.rb +20 -0
  187. data/lib/webgen/contentprocessor/tags.rb +136 -0
  188. data/lib/webgen/coreext.rb +13 -0
  189. data/lib/webgen/default_config.rb +215 -0
  190. data/lib/webgen/languages.rb +589 -0
  191. data/lib/webgen/loggable.rb +25 -0
  192. data/lib/webgen/logger.rb +97 -0
  193. data/lib/webgen/node.rb +391 -0
  194. data/lib/webgen/output.rb +82 -0
  195. data/lib/webgen/output/filesystem.rb +69 -0
  196. data/lib/webgen/page.rb +153 -0
  197. data/lib/webgen/path.rb +194 -0
  198. data/lib/webgen/source.rb +54 -0
  199. data/lib/webgen/source/filesystem.rb +61 -0
  200. data/lib/webgen/source/resource.rb +44 -0
  201. data/lib/webgen/source/stacked.rb +55 -0
  202. data/lib/webgen/source/tararchive.rb +73 -0
  203. data/lib/webgen/sourcehandler.rb +226 -0
  204. data/lib/webgen/sourcehandler/base.rb +248 -0
  205. data/lib/webgen/sourcehandler/copy.rb +43 -0
  206. data/lib/webgen/sourcehandler/directory.rb +36 -0
  207. data/lib/webgen/sourcehandler/feed.rb +117 -0
  208. data/lib/webgen/sourcehandler/fragment.rb +68 -0
  209. data/lib/webgen/sourcehandler/memory.rb +43 -0
  210. data/lib/webgen/sourcehandler/metainfo.rb +128 -0
  211. data/lib/webgen/sourcehandler/page.rb +59 -0
  212. data/lib/webgen/sourcehandler/sitemap.rb +60 -0
  213. data/lib/webgen/sourcehandler/template.rb +66 -0
  214. data/lib/webgen/sourcehandler/virtual.rb +110 -0
  215. data/lib/webgen/tag.rb +27 -0
  216. data/lib/webgen/tag/base.rb +170 -0
  217. data/lib/webgen/tag/breadcrumbtrail.rb +70 -0
  218. data/lib/webgen/tag/coderay.rb +31 -0
  219. data/lib/webgen/tag/date.rb +18 -0
  220. data/lib/webgen/tag/executecommand.rb +30 -0
  221. data/lib/webgen/tag/includefile.rb +42 -0
  222. data/lib/webgen/tag/langbar.rb +52 -0
  223. data/lib/webgen/tag/link.rb +26 -0
  224. data/lib/webgen/tag/menu.rb +207 -0
  225. data/lib/webgen/tag/metainfo.rb +25 -0
  226. data/lib/webgen/tag/relocatable.rb +54 -0
  227. data/lib/webgen/tag/sitemap.rb +41 -0
  228. data/lib/webgen/tag/tikz.rb +119 -0
  229. data/lib/webgen/tree.rb +90 -0
  230. data/lib/webgen/version.rb +8 -0
  231. data/lib/webgen/webgentask.rb +152 -0
  232. data/lib/webgen/website.rb +342 -0
  233. data/lib/webgen/websiteaccess.rb +31 -0
  234. data/lib/webgen/websitemanager.rb +127 -0
  235. data/man/man1/webgen.1 +73 -0
  236. data/misc/default.css +384 -0
  237. data/misc/default.template +75 -0
  238. data/misc/htmldoc.metainfo +25 -0
  239. data/misc/htmldoc.virtual +5 -0
  240. data/misc/images/arrow.gif +0 -0
  241. data/misc/images/error.png +0 -0
  242. data/misc/images/headerbg.jpg +0 -0
  243. data/misc/images/important.png +0 -0
  244. data/misc/images/information.png +0 -0
  245. data/misc/images/quote.gif +0 -0
  246. data/misc/images/warning.png +0 -0
  247. data/setup.rb +1585 -0
  248. data/test/helper.rb +45 -0
  249. data/test/test_blackboard.rb +60 -0
  250. data/test/test_cache.rb +59 -0
  251. data/test/test_cli.rb +21 -0
  252. data/test/test_common.rb +18 -0
  253. data/test/test_common_sitemap.rb +58 -0
  254. data/test/test_configuration.rb +68 -0
  255. data/test/test_contentprocessor.rb +33 -0
  256. data/test/test_contentprocessor_blocks.rb +68 -0
  257. data/test/test_contentprocessor_builder.rb +23 -0
  258. data/test/test_contentprocessor_context.rb +40 -0
  259. data/test/test_contentprocessor_erb.rb +23 -0
  260. data/test/test_contentprocessor_erubis.rb +49 -0
  261. data/test/test_contentprocessor_fragments.rb +42 -0
  262. data/test/test_contentprocessor_haml.rb +23 -0
  263. data/test/test_contentprocessor_maruku.rb +29 -0
  264. data/test/test_contentprocessor_rdiscount.rb +17 -0
  265. data/test/test_contentprocessor_rdoc.rb +18 -0
  266. data/test/test_contentprocessor_redcloth.rb +15 -0
  267. data/test/test_contentprocessor_sass.rb +22 -0
  268. data/test/test_contentprocessor_tags.rb +99 -0
  269. data/test/test_languages.rb +67 -0
  270. data/test/test_loggable.rb +32 -0
  271. data/test/test_logger.rb +94 -0
  272. data/test/test_node.rb +367 -0
  273. data/test/test_output_filesystem.rb +60 -0
  274. data/test/test_page.rb +214 -0
  275. data/test/test_path.rb +165 -0
  276. data/test/test_source_filesystem.rb +76 -0
  277. data/test/test_source_resource.rb +28 -0
  278. data/test/test_source_stacked.rb +36 -0
  279. data/test/test_source_tararchive.rb +65 -0
  280. data/test/test_sourcehandler_base.rb +123 -0
  281. data/test/test_sourcehandler_copy.rb +47 -0
  282. data/test/test_sourcehandler_directory.rb +42 -0
  283. data/test/test_sourcehandler_feed.rb +77 -0
  284. data/test/test_sourcehandler_fragment.rb +69 -0
  285. data/test/test_sourcehandler_memory.rb +44 -0
  286. data/test/test_sourcehandler_metainfo.rb +118 -0
  287. data/test/test_sourcehandler_page.rb +65 -0
  288. data/test/test_sourcehandler_sitemap.rb +49 -0
  289. data/test/test_sourcehandler_template.rb +65 -0
  290. data/test/test_sourcehandler_virtual.rb +87 -0
  291. data/test/test_tag_base.rb +85 -0
  292. data/test/test_tag_breadcrumbtrail.rb +91 -0
  293. data/test/test_tag_coderay.rb +32 -0
  294. data/test/test_tag_date.rb +18 -0
  295. data/test/test_tag_executecommand.rb +41 -0
  296. data/test/test_tag_includefile.rb +50 -0
  297. data/test/test_tag_langbar.rb +72 -0
  298. data/test/test_tag_link.rb +69 -0
  299. data/test/test_tag_menu.rb +207 -0
  300. data/test/test_tag_metainfo.rb +19 -0
  301. data/test/test_tag_relocatable.rb +59 -0
  302. data/test/test_tag_sitemap.rb +47 -0
  303. data/test/test_tag_tikz.rb +69 -0
  304. data/test/test_tree.rb +70 -0
  305. data/test/test_webgentask.rb +23 -0
  306. data/test/test_website.rb +98 -0
  307. data/test/test_websiteaccess.rb +25 -0
  308. data/test/test_websitemanager.rb +70 -0
  309. metadata +613 -0
data/doc/tag/link.page ADDED
@@ -0,0 +1,44 @@
1
+ ---
2
+ title: Webgen::Tag::Link
3
+ used_options:
4
+ - tag.link.path
5
+ - tag.link.attr
6
+ ---
7
+ ## Description
8
+
9
+ This tag can be used to generate a link to an (absolute) (localized) canonical path. The generated
10
+ link will behave exactly like the ones generated by, for example, the breadcrumb trail tag or the
11
+ menu tag. So it respects the setting of the configuration option `website.link_to_current_page`
12
+ which means that if this option is set to `false` only a `span` element and not an `a` element is
13
+ created.
14
+
15
+ The configuration option `tag.link.attr` lets you specify additional HTML options that should be set
16
+ on the generated link. It can also be used to set the link text via the special `:link_text` key!
17
+
18
+ ## Examples
19
+
20
+ <table class="examples">
21
+ <tr>
22
+ <th>Usage</th><th>Output</th>
23
+ </tr>
24
+ <tr>
25
+ <td>\{link: /default.css}</td>
26
+ <td>{link: /default.css}</td>
27
+ </tr>
28
+ <tr>
29
+ <td>\{link: link.html}</td>
30
+ <td>{link: link.html}</td>
31
+ </tr>
32
+ <tr>
33
+ <td>\{link: link.html#description}</td>
34
+ <td>{link: link.html#description}</td>
35
+ </tr>
36
+ <tr>
37
+ <td>\{link: ../}</td>
38
+ <td>{link: ../}</td>
39
+ </tr>
40
+ <tr>
41
+ <td>\{link: {path: relocatable.html, attr: {:link_text: A nicer link text, title: Just a title}}}</td>
42
+ <td>{link: {path: relocatable.html, attr: {:link_text: A nicer link text, title: Just a title}}}</td>
43
+ </tr>
44
+ </table>
data/doc/tag/menu.page ADDED
@@ -0,0 +1,106 @@
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
+ - tag.menu.nested
10
+ ---
11
+ ## Description
12
+
13
+ The menu tag builds a seemingly simple menu using HTML lists. However, it is very flexible due to
14
+ its many options that let you decide every detail of the menu.
15
+
16
+ > The menu is constructed using HTML lists with `ul` and `li` tags. However, the menu normally
17
+ > looks better if no discs are shown for the menu items (using the CSS directive `list-style-type:
18
+ > none`).
19
+ {.information}
20
+
21
+ It uses the meta information `in_menu` and `sort_info` to determine which nodes should be in the
22
+ menu and how they should be ordered. A separate menu tree is then created from all nodes for each
23
+ language.
24
+
25
+ By setting the option `tag.menu.used_nodes` to `fragments`, the menu tag can also be used for
26
+ generating an in-page content menu of all the header sections.
27
+
28
+ > When using the option value `files` for `tag.menu.used_nodes`, all nodes which are only in the
29
+ > menu because they have fragment nodes beneath them are not included in the menu.
30
+ {.important}
31
+
32
+ The rendered menu consists of `ul` and `li` tags and the links (or `span` elements) to the menu
33
+ entries . The `li` tags have special CSS classes set for styling. These CSS class names are as
34
+ follows:
35
+
36
+ * `webgen-menu-levelNUMBER`: Set on all menu items and can be used to style specific menu levels
37
+ only. `NUMBER` is replaced with the actual menu level, so the first level menu entries will get a
38
+ `webgen-menu-level1` class.
39
+ * `webgen-menu-submenu`: Set if the menu item contains sub menu items.
40
+ * `webgen-menu-submenu-inhierarchy`: Set if the menu item contains sub menu items and it is in the
41
+ sub tree of the rendered node.
42
+ * `webgen-menu-item-selected`: Set if the menu item corresponds to the rendered node.
43
+
44
+ The option `tag.menu.nested` decides whether a nested menu or a non-nested is generated. When
45
+ setting this option to `false` you need to ensure that `tag.menu.show_current_subtree_only` is set
46
+ to `true` and `tag.menu.min_levels` is set to `1`. Both ensure that no other subtree obfuscates the
47
+ menu.
48
+
49
+ > Set `tag.menu.nested` to `false` if you want to generate, for example, a horizontal menu, ie. a
50
+ > menu that has one horizontal bar for each menu level.
51
+ {.information}
52
+
53
+ ## "Static" Menus
54
+
55
+ It is also possible to define a "static" menu or to augment the dynamic menu with static entries by
56
+ using virtual files. They can be used to structure the menu the way you like it. This way it is also
57
+ possible to add one page under two different headings:
58
+
59
+ features.en.html:
60
+ in_menu: true
61
+ title: Features
62
+ url: index.en.html#features
63
+
64
+ newdir:
65
+ sort_info: 2
66
+
67
+ newdir/new.en.html:
68
+ sort_info: 1
69
+ in_menu: true
70
+ url: ../features.en.html
71
+
72
+ There is no need to specify `in_menu` for `newdir` since a page under the directory is in the
73
+ menu. Also be aware that you need to set the language explicitly if a file should only appear in the
74
+ menu for a specific language. Otherwise it appears in every menu. The `url` specifies the file that
75
+ should be shown when clicked on the generated link.
76
+
77
+ A completely "static" menu can be generated by only using virtual directories and files and not
78
+ setting `in_menu` for any other node.
79
+
80
+ ## Examples
81
+
82
+ <table class="examples">
83
+ <tr>
84
+ <th>Usage</th><th>Output</th>
85
+ </tr>
86
+ <tr>
87
+ <td>\{menu: }</td>
88
+ <td>{menu:}</td>
89
+ </tr>
90
+ <tr>
91
+ <td>\{menu: {used_nodes: all}}</td>
92
+ <td>{menu: {used_nodes: all}}</td>
93
+ </tr>
94
+ <tr>
95
+ <td>\{menu: {used_nodes: files}}</td>
96
+ <td>{menu: {used_nodes: files}}</td>
97
+ </tr>
98
+ <tr>
99
+ <td>\{menu: {used_nodes: fragments}}</td>
100
+ <td>{menu: {used_nodes: fragments}}</td>
101
+ </tr>
102
+ <tr>
103
+ <td>\{menu: {used_nodes: all, nested: false}}</td>
104
+ <td>{menu: {used_nodes: all, nested: false}}</td>
105
+ </tr>
106
+ </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>
@@ -0,0 +1,38 @@
1
+ ---
2
+ title: Webgen::Tag::Relocatable
3
+ used_options:
4
+ - tag.relocatable.path
5
+ ---
6
+ ## Description
7
+
8
+ This tag ensures that the relative path to the specified path is always correct.
9
+
10
+ When the tag is used, it changes the directory part of the supplied path name to a relative path to
11
+ the destination and is most often used in template files. A relocatable tag looks like this:
12
+ `\{relocatable: default.css}`. If this was put into a template and the template was used by a file
13
+ in a subdirectory, then the `relocatable` tag would put `../default.css` into the output file; thus
14
+ ensuring that the relative path to file is valid.
15
+
16
+ > You can only use the `relocatable` tag with paths that are handled by webgen. If you want to
17
+ > handle paths that are not normally handled by webgen, create a virtual path for them.
18
+ {.important}
19
+
20
+ If the specified path is an absolute URL (like `http://webgen.rubyforge.org`), it will just return
21
+ it. And if you specify an URL fragment, this fragment has to exist. If you don't want to resolve a
22
+ fragment, just don't specify it in the tag but afterwards!
23
+
24
+ ## Examples
25
+
26
+ <table class="examples">
27
+ <tr>
28
+ <th>Usage</th><th>Output</th>
29
+ </tr>
30
+ <tr>
31
+ <td>\{relocatable: /default.css}</td>
32
+ <td>{relocatable: /default.css}</td>
33
+ </tr>
34
+ <tr>
35
+ <td>\{relocatable: ../}</td>
36
+ <td>{relocatable: ../}</td>
37
+ </tr>
38
+ </table>
@@ -0,0 +1,31 @@
1
+ ---
2
+ title: Webgen::Tag::Sitemap
3
+ used_options:
4
+ - common.sitemap.honor_in_menu
5
+ - common.sitemap.any_lang
6
+ - common.sitemap.used_kinds
7
+ ---
8
+ ## Description
9
+
10
+ This tag is used to display a site map of the current website. The used nodes can be customized by
11
+ setting the above mentioned configuration options accordingly.
12
+
13
+ ## Examples
14
+
15
+ <table class="examples">
16
+ <tr>
17
+ <th>Usage</th><th>Output</th>
18
+ </tr>
19
+ <tr>
20
+ <td>\{sitemap: }</td>
21
+ <td>{sitemap: }</td>
22
+ </tr>
23
+ <tr>
24
+ <td>\{sitemap: {honor_in_menu: true}}</td>
25
+ <td>{sitemap: {honor_in_menu: true}}</td>
26
+ </tr>
27
+ <tr>
28
+ <td>\{sitemap: {honor_in_menu: true, used_kinds: []}}</td>
29
+ <td>{sitemap: {honor_in_menu: true, used_kinds: []}}</td>
30
+ </tr>
31
+ </table>
data/doc/tag/tikz.page ADDED
@@ -0,0 +1,158 @@
1
+ ---
2
+ title: Webgen::Tag::TikZ
3
+ used_options:
4
+ - tag.tikz.path
5
+ - tag.tikz.libraries
6
+ - tag.tikz.opts
7
+ - tag.tikz.resolution
8
+ - tag.tikz.transparent
9
+ - tag.tikz.img_attr
10
+ ---
11
+ ## Description
12
+
13
+ This tag provides support for automatically generating graphics with the fantastic PGF/TikZ library
14
+ for LaTeX. You will need to have a current LaTeX distribution with the PGF/TikZ library installed
15
+ and ImageMagick for this to work. You will also need Ghostscript if you want support for transparent
16
+ PNG images. More exactly, you will need to have the programs `pdflatex` (usually included in the
17
+ LaTeX distribution - for generating a PDF from the LaTeX document that describes the PGF/TikZ
18
+ graphic), `pdfcrop` (usually included in the LaTeX distribution - to crop the generated PDF and
19
+ throw away useless borders), `convert` (provided by ImageMagick - to convert the generated PDF
20
+ document to an image file format and to optionally resize them) and `gs` (provided by the
21
+ Ghostscript package - to generate transparent PNG images).
22
+
23
+ When using this tag, you need to set at least the default mandatory parameter `tag.tikz.path`. This
24
+ path specifies the source path that should be used for generating the image and should not
25
+ exist. The output path is dervied from this path the usual way. The extension used for this
26
+ parameter specifies the final image format that is used (a good choice is PNG). All other parameters
27
+ are optional. The commands for creating the PGF/TikZ picture are specified in the body of the
28
+ tag. Have a look at some of the examples below to set the power of PGF/TikZ.
29
+
30
+ If you want to generate transparent images, you will need to set `tag.tikz.transparent` to `true`
31
+ and specify a `tag.tikz.path` with a `.png` extension.
32
+
33
+ ## Examples
34
+
35
+ These examples are taken (sometimes a little bit altered) from the great PGF Manual included in the
36
+ PGF/TikZ distribution.
37
+
38
+ <table class="examples">
39
+ <tr>
40
+ <th>Usage</th><th>Output</th>
41
+ </tr>
42
+
43
+ <tr>
44
+ <td>
45
+ <pre>
46
+ \{tikz:: house.png}
47
+ \tikz \draw[thick,rounded corners=8pt]
48
+ (0,0) -- (0,2) -- (1,3.25) -- (2,2) -- (2,0) -- (0,2) -- (2,2) -- (0,0) -- (2,0);
49
+ {tikz}
50
+ </pre>
51
+ </td>
52
+ <td>
53
+ {tikz:: house.png}
54
+ \tikz \draw[thick,rounded corners=8pt]
55
+ (0,0) -- (0,2) -- (1,3.25) -- (2,2) -- (2,0) -- (0,2) -- (2,2) -- (0,0) -- (2,0);
56
+ {tikz}
57
+ </td>
58
+ </tr>
59
+
60
+ <tr>
61
+ <td>
62
+ <pre>
63
+ \{tikz:: {path: chain.png, libraries: [arrows,automata,shadows,positioning],
64
+ opts: "->,>=stealth,shorten >=1pt,auto,node distance=2.8cm,on grid,semithick,
65
+ every state/.style={fill=red,draw=none,circular drop shadow,text=white}",
66
+ resolution: 300 72}}
67
+ \node[initial,state] (A) {$q_a$};
68
+ \node[state] (B) [above right=of A] {$q_b$};
69
+ \node[state] (D) [below right=of A] {$q_d$};
70
+ \node[state] (C) [below right=of B] {$q_c$};
71
+ \node[state] (E) [below=of D] {$q_e$};
72
+ \path (A) edge node {0,1,L} (B)
73
+ edge node {1,1,R} (C)
74
+ (B) edge [loop above] node {1,1,L} (B)
75
+ edge node {0,1,L} (C)
76
+ (C) edge node {0,1,L} (D)
77
+ edge [bend left] node {1,0,R} (E)
78
+ (D) edge [loop below] node {1,1,R} (D)
79
+ edge node {0,1,R} (A)
80
+ (E) edge [bend left] node {1,0,R} (A);
81
+ {tikz}
82
+ </pre>
83
+ </td>
84
+ <td>
85
+ {tikz:: {path: chain.png, libraries: [arrows,automata,shadows,positioning],
86
+ opts: "->,>=stealth,shorten >=1pt,auto,node distance=2.8cm,on grid,semithick,
87
+ every state/.style={fill=red,draw=none,circular drop shadow,text=white}"}}
88
+ \node[initial,state] (A) {$q_a$};
89
+ \node[state] (B) [above right=of A] {$q_b$};
90
+ \node[state] (D) [below right=of A] {$q_d$};
91
+ \node[state] (C) [below right=of B] {$q_c$};
92
+ \node[state] (E) [below=of D] {$q_e$};
93
+ \path (A) edge node {0,1,L} (B)
94
+ edge node {1,1,R} (C)
95
+ (B) edge [loop above] node {1,1,L} (B)
96
+ edge node {0,1,L} (C)
97
+ (C) edge node {0,1,L} (D)
98
+ edge [bend left] node {1,0,R} (E)
99
+ (D) edge [loop below] node {1,1,R} (D)
100
+ edge node {0,1,R} (A)
101
+ (E) edge [bend left] node {1,0,R} (A);
102
+ {tikz}
103
+ </td>
104
+ </tr>
105
+
106
+ <tr>
107
+ <td>
108
+ Not transparent and standard res
109
+ <pre>
110
+ \{tikz:: {path: mindmap.png, libraries: [mindmap]}}
111
+ \path[mindmap,concept color=black,text=white]
112
+ node[concept] {Computer Science}
113
+ [clockwise from=0]
114
+ child[concept color=red] { node[concept] {technical} }
115
+ child[concept color=orange] { node[concept] {theoretical} };
116
+ {tikz}
117
+ </pre>
118
+ </td>
119
+ <td>
120
+ {tikz:: {path: mindmap.png, libraries: [mindmap]}}
121
+ \path[mindmap,concept color=black,text=white]
122
+ node[concept] {Computer Science}
123
+ [clockwise from=0]
124
+ child[concept color=red] { node[concept] {technical} }
125
+ child[concept color=orange] { node[concept] {theoretical} };
126
+ {tikz}
127
+ </td>
128
+ </tr>
129
+
130
+ <tr>
131
+ <td>
132
+ Transparent and high res
133
+ <pre>
134
+ \{tikz:: {path: mindmap-low.png, libraries: [mindmap],
135
+ img_attr: {style: 'background:transparent'},
136
+ transparent: true, resolution: 300 72}}
137
+ \path[mindmap,concept color=black,text=white]
138
+ node[concept] {Computer Science}
139
+ [clockwise from=0]
140
+ child[concept color=red] { node[concept] {technical} }
141
+ child[concept color=orange] { node[concept] {theoretical} };
142
+ {tikz}
143
+ </pre>
144
+ </td>
145
+ <td>
146
+ {tikz:: {path: mindmap-high.png, libraries: [mindmap],
147
+ img_attr: {style: 'background:transparent'},
148
+ transparent: true, resolution: 300 72}}
149
+ \path[mindmap,concept color=black,text=white]
150
+ node[concept] {Computer Science}
151
+ [clockwise from=0]
152
+ child[concept color=red] { node[concept] {technical} }
153
+ child[concept color=orange] { node[concept] {theoretical} };
154
+ {tikz}
155
+ </td>
156
+ </tr>
157
+
158
+ </table>
@@ -0,0 +1,139 @@
1
+ ---
2
+ title: Upgrading from 0.4.x
3
+ ---
4
+ # Upgrading
5
+
6
+ Here are step-by-step instructions on how to update your webgen website from 0.4.x to 0.5.x:
7
+
8
+ * **Update the configuration file `config.yaml`**
9
+
10
+ The configuration file syntax as well as the names of the configuration options and some defaults
11
+ changed. For example, the default processing pipeline now uses Maruku (a Markdown converter) as
12
+ markup language processor instead of Textile. You can find an overview over all available
13
+ configuration options in the [configuration option reference]({relocatable:
14
+ reference_configuration.html}). Also have a look at the [configuration file
15
+ documentation]({relocatable: manual.html#website-configfile}) for more information on the syntax
16
+ of this file and the available helpers.
17
+
18
+ * Name changes: All configuration options now use underscores to separate word parts instead of
19
+ camelCase.
20
+ * Syntax changes: The configuration options are not specific to a certain extension anymore. You
21
+ now need the full configuration option name to specify it. So instead of
22
+
23
+ Tag/Menu:
24
+ maxLevels: 4
25
+
26
+ you now use
27
+
28
+ tag.menu.max_levels: 4
29
+
30
+ * **Convert your `metainfo.yaml`**
31
+
32
+ This file is not supported anymore since webgen 0.5.x uses a more flexible way for specifying meta
33
+ information and virtual paths. You need to migrate its data to `metainfo` and `virtual` files in
34
+ the source directory. Have a look at the documentation of the [metainfo source
35
+ handler]({relocatable: sourcehandler/metainfo.html}) and the [virtual source
36
+ handler]({relocatable: sourcehandler/virtual.html}).
37
+
38
+ * **Update meta information names and values**
39
+
40
+ The names of some meta information keys have been changed. Meta information names are not
41
+ specified in camelCase anymore but with under\_scores. You can find a complete list of supported
42
+ meta information names in the [meta information reference]({relocatable:
43
+ reference_metainfo.html}). The most notable changes are:
44
+
45
+ * directoryName → routed\_title
46
+ * inMenu → in\_menu
47
+ * indexFile → index\_path
48
+ * omitIndexPath → omit\_index\_path
49
+ * outputNameStyle → output\_path\_style
50
+ * orderInfo → sort\_info
51
+
52
+ Also be aware that the syntax of some meta information keys has changed. For example, all meta
53
+ information keys that took a source path name, e.g. `index_path`, now take an localized canonical
54
+ name.
55
+
56
+ You need to change the names/value in all places where meta information can be specified:
57
+
58
+ * `metainfo` files
59
+ * `virtual` files
60
+ * page and template files
61
+
62
+ * **Files in [Webgen Page Format]({relocatable: webgen_page_format.html})**
63
+
64
+ Since the format of these files changed a little bit you may need to adapt all your files that use
65
+ it, that are primarily page and template files. The main change in the format was a different use
66
+ of the block start line. Whereas before you would write
67
+
68
+ --- content, textile
69
+
70
+ for specifying the name of the block and its processor, you now can specify any number of
71
+ options. Two options are currently used by webgen: `name` and `pipeline`. So you could change the
72
+ name and the processing pipeline of a block by using a block start line like:
73
+
74
+ --- name:other pipeline:tags,maruku,blocks
75
+
76
+ * **Block inclusion in template/page files**
77
+
78
+ The way how named blocks are included has changed. This feature is now provided by the content
79
+ processor [blocks]({relocatable: contentprocessor/blocks.html}) instead of the tag `block`. This
80
+ allows you to specify the point in the processing pipeline when a block should be included. So you
81
+ definitely need to update your `default.template` file as well as any other page/template file
82
+ where you used the `block` tag.
83
+
84
+ So you need to look for `\{block: content}` tags (where `content` is just a place holder for the
85
+ name of the block that should be included) and replace them with `<webgen:block name='content'
86
+ />`.
87
+
88
+ * **Update tag names and parameters**
89
+
90
+ Since the names of the configuration options changed (from using camelCase to using under\_scores)
91
+ and some tags have different options, you need to change all tag parameters. You may also need to
92
+ convert old tag names to new ones (same reason: camelCase to under\_score), for example,
93
+ `includeFile` is now `include_file`.
94
+
95
+ * **Update your ERB code**
96
+
97
+ If you have any ERB code in your template or page files you will most certainly have to adapt them
98
+ to the new [API]({relocatable: api.html}). One thing that has been used often is the check if a
99
+ page file has a certain block:
100
+
101
+ <%% if node.node_info[:page_data].blocks.has_key?('NAME') %>
102
+ ...
103
+ <%% end %>
104
+
105
+ This needs to be changed into the following:
106
+
107
+ <%% if context.content_node.node_info[:page].blocks.has_key?('NAME') %>
108
+ ...
109
+ <%% end %>
110
+
111
+ * **Extensions development**
112
+
113
+ Since the complete core of webgen has changed you need to rewrite all your plugins for the 0.5.x
114
+ series. Howver, webgen has complete [API documentation]({relocatable: api.html}) now which
115
+ provides you with all needed information as well as examples on how to implement source handlers,
116
+ tags, content processors, ... If you still have any questions, don't hesitate to contact me or
117
+ write a mail to the mailing list!
118
+
119
+ * **Running webgen on the converted website**
120
+
121
+ You now can run webgen 0.5.x on the converted website. This helps in ironing out the remaining
122
+ errors, for example:
123
+
124
+ * If you have forgotten to change a block start line, you will get an application error and the
125
+ name of the file where the error occured.
126
+
127
+ * If you have overlooked changing a tag parameter, you will find `ERROR` and `WARN` lines in the
128
+ log output showing you what still needs to be changed.
129
+
130
+ * **Not Implement Yet**: There are several features of the 0.4.x series which are currently not
131
+ implemented in the 0.5.x series:
132
+
133
+ * source handlers: gallery, sipttra
134
+ * tags: customvar (won't be ported), download, htmlmetainfo, news (won't be ported, superceded
135
+ by blogging support), resource, wikilink
136
+ * misc: smiley replacer, html validators
137
+ * CLI commands: check, show, use
138
+
139
+ If you need any of those you have to wait till they are implemented or port them on your on.