webgen 0.5.17 → 1.0.0.beta1

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 (408) hide show
  1. data/API.rdoc +143 -0
  2. data/AUTHORS +0 -1
  3. data/COPYING +17 -8
  4. data/ChangeLog +4456 -0
  5. data/GPL +623 -289
  6. data/README.md +71 -0
  7. data/Rakefile +87 -99
  8. data/VERSION +1 -1
  9. data/bin/webgen +1 -7
  10. data/data/webgen/basic_website_template/ext/init.rb +15 -0
  11. data/data/webgen/basic_website_template/webgen.config +18 -0
  12. data/data/webgen/bundle_template_files/README.md.erb +24 -0
  13. data/data/webgen/bundle_template_files/Rakefile.erb +36 -0
  14. data/data/webgen/bundle_template_files/info.yaml.erb +16 -0
  15. data/data/webgen/bundle_template_files/init.rb.erb +1 -0
  16. data/data/webgen/passive_sources/default.metainfo +32 -0
  17. data/data/webgen/passive_sources/stylesheets/coderay-default.css +109 -118
  18. data/data/webgen/passive_sources/templates/feed.template +62 -0
  19. data/data/webgen/passive_sources/templates/sitemap.template +3 -6
  20. data/data/webgen/passive_sources/templates/tag.template +42 -0
  21. data/data/webgen/website_bundles/default/README +2 -2
  22. data/lib/webgen/blackboard.rb +15 -51
  23. data/lib/webgen/bundle/built-in-show-changes/init.rb +54 -0
  24. data/lib/webgen/bundle/built-in/init.rb +366 -0
  25. data/lib/webgen/bundle_loader.rb +126 -0
  26. data/lib/webgen/cache.rb +9 -18
  27. data/lib/webgen/cli.rb +131 -58
  28. data/lib/webgen/cli/bundle_command.rb +30 -0
  29. data/lib/webgen/cli/create_bundle_command.rb +46 -0
  30. data/lib/webgen/cli/create_command.rb +48 -60
  31. data/lib/webgen/cli/generate_command.rb +25 -0
  32. data/lib/webgen/cli/install_bundle_command.rb +34 -0
  33. data/lib/webgen/cli/list_bundle_command.rb +108 -0
  34. data/lib/webgen/cli/logger.rb +45 -0
  35. data/lib/webgen/cli/show_command.rb +30 -0
  36. data/lib/webgen/cli/show_config_command.rb +63 -0
  37. data/lib/webgen/cli/show_dependencies_command.rb +103 -0
  38. data/lib/webgen/cli/show_extensions_command.rb +74 -0
  39. data/lib/webgen/cli/utils.rb +68 -95
  40. data/lib/webgen/configuration.rb +143 -105
  41. data/lib/webgen/content_processor.rb +160 -0
  42. data/lib/webgen/content_processor/blocks.rb +96 -0
  43. data/lib/webgen/content_processor/builder.rb +25 -0
  44. data/lib/webgen/content_processor/erb.rb +25 -0
  45. data/lib/webgen/content_processor/erubis.rb +31 -0
  46. data/lib/webgen/content_processor/fragments.rb +82 -0
  47. data/lib/webgen/content_processor/haml.rb +25 -0
  48. data/lib/webgen/content_processor/html_head.rb +157 -0
  49. data/lib/webgen/content_processor/kramdown.rb +49 -0
  50. data/lib/webgen/content_processor/maruku.rb +39 -0
  51. data/lib/webgen/content_processor/r_discount.rb +21 -0
  52. data/lib/webgen/content_processor/rdoc.rb +22 -0
  53. data/lib/webgen/content_processor/redcloth.rb +23 -0
  54. data/lib/webgen/content_processor/ruby.rb +20 -0
  55. data/lib/webgen/content_processor/sass.rb +145 -0
  56. data/lib/webgen/content_processor/scss.rb +23 -0
  57. data/lib/webgen/content_processor/tags.rb +30 -0
  58. data/lib/webgen/content_processor/tidy.rb +32 -0
  59. data/lib/webgen/content_processor/tikz.rb +116 -0
  60. data/lib/webgen/content_processor/xmllint.rb +31 -0
  61. data/lib/webgen/context.rb +57 -29
  62. data/lib/webgen/context/html_head.rb +60 -0
  63. data/lib/webgen/context/nodes.rb +32 -27
  64. data/lib/webgen/context/rendering.rb +39 -0
  65. data/lib/webgen/context/webgen_tags.rb +25 -0
  66. data/lib/webgen/core_ext.rb +25 -0
  67. data/lib/webgen/destination.rb +151 -0
  68. data/lib/webgen/destination/file_system.rb +62 -0
  69. data/lib/webgen/error.rb +59 -49
  70. data/lib/webgen/extension_manager.rb +121 -0
  71. data/lib/webgen/item_tracker.rb +237 -0
  72. data/lib/webgen/item_tracker/file.rb +39 -0
  73. data/lib/webgen/item_tracker/missing_node.rb +61 -0
  74. data/lib/webgen/item_tracker/node_content.rb +40 -0
  75. data/lib/webgen/item_tracker/node_meta_info.rb +53 -0
  76. data/lib/webgen/item_tracker/nodes.rb +92 -0
  77. data/lib/webgen/logger.rb +26 -82
  78. data/lib/webgen/node.rb +122 -367
  79. data/lib/webgen/node_finder.rb +336 -0
  80. data/lib/webgen/page.rb +48 -85
  81. data/lib/webgen/path.rb +218 -156
  82. data/lib/webgen/path_handler.rb +400 -0
  83. data/lib/webgen/path_handler/base.rb +220 -0
  84. data/lib/webgen/path_handler/copy.rb +78 -0
  85. data/lib/webgen/path_handler/directory.rb +21 -0
  86. data/lib/webgen/path_handler/feed.rb +82 -0
  87. data/lib/webgen/path_handler/meta_info.rb +84 -0
  88. data/lib/webgen/path_handler/page.rb +38 -0
  89. data/lib/webgen/path_handler/page_utils.rb +79 -0
  90. data/lib/webgen/path_handler/sitemap.rb +52 -0
  91. data/lib/webgen/path_handler/template.rb +96 -0
  92. data/lib/webgen/path_handler/virtual.rb +85 -0
  93. data/lib/webgen/{webgentask.rb → rake_task.rb} +31 -27
  94. data/lib/webgen/source.rb +106 -24
  95. data/lib/webgen/source/file_system.rb +41 -0
  96. data/lib/webgen/source/stacked.rb +49 -53
  97. data/lib/webgen/source/tar_archive.rb +59 -0
  98. data/lib/webgen/tag.rb +250 -19
  99. data/lib/webgen/tag/breadcrumb_trail.rb +65 -0
  100. data/lib/webgen/tag/coderay.rb +32 -35
  101. data/lib/webgen/tag/date.rb +9 -9
  102. data/lib/webgen/tag/execute_command.rb +31 -0
  103. data/lib/webgen/tag/include_file.rb +32 -0
  104. data/lib/webgen/tag/langbar.rb +31 -47
  105. data/lib/webgen/tag/link.rb +17 -18
  106. data/lib/webgen/tag/menu.rb +27 -189
  107. data/lib/webgen/tag/meta_info.rb +31 -0
  108. data/lib/webgen/tag/relocatable.rb +48 -39
  109. data/lib/webgen/tag/tikz.rb +24 -100
  110. data/lib/webgen/task.rb +99 -0
  111. data/lib/webgen/task/create_bundle.rb +73 -0
  112. data/lib/webgen/task/create_website.rb +94 -0
  113. data/lib/webgen/task/generate_website.rb +47 -0
  114. data/lib/webgen/test_helper.rb +183 -0
  115. data/lib/webgen/tree.rb +95 -46
  116. data/lib/webgen/utils.rb +39 -0
  117. data/lib/webgen/utils/external_command.rb +27 -0
  118. data/lib/webgen/utils/tag_parser.rb +124 -0
  119. data/lib/webgen/version.rb +1 -1
  120. data/lib/webgen/website.rb +134 -296
  121. data/setup.rb +1 -1
  122. data/test/test_documentation.rb +43 -0
  123. data/test/webgen/cli/test_logger.rb +41 -0
  124. data/test/{test_contentprocessor_blocks.rb → webgen/content_processor/test_blocks.rb} +30 -28
  125. data/test/webgen/content_processor/test_builder.rb +25 -0
  126. data/test/webgen/content_processor/test_erb.rb +21 -0
  127. data/test/webgen/content_processor/test_erubis.rb +33 -0
  128. data/test/webgen/content_processor/test_fragments.rb +96 -0
  129. data/test/webgen/content_processor/test_haml.rb +24 -0
  130. data/test/webgen/content_processor/test_html_head.rb +78 -0
  131. data/test/webgen/content_processor/test_kramdown.rb +49 -0
  132. data/test/webgen/content_processor/test_maruku.rb +30 -0
  133. data/test/webgen/content_processor/test_r_discount.rb +18 -0
  134. data/test/webgen/content_processor/test_rdoc.rb +18 -0
  135. data/test/webgen/content_processor/test_redcloth.rb +23 -0
  136. data/test/webgen/content_processor/test_ruby.rb +24 -0
  137. data/test/webgen/content_processor/test_sass.rb +44 -0
  138. data/test/webgen/content_processor/test_scss.rb +23 -0
  139. data/test/webgen/content_processor/test_tags.rb +44 -0
  140. data/test/webgen/content_processor/test_tidy.rb +31 -0
  141. data/test/webgen/content_processor/test_tikz.rb +33 -0
  142. data/test/webgen/content_processor/test_xmllint.rb +32 -0
  143. data/test/webgen/destination/test_file_system.rb +54 -0
  144. data/test/webgen/item_tracker/test_file.rb +31 -0
  145. data/test/webgen/item_tracker/test_missing_node.rb +70 -0
  146. data/test/webgen/item_tracker/test_node_content.rb +42 -0
  147. data/test/webgen/item_tracker/test_node_meta_info.rb +44 -0
  148. data/test/webgen/item_tracker/test_nodes.rb +61 -0
  149. data/test/webgen/path_handler/test_base.rb +153 -0
  150. data/test/webgen/path_handler/test_copy.rb +56 -0
  151. data/test/webgen/path_handler/test_feed.rb +85 -0
  152. data/test/webgen/path_handler/test_meta_info.rb +98 -0
  153. data/test/webgen/path_handler/test_page.rb +25 -0
  154. data/test/webgen/path_handler/test_page_utils.rb +59 -0
  155. data/test/webgen/path_handler/test_sitemap.rb +95 -0
  156. data/test/webgen/path_handler/test_template.rb +64 -0
  157. data/test/webgen/path_handler/test_virtual.rb +87 -0
  158. data/test/webgen/source/test_file_system.rb +51 -0
  159. data/test/webgen/source/test_stacked.rb +35 -0
  160. data/test/{test_source_tararchive.rb → webgen/source/test_tar_archive.rb} +10 -25
  161. data/test/webgen/tag/test_breadcrumb_trail.rb +66 -0
  162. data/test/webgen/tag/test_coderay.rb +34 -0
  163. data/test/webgen/tag/test_date.rb +18 -0
  164. data/test/webgen/tag/test_execute_command.rb +36 -0
  165. data/test/webgen/tag/test_include_file.rb +35 -0
  166. data/test/webgen/tag/test_langbar.rb +50 -0
  167. data/test/webgen/tag/test_link.rb +40 -0
  168. data/test/webgen/tag/test_menu.rb +61 -0
  169. data/test/webgen/tag/test_meta_info.rb +25 -0
  170. data/test/webgen/tag/test_relocatable.rb +50 -0
  171. data/test/webgen/tag/test_tikz.rb +41 -0
  172. data/test/webgen/task/test_create_website.rb +46 -0
  173. data/test/webgen/test_blackboard.rb +31 -0
  174. data/test/webgen/test_bundle_loader.rb +55 -0
  175. data/test/{test_cache.rb → webgen/test_cache.rb} +3 -15
  176. data/test/webgen/test_cli.rb +41 -0
  177. data/test/webgen/test_configuration.rb +131 -0
  178. data/test/webgen/test_content_processor.rb +86 -0
  179. data/test/webgen/test_context.rb +73 -0
  180. data/test/webgen/test_core_ext.rb +20 -0
  181. data/test/webgen/test_destination.rb +48 -0
  182. data/test/webgen/test_error.rb +121 -0
  183. data/test/webgen/test_extension_manager.rb +70 -0
  184. data/test/webgen/test_item_tracker.rb +106 -0
  185. data/test/{test_languages.rb → webgen/test_languages.rb} +4 -4
  186. data/test/webgen/test_logger.rb +46 -0
  187. data/test/webgen/test_node.rb +178 -0
  188. data/test/webgen/test_node_finder.rb +127 -0
  189. data/test/{test_page.rb → webgen/test_page.rb} +44 -48
  190. data/test/webgen/test_path.rb +271 -0
  191. data/test/{test_webgentask.rb → webgen/test_rake_task.rb} +4 -4
  192. data/test/webgen/test_source.rb +59 -0
  193. data/test/webgen/test_tag.rb +137 -0
  194. data/test/webgen/test_task.rb +40 -0
  195. data/test/webgen/test_tree.rb +147 -0
  196. data/test/webgen/test_utils.rb +16 -0
  197. data/test/webgen/test_website.rb +45 -0
  198. data/test/webgen/utils/test_tag_parser.rb +99 -0
  199. metadata +292 -344
  200. data/data/webgen/passive_sources/templates/atom_feed.template +0 -39
  201. data/data/webgen/passive_sources/templates/rss_feed.template +0 -28
  202. data/data/webgen/resources.yaml +0 -4
  203. data/data/webgen/webgui/app.rb +0 -11
  204. data/data/webgen/webgui/controller/main.rb +0 -135
  205. data/data/webgen/webgui/layout/default.xhtml +0 -40
  206. data/data/webgen/webgui/overrides/win32console.rb +0 -0
  207. data/data/webgen/webgui/public/css/jquery.autocomplete.css +0 -50
  208. data/data/webgen/webgui/public/css/ramaze_error.css +0 -90
  209. data/data/webgen/webgui/public/css/style.css +0 -55
  210. data/data/webgen/webgui/public/img/headerbg.jpg +0 -0
  211. data/data/webgen/webgui/public/img/webgen_logo.png +0 -0
  212. data/data/webgen/webgui/public/js/jquery.autocomplete.js +0 -15
  213. data/data/webgen/webgui/public/js/jquery.js +0 -32
  214. data/data/webgen/webgui/start.rb +0 -9
  215. data/data/webgen/webgui/view/create_website.xhtml +0 -14
  216. data/data/webgen/webgui/view/error.xhtml +0 -64
  217. data/data/webgen/webgui/view/index.xhtml +0 -22
  218. data/data/webgen/webgui/view/manage_website.xhtml +0 -18
  219. data/data/webgen/website_skeleton/README +0 -10
  220. data/data/webgen/website_skeleton/Rakefile +0 -69
  221. data/data/webgen/website_skeleton/config.yaml +0 -35
  222. data/data/webgen/website_skeleton/ext/init.rb +0 -10
  223. data/doc/contentprocessor.template +0 -11
  224. data/doc/contentprocessor/blocks.page +0 -129
  225. data/doc/contentprocessor/builder.page +0 -79
  226. data/doc/contentprocessor/erb.page +0 -60
  227. data/doc/contentprocessor/erubis.page +0 -46
  228. data/doc/contentprocessor/fragments.page +0 -26
  229. data/doc/contentprocessor/haml.page +0 -46
  230. data/doc/contentprocessor/head.page +0 -31
  231. data/doc/contentprocessor/kramdown.page +0 -49
  232. data/doc/contentprocessor/less.page +0 -34
  233. data/doc/contentprocessor/maruku.page +0 -44
  234. data/doc/contentprocessor/rdiscount.page +0 -37
  235. data/doc/contentprocessor/rdoc.page +0 -36
  236. data/doc/contentprocessor/redcloth.page +0 -41
  237. data/doc/contentprocessor/sass.page +0 -31
  238. data/doc/contentprocessor/scss.page +0 -39
  239. data/doc/contentprocessor/tags.page +0 -73
  240. data/doc/contentprocessor/tidy.page +0 -14
  241. data/doc/contentprocessor/xmllint.page +0 -14
  242. data/doc/extensions.metainfo +0 -29
  243. data/doc/extensions.page +0 -15
  244. data/doc/extensions.template +0 -17
  245. data/doc/faq.page +0 -222
  246. data/doc/getting_started.page +0 -135
  247. data/doc/index.page +0 -71
  248. data/doc/manual.page +0 -727
  249. data/doc/reference_configuration.page +0 -1254
  250. data/doc/reference_metainfo.page +0 -265
  251. data/doc/reference_website_styles.page +0 -32
  252. data/doc/source/filesystem.page +0 -41
  253. data/doc/source/tararchive.page +0 -40
  254. data/doc/sourcehandler.template +0 -23
  255. data/doc/sourcehandler/copy.page +0 -19
  256. data/doc/sourcehandler/directory.page +0 -27
  257. data/doc/sourcehandler/feed.page +0 -102
  258. data/doc/sourcehandler/metainfo.page +0 -48
  259. data/doc/sourcehandler/page.page +0 -14
  260. data/doc/sourcehandler/sitemap.page +0 -46
  261. data/doc/sourcehandler/template.page +0 -45
  262. data/doc/sourcehandler/virtual.page +0 -49
  263. data/doc/tag.template +0 -25
  264. data/doc/tag/breadcrumbtrail.page +0 -40
  265. data/doc/tag/coderay.page +0 -53
  266. data/doc/tag/date.page +0 -31
  267. data/doc/tag/executecommand.page +0 -26
  268. data/doc/tag/includefile.page +0 -32
  269. data/doc/tag/langbar.page +0 -47
  270. data/doc/tag/link.page +0 -44
  271. data/doc/tag/menu.page +0 -109
  272. data/doc/tag/metainfo.page +0 -29
  273. data/doc/tag/relocatable.page +0 -38
  274. data/doc/tag/sitemap.page +0 -31
  275. data/doc/tag/tikz.page +0 -159
  276. data/doc/upgrading.page +0 -138
  277. data/doc/webgen_page_format.page +0 -129
  278. data/doc/website_styles.metainfo +0 -8
  279. data/lib/webgen/cli/apply_command.rb +0 -66
  280. data/lib/webgen/cli/run_command.rb +0 -22
  281. data/lib/webgen/cli/webgui_command.rb +0 -68
  282. data/lib/webgen/common.rb +0 -27
  283. data/lib/webgen/common/sitemap.rb +0 -83
  284. data/lib/webgen/contentprocessor.rb +0 -117
  285. data/lib/webgen/contentprocessor/blocks.rb +0 -92
  286. data/lib/webgen/contentprocessor/builder.rb +0 -29
  287. data/lib/webgen/contentprocessor/erb.rb +0 -26
  288. data/lib/webgen/contentprocessor/erubis.rb +0 -39
  289. data/lib/webgen/contentprocessor/fragments.rb +0 -25
  290. data/lib/webgen/contentprocessor/haml.rb +0 -34
  291. data/lib/webgen/contentprocessor/head.rb +0 -128
  292. data/lib/webgen/contentprocessor/kramdown.rb +0 -27
  293. data/lib/webgen/contentprocessor/kramdown/html.rb +0 -36
  294. data/lib/webgen/contentprocessor/less.rb +0 -35
  295. data/lib/webgen/contentprocessor/maruku.rb +0 -36
  296. data/lib/webgen/contentprocessor/rdiscount.rb +0 -19
  297. data/lib/webgen/contentprocessor/rdoc.rb +0 -20
  298. data/lib/webgen/contentprocessor/redcloth.rb +0 -21
  299. data/lib/webgen/contentprocessor/sass.rb +0 -22
  300. data/lib/webgen/contentprocessor/scss.rb +0 -22
  301. data/lib/webgen/contentprocessor/tags.rb +0 -170
  302. data/lib/webgen/contentprocessor/tidy.rb +0 -38
  303. data/lib/webgen/contentprocessor/xmllint.rb +0 -37
  304. data/lib/webgen/context/render.rb +0 -32
  305. data/lib/webgen/context/tags.rb +0 -20
  306. data/lib/webgen/coreext.rb +0 -13
  307. data/lib/webgen/default_config.rb +0 -240
  308. data/lib/webgen/loggable.rb +0 -25
  309. data/lib/webgen/output.rb +0 -86
  310. data/lib/webgen/output/filesystem.rb +0 -69
  311. data/lib/webgen/source/filesystem.rb +0 -61
  312. data/lib/webgen/source/resource.rb +0 -45
  313. data/lib/webgen/source/tararchive.rb +0 -78
  314. data/lib/webgen/sourcehandler.rb +0 -275
  315. data/lib/webgen/sourcehandler/base.rb +0 -281
  316. data/lib/webgen/sourcehandler/copy.rb +0 -44
  317. data/lib/webgen/sourcehandler/directory.rb +0 -30
  318. data/lib/webgen/sourcehandler/feed.rb +0 -92
  319. data/lib/webgen/sourcehandler/fragment.rb +0 -70
  320. data/lib/webgen/sourcehandler/memory.rb +0 -42
  321. data/lib/webgen/sourcehandler/metainfo.rb +0 -128
  322. data/lib/webgen/sourcehandler/page.rb +0 -64
  323. data/lib/webgen/sourcehandler/sitemap.rb +0 -60
  324. data/lib/webgen/sourcehandler/template.rb +0 -66
  325. data/lib/webgen/sourcehandler/virtual.rb +0 -117
  326. data/lib/webgen/tag/base.rb +0 -170
  327. data/lib/webgen/tag/breadcrumbtrail.rb +0 -70
  328. data/lib/webgen/tag/executecommand.rb +0 -31
  329. data/lib/webgen/tag/includefile.rb +0 -42
  330. data/lib/webgen/tag/metainfo.rb +0 -27
  331. data/lib/webgen/tag/sitemap.rb +0 -41
  332. data/lib/webgen/websiteaccess.rb +0 -31
  333. data/lib/webgen/websitemanager.rb +0 -125
  334. data/misc/default.css +0 -403
  335. data/misc/default.template +0 -76
  336. data/misc/htmldoc.metainfo +0 -26
  337. data/misc/htmldoc.virtual +0 -17
  338. data/misc/images/arrow.gif +0 -0
  339. data/misc/images/error.png +0 -0
  340. data/misc/images/headerbg.jpg +0 -0
  341. data/misc/images/important.png +0 -0
  342. data/misc/images/information.png +0 -0
  343. data/misc/images/quote.gif +0 -0
  344. data/misc/images/warning.png +0 -0
  345. data/misc/logo.svg +0 -313
  346. data/misc/style.page +0 -33
  347. data/test/helper.rb +0 -61
  348. data/test/test_blackboard.rb +0 -60
  349. data/test/test_cli.rb +0 -119
  350. data/test/test_common_sitemap.rb +0 -58
  351. data/test/test_configuration.rb +0 -68
  352. data/test/test_contentprocessor.rb +0 -39
  353. data/test/test_contentprocessor_builder.rb +0 -41
  354. data/test/test_contentprocessor_erb.rb +0 -33
  355. data/test/test_contentprocessor_erubis.rb +0 -62
  356. data/test/test_contentprocessor_fragments.rb +0 -43
  357. data/test/test_contentprocessor_haml.rb +0 -39
  358. data/test/test_contentprocessor_head.rb +0 -96
  359. data/test/test_contentprocessor_kramdown.rb +0 -56
  360. data/test/test_contentprocessor_less.rb +0 -40
  361. data/test/test_contentprocessor_maruku.rb +0 -33
  362. data/test/test_contentprocessor_rdiscount.rb +0 -21
  363. data/test/test_contentprocessor_rdoc.rb +0 -22
  364. data/test/test_contentprocessor_redcloth.rb +0 -26
  365. data/test/test_contentprocessor_sass.rb +0 -28
  366. data/test/test_contentprocessor_scss.rb +0 -28
  367. data/test/test_contentprocessor_tags.rb +0 -122
  368. data/test/test_contentprocessor_tidy.rb +0 -34
  369. data/test/test_contentprocessor_xmllint.rb +0 -38
  370. data/test/test_context.rb +0 -81
  371. data/test/test_error.rb +0 -93
  372. data/test/test_loggable.rb +0 -32
  373. data/test/test_logger.rb +0 -94
  374. data/test/test_node.rb +0 -469
  375. data/test/test_output_filesystem.rb +0 -60
  376. data/test/test_path.rb +0 -241
  377. data/test/test_source_filesystem.rb +0 -76
  378. data/test/test_source_resource.rb +0 -28
  379. data/test/test_source_stacked.rb +0 -49
  380. data/test/test_sourcehandler_base.rb +0 -136
  381. data/test/test_sourcehandler_copy.rb +0 -47
  382. data/test/test_sourcehandler_directory.rb +0 -38
  383. data/test/test_sourcehandler_feed.rb +0 -88
  384. data/test/test_sourcehandler_fragment.rb +0 -70
  385. data/test/test_sourcehandler_main.rb +0 -39
  386. data/test/test_sourcehandler_memory.rb +0 -44
  387. data/test/test_sourcehandler_metainfo.rb +0 -127
  388. data/test/test_sourcehandler_page.rb +0 -73
  389. data/test/test_sourcehandler_sitemap.rb +0 -68
  390. data/test/test_sourcehandler_template.rb +0 -68
  391. data/test/test_sourcehandler_virtual.rb +0 -106
  392. data/test/test_tag_base.rb +0 -62
  393. data/test/test_tag_breadcrumbtrail.rb +0 -91
  394. data/test/test_tag_coderay.rb +0 -45
  395. data/test/test_tag_date.rb +0 -18
  396. data/test/test_tag_executecommand.rb +0 -41
  397. data/test/test_tag_includefile.rb +0 -50
  398. data/test/test_tag_langbar.rb +0 -71
  399. data/test/test_tag_link.rb +0 -70
  400. data/test/test_tag_menu.rb +0 -207
  401. data/test/test_tag_metainfo.rb +0 -26
  402. data/test/test_tag_relocatable.rb +0 -60
  403. data/test/test_tag_sitemap.rb +0 -47
  404. data/test/test_tag_tikz.rb +0 -69
  405. data/test/test_tree.rb +0 -70
  406. data/test/test_website.rb +0 -130
  407. data/test/test_websiteaccess.rb +0 -25
  408. data/test/test_websitemanager.rb +0 -65
@@ -1,1254 +0,0 @@
1
- ---
2
- title: Configuration Option Reference
3
- in_menu: false
4
- ---
5
- <%
6
- def convert_proc(data, indent)
7
- res = if data.kind_of?(Array)
8
- data.inspect
9
- elsif data.kind_of?(String)
10
- (data.empty? ? '""' : data)
11
- elsif data.kind_of?(Hash)
12
- res = data.collect do |k,v|
13
- if v.kind_of?(Hash)
14
- k.to_s + ":\n" + convert_proc(v, 2)
15
- else
16
- k.to_s + ": " + convert_proc(v, 0)
17
- end
18
- end.join("\n")
19
- (res.empty? ? "{}" : res)
20
- elsif data.kind_of?(NilClass)
21
- "~"
22
- else
23
- data.inspect
24
- end
25
- res.split("\n").collect {|l| ' '*indent + l}.join("\n")
26
- end
27
-
28
- require 'tmpdir'
29
- ws = Webgen::Website.new(File.join(Dir.tmpdir, 'webgen' + Process.pid.to_s))
30
- ws.init
31
- show_default = lambda do |option|
32
- "* Default value:\n\n#{convert_proc(ws.config[option], 10)}\n"
33
- end
34
- %>
35
-
36
- # Configuration Option Reference
37
-
38
- This reference describes all available configurations that can be set via the [configuration
39
- file]({relocatable: manual.html#website-configfile}) `config.yaml` (or, if you want to have more
40
- control, via an extension file).
41
-
42
- The reference is splitted into sections to provide better navigation. A sub header under a category
43
- always specifies the name of a configuration option and after that comes a description and example
44
- code. The example code either shows how to set this option in the configuration file (for most
45
- configuration options) and/or how to use it in a webgen tag (for tag configuration options).
46
-
47
- ## General Options
48
-
49
- * ### website.lang
50
-
51
- Specifies the default language of the website. The default language is assigned, for example, to
52
- page files for which a language is not explicitly specified.
53
-
54
- * Syntax: `LANGUAGE` where `LANGUAGE` is a ISO-639-1/2 two or three letter language code
55
-
56
- <%= show_default['website.lang'] %>
57
-
58
- * Example for setting the option in the configuration file:
59
-
60
- website.lang: de
61
-
62
-
63
- * ### website.link_to_current_page
64
-
65
- If this option is set to `true`, automatically generated links from a page to itself are
66
- used. Otherwise, only the title of the page is shown.
67
-
68
- * Syntax: `BOOLEAN` where `BOOLEAN` is `true` or `false`
69
-
70
- <%= show_default['website.link_to_current_page'] %>
71
-
72
- * Example for setting the option in the configuration file:
73
-
74
- website.link_to_current_page: false
75
-
76
-
77
- * ### website.cache
78
-
79
- Specifies the type and location of the cache. Two types are currently supported: `:file` and
80
- `:string`. The file cache type stores the cache in a file relative to the website directory. The
81
- string cache type stores the cache directly in the second part of the configuration option (this
82
- is only useful when webgen is used as a library).
83
-
84
- * Syntax: `[TYPE, LOCATION]` where `TYPE` is one of `:file` or `:string`
85
-
86
- <%= show_default['website.cache'] %>
87
-
88
- * Example for setting the option in the configuration file:
89
-
90
- website.cache: [:file, my.cache]
91
-
92
-
93
- ## Commonly Used Options
94
-
95
- * ### common.sitemap.honor_in_menu
96
-
97
- Specifies whether the sitemap should only include nodes that have the meta information `in_menu`
98
- set.
99
-
100
- * Syntax: `BOOLEAN` where `BOOLEAN` is either `true` or `false`.
101
-
102
- <%= show_default['common.sitemap.honor_in_menu'] %>
103
-
104
- * Example for setting the option in the configuration file:
105
-
106
- common.sitemap.honor_in_menu: true
107
-
108
- Example for setting the option directly in a tag:
109
-
110
- Sitemap with in-menu nodes: \{sitemap: {honor_in_menu: true}}
111
-
112
-
113
- * ### common.sitemap.any_lang
114
-
115
- Specifies whether the sitemap should include nodes in any language or only those without a
116
- language or with the language of the node in which the sitemap tag is used.
117
-
118
- * Syntax: `BOOLEAN` where `BOOLEAN` is either `true` or `false`.
119
-
120
- <%= show_default['common.sitemap.any_lang'] %>
121
-
122
- * Example for setting the option in the configuration file:
123
-
124
- common.sitemap.any_lang: true
125
-
126
- Example for setting the option directly in a tag:
127
-
128
- Sitemap with nodes in any language: \{sitemap: {any_lang: true}}
129
-
130
-
131
- * ### common.sitemap.used_kinds
132
-
133
- Specifies the kind of nodes that should be used in the sitemap. This defaults to all nodes with
134
- the kind `page`. If this is set to an empty array, any kind of node is used.
135
-
136
- * Syntax: `[KIND, ...]` where `KIND` is the kind of node that should be used.
137
-
138
- <%= show_default['common.sitemap.used_kinds'] %>
139
-
140
- * Example for setting the option in the configuration file:
141
-
142
- common.sitemap.used_kinds: [asset]
143
-
144
- Example for setting the option directly in a tag:
145
-
146
- Sitemap with only asset nodes: \{sitemap: {used_kinds: [asset]}}
147
-
148
-
149
- ## Source and Output Specific Options
150
-
151
- * ### sources
152
-
153
- Specifies one or more sources from which paths are read. This can also be used, for example, to
154
- additionally add other directories as source directories that may or may not be located in the
155
- website directory.
156
-
157
- * Syntax: `[[MOUNT POINT, NAME, ARG1, ARG2, ...], ...]` where `MOUNT POINT` is the path under
158
- which the source should be mounted, `NAME` is the name of the source class (for example,
159
- `Webgen::Source::FileSystem`) and `ARG1`, `ARG2` and so on are the parameters for the source
160
- class. The supported parameters can be found in the documentation for each source class.
161
-
162
- <%= show_default['sources'] %>
163
-
164
- * Example for setting the option in the configuration file:
165
-
166
- sources: [[/, Webgen::Source::FileSystem, src], [/, Webgen::Source::FileSystem, /mnt/pictures, **/*.jpg]]
167
-
168
- Also have a look at the [file system source documentation]({relocatable:
169
- source/filesystem.html}) for more examples!
170
-
171
-
172
- * ### passive_sources
173
-
174
- Specifies one or more sources which are not actively used during the node creation time, ie. no
175
- nodes are created from these sources by default. Instead, they lie dormant until later and are
176
- only used if resolving a path fails. Then it is checked if a passive source for the requested
177
- path exists and if so, a node is created from it. If a node created from a passive source is not
178
- used anymore, it is automatically deleted.
179
-
180
- * Syntax: `[[MOUNT POINT, NAME, ARG1, ARG2, ...], ...]` where `MOUNT POINT` is the path under
181
- which the source should be mounted, `NAME` is the name of the source class (for example,
182
- `Webgen::Source::FileSystem`) and `ARG1`, `ARG2` and so on are the parameters for the source
183
- class. The supported parameters can be found in the documentation for each source class.
184
-
185
- <%= show_default['passive_sources'] %>
186
-
187
- * Example for setting the option in the configuration file:
188
-
189
- passive_sources:
190
- [[/, Webgen::Source::Resource, webgen-passive-sources], [/, Webgen::Source::FileSystem, /mnt/pictures, **/*.jpg]]
191
-
192
-
193
- * ### output
194
-
195
- Specifies the output class that should be used for writing out the generated paths.
196
-
197
- * Syntax: `[NAME, ARG1, ARG2, ...]` where `NAME` is the name of the output class (for example,
198
- `Webgen::Output::FileSystem`) and `ARG1`, `ARG2` and so on are the parameters for the output
199
- class. The supported parameters can be found in the documentation for each output class.
200
-
201
- <%= show_default['output'] %>
202
-
203
- * Example for setting the option in the configuration file:
204
-
205
- output: [Webgen::Output::FileSystem, custom_out]
206
-
207
-
208
- * ### output.do_deletion
209
-
210
- Specifies whether the output class should delete generated paths once the source paths are not
211
- available anymore.
212
-
213
- * Syntax: `BOOLEAN` where `BOOLEAN` is either `true` or `false`.
214
-
215
- <%= show_default['output.do_deletion'] %>
216
-
217
- * Example for setting the option in the configuration file:
218
-
219
- output.do_deletion: true
220
-
221
-
222
- * ### sourcehandler.patterns
223
-
224
- Specifies the path patterns that are used by the individual source handlers. This configuration
225
- option is not normally set directly in the configuration file but either in an extension file
226
- (e.g. `ext/init.rb`) or using a [configuration file helper]({relocatable:
227
- manual.html#website-configfile}) because otherwise the default entries would be overwritten.
228
-
229
- * Syntax: `\{NAME: [PATTERN, PATTERN, ...], ...}` where `NAME` is the
230
- name the name of a source handler and `PATTERN` are one or more path patterns.
231
-
232
- <%= show_default['sourcehandler.patterns'] %>
233
-
234
- * Example for setting the option in `ext/init.rb`:
235
-
236
- config = Webgen::WebsiteAccess.website.config
237
- config['sourcehandler.patterns']['Webgen::SourceHandler::Copy'] << '**/*.swf'
238
-
239
- Example for setting the option via the configuration file helper in the configuration file:
240
-
241
- patterns:
242
- Copy:
243
- add: [**/*.swf]
244
-
245
-
246
- * ### sourcehandler.invoke
247
-
248
- Specifies the invocation order of the various source handlers. This configuration option should
249
- normally only be used by extensions to register their source handlers!
250
-
251
- * Syntax: `\{ORDER: [NAME, ...], ...}` where `ORDER` is a number identifying the priority of the
252
- invocation (source handlers with a lower `ORDER` setting are executed earlier than ones with a
253
- higher `ORDER` setting) and `NAME` is the name of a source handler.
254
-
255
- <%= show_default['sourcehandler.invoke'] %>
256
-
257
- * Example for setting the option in `ext/init.rb`:
258
-
259
- config = Webgen::WebsiteAccess.website.config
260
- config['sourcehandler.invoke'][5] << 'Extension::MyNewSourceHandler'
261
-
262
-
263
- * ### sourcehandler.casefold
264
-
265
- Specifies whether path names should be considered case-sensitive (set to `false`) or
266
- case-insensitive (set to `true`).
267
-
268
- * Syntax: `BOOLEAN` where `BOOLEAN` is either `true` or `false`.
269
-
270
- <%= show_default['sourcehandler.casefold'] %>
271
-
272
- * Example for setting the option in the configuration file:
273
-
274
- sourcehandler.casefold: true
275
-
276
-
277
- * ### sourcehandler.use_hidden_files
278
-
279
- Specifies whether hidden files (those starting with a dot) should be used.
280
-
281
- * Syntax: `BOOLEAN` where `BOOLEAN` is either `true` or `false`.
282
-
283
- <%= show_default['sourcehandler.use_hidden_files'] %>
284
-
285
- * Example for setting the option in the configuration file:
286
-
287
- sourcehandler.use_hidden_files: true
288
-
289
-
290
- * ### sourcehandler.ignore
291
-
292
- Specifies path patterns that should be ignored. All paths that match at least one of the
293
- patterns are never used.
294
-
295
- * Syntax: `[PATTERN, ...]` where `PATTERN` is a valid path pattern.
296
-
297
- <%= show_default['sourcehandler.ignore'] %>
298
-
299
- * Example for setting the option in the configuration file:
300
-
301
- sourcehandler.ignore: [**/*~, **/CVS/**]
302
-
303
-
304
- * ### sourcehandler.default_lang_in_output_path
305
-
306
- Specifies whether output paths in the default language should have the language code in their
307
- name.
308
-
309
- * Syntax: `BOOLEAN` where `BOOLEAN` is either `true` or `false`.
310
-
311
- <%= show_default['sourcehandler.default_lang_in_output_path'] %>
312
-
313
- * Example for setting the option in the configuration file:
314
-
315
- sourcehandler.default_lang_in_output_path: true
316
-
317
-
318
- * ### sourcehandler.default_meta_info
319
-
320
- Specifies default meta information for all source handlers or for specific ones. The
321
- configuration file provides a shortcut for setting meta information items using the special
322
- `default_meta_info` key (see the examples).
323
-
324
- * Syntax: `\{NAME: {MI_KEY: MI_VALUE, ...}, ...}` where `NAME` is either the name of a source
325
- handler or the special key `:all` which sets default meta info for all source handlers.
326
-
327
- <%= show_default['sourcehandler.default_meta_info'] %>
328
-
329
- * Example for setting the option in the configuration file:
330
-
331
- default_meta_info:
332
- :all:
333
- output_path_style: [:parent, :basename, :lang, :ext]
334
- Webgen::SourceHandler::Page:
335
- in_menu: true
336
-
337
-
338
- * ### sourcehandler.template.default_template
339
-
340
- Specifies the name of the default template file of a directory. This template is used as
341
- fallback when no specific template is specified.
342
-
343
- * Syntax: `PATH` where `PATH` is the (absolute) localized canonical name of the default template.
344
-
345
- <%= show_default['sourcehandler.template.default_template'] %>
346
-
347
- * Example for setting the option in the configuration file:
348
-
349
- sourcehandler.template.default_template: other.template
350
-
351
-
352
- ## Content Processor Specific Options
353
-
354
- * ### contentprocessor.map
355
-
356
- This configuration option maps short names for content processor to their class names. The short
357
- names are used, for example, in the processing pipeline of a content block of a file in Webgen
358
- Page Format. This configuration option is normally only used by extensions to register the short
359
- name of a content processor!
360
-
361
- * Syntax: `\{SHORT: NAME, SHORT: [NAME, TYPE], ...}` where `SHORT` is the short name of the
362
- content processor class `NAME`. The second form allows one to additionally specify the type
363
- `TYPE` of the content processor which has to be `:binary` or `:text`. If the first form is
364
- used, then the type defaults to `:text`.
365
-
366
- <%= show_default['contentprocessor.map'] %>
367
-
368
- * Examples for setting the option in `ext/init.rb`:
369
-
370
- config = Webgen::WebsiteAccess.website.config
371
- config['contentprocessor.map']['newcp'] = 'Extension::MyNewContentProcessor'
372
- config['contentprocessor.map']['newcp'] = ['Extension::MyNewContentProcessor', :binary]
373
-
374
-
375
- * ### contentprocessor.erubis.use_pi
376
-
377
- Specifies whether Erubis should look for XML processing instructions or the standard ERB tags
378
- when processing content.
379
-
380
- * Syntax: `BOOLEAN` where `BOOLEAN` is either `true` or `false`.
381
-
382
- <%= show_default['contentprocessor.erubis.use_pi'] %>
383
-
384
- * Example for setting the option in the configuration file:
385
-
386
- contentprocessor.erubis.use_pi: true
387
-
388
-
389
- * ### contentprocessor.erubis.options
390
-
391
- This configuration option can be used to specify additional options that the Erubis processor
392
- should use.
393
-
394
- * Syntax: `\{KEY: VALUE, ...}` where `KEY` and `VALUE` are key-value pairs of options where
395
- `KEY` needs to be a Symbol and not a String.
396
-
397
- <%= show_default['contentprocessor.erubis.options'] %>
398
-
399
- * Example for setting the option in the configuration file:
400
-
401
- contentprocessor.erubis.options: {:trim: true}
402
-
403
-
404
- * ### contentprocessor.kramdown.handle_links
405
-
406
- This configuration option can be used to specify whether all links generated via kramdown syntax
407
- should be automatically run through the [relocatable tag]({relocatable: tag/relocatable.html}).
408
- This saves some typing and makes the document more robust since all links are automatically
409
- checked and warnings displayed if the link target is not found.
410
-
411
- * Syntax: `BOOLEAN` where `BOOLEAN` is either `true` or `false`.
412
-
413
- <%= show_default['contentprocessor.kramdown.handle_links'] %>
414
-
415
- * Example for setting the option in the configuration file:
416
-
417
- contentprocessor.kramdown.handle_links: false
418
-
419
-
420
- * ### contentprocessor.kramdown.options
421
-
422
- This configuration option can be used to specify processing and converting options for
423
- kramdown.
424
-
425
- * Syntax: `\{KEY: VALUE, ...}` where `KEY` and `VALUE` are key-value pairs of kramdown options
426
-
427
- <%= show_default['contentprocessor.kramdown.options'] %>
428
-
429
- * Example for setting the option in the configuration file:
430
-
431
- contentprocessor.kramdown.options: {:auto_ids: false}
432
-
433
-
434
- * ### contentprocessor.redcloth.hard_breaks
435
-
436
- Specifies whether hard breaks (i.e. single newlines) in paragraphs are converted to HTML break
437
- tags.
438
-
439
- * Syntax: `BOOLEAN` where `BOOLEAN` is either `true` or `false`.
440
-
441
- <%= show_default['contentprocessor.redcloth.hard_breaks'] %>
442
-
443
- * Example for setting the option in the configuration file:
444
-
445
- contentprocessor.redcloth.hard_breaks: true
446
-
447
-
448
- * ### contentprocessor.tags.prefix
449
-
450
- Specifies the optional prefix that is used for tag names to avoid name clashes when another
451
- content processor uses similar markup.
452
-
453
- * Syntax: `PREFIX` where `PREFIX` is the prefix name.
454
-
455
- <%= show_default['contentprocessor.tags.prefix'] %>
456
-
457
- * Example for setting the option in the configuration file:
458
-
459
- contentprocessor.tags.prefix: webgen
460
-
461
-
462
- * ### contentprocessor.tags.map
463
-
464
- This configuration option maps short names for tag classes to tag class names. The short names
465
- are used in page and template files to specify the tag. This configuration option is normally
466
- only used by extensions to register the short name of a content processor.
467
-
468
- * Syntax: `\{SHORT: NAME, ...}` where `SHORT` is the short name of the tag class `NAME`.
469
-
470
- <%= show_default['contentprocessor.tags.map'] %>
471
-
472
- * Example for setting the option in `ext/init.rb`:
473
-
474
- config = Webgen::WebsiteAccess.website.config
475
- config['contentprocessor.tags.map']['highlight'] = 'Extension::MyHighlightingTag'
476
-
477
-
478
- * ### contentprocessor.tidy.options
479
-
480
- This configuration option can be used to set the command line options for the `tidy` program
481
- which is used by the [content processor `tidy`]({relocatable: contentprocessor/tidy.html}).
482
-
483
- * Syntax: `STRING` where `STRING` is the string holding the command line options.
484
-
485
- <%= show_default['contentprocessor.tidy.options'] %>
486
-
487
- * Example for setting the option in the configuration file:
488
-
489
- contentprocessor.tidy.options: "-utf8"
490
-
491
-
492
- * ### contentprocessor.xmllint.options
493
-
494
- This configuration option can be used to set the command line options for the `xmllint` program
495
- which is used by the [content processor `xmllint`]({relocatable: contentprocessor/xmllint.html}).
496
-
497
- * Syntax: `STRING` where `STRING` is the string holding the command line options.
498
-
499
- <%= show_default['contentprocessor.xmllint.options'] %>
500
-
501
- * Example for setting the option in the configuration file:
502
-
503
- contentprocessor.xmllint.options: "--catalogs --noout"
504
-
505
-
506
-
507
- ## Tag Specific Options
508
-
509
- These options are not normally set in the configuration file but given directly as options to the
510
- respective tag classes. Therefore, all options described in this section have an example which shows
511
- how to use the option in files in Webgen Page Format and most options also have an example which
512
- shows how to set the option in the configuration file.
513
-
514
- * ### tag.breadcrumbtrail.separator
515
-
516
- Specifies the string that should be used as separator between indivdual parts of the breadcrumb
517
- trail.
518
-
519
- * Syntax: `SEPARATOR` where `SEPARATOR` is a string (special HTML characters need to be properly
520
- escaped)
521
-
522
- <%= show_default['tag.breadcrumbtrail.separator'] %>
523
-
524
- * Example for setting the option in the configuration file:
525
-
526
- tag.breadcrumbtrail.separator: '---'
527
-
528
- Example for setting the option directly in a tag:
529
-
530
- Breadcrumb trail with different separator: \{breadcrumb_trail: {separator: ' --- '}}
531
-
532
-
533
- * ### tag.breadcrumbtrail.omit_index_path
534
-
535
- Specifies that the last part of the breadcrumb trail should be omitted if it is an index path.
536
-
537
- * Syntax: `BOOLEAN` where `BOOLEAN` is either `true` or `false`.
538
-
539
- <%= show_default['tag.breadcrumbtrail.omit_index_path'] %>
540
-
541
- * Example for setting the option in the configuration file:
542
-
543
- tag.breadcrumbtrail.omit_index_path: true
544
-
545
- Example for setting the option directly in a tag:
546
-
547
- Breadcrumb trail with index path omitted: \{breadcrumb_trail: {omit_index_path: true}}
548
-
549
-
550
- * ### tag.breadcrumbtrail.start_level
551
-
552
- Specifies the level at which the breadcrumb trail starts. The default of 0 means to start a the
553
- root directory. Setting this option to 1 starts the breadcrumb trail at the first level. If you
554
- specify negative numbers, then everything is calculated from the end of the trail. Following is
555
- a diagram showing the level numbers for a sample path:
556
-
557
- 0 1 2 3
558
- / dir1 / dir2 / myfile.html
559
- -4 -3 -2 -1
560
-
561
- Be aware that the you need to take the `tag.breadcrumbtrail.omit_index_path` option into
562
- account when specifying the level number.
563
-
564
- * Syntax: `INTEGER` where `INTEGER` is any integer number
565
-
566
- <%= show_default['tag.breadcrumbtrail.start_level'] %>
567
-
568
- * Example for setting the option in the configuration file:
569
-
570
- tag.breadcrumbtrail.start_level: 2
571
-
572
- Example for setting the option directly in a tag:
573
-
574
- Breadcrumb trail starting at level 2: \{breadcrumb_trail: {start_level: 2}}
575
-
576
-
577
- * ### tag.breadcrumbtrail.end_level
578
-
579
- Specifies the level at which the breadcrumb trail ends. Have a look at the documentation for
580
- `tag.breadcrumbtrail.start_level` for more information on the useable level numbers.
581
-
582
- * Syntax: `INTEGER` where `INTEGER` is any integer number
583
-
584
- <%= show_default['tag.breadcrumbtrail.end_level'] %>
585
-
586
- * Example for setting the option in the configuration file:
587
-
588
- tag.breadcrumbtrail.end_level: 2
589
-
590
- Example for setting the option directly in a tag:
591
-
592
- Breadcrumb trail ending at level 2: \{breadcrumb_trail: {end_level: 2}}
593
-
594
-
595
- * ### tag.coderay.lang
596
-
597
- Specifies the language that should be used for syntax highlighting.
598
-
599
- * Syntax: `LANG` where `LANG` is one of <%= (require 'coderay'; CodeRay::Scanners.list.map {|n| '`' + n + '`'}.join(', ')) %>.
600
-
601
- <%= show_default['tag.coderay.lang'] %>
602
-
603
- * Example for setting the option in the configuration file:
604
-
605
- tag.coderay.lang: ruby
606
-
607
- Example for setting the option directly in a tag:
608
-
609
- highlighting some ruby code \{coderay:: ruby}puts 5 + 5{coderay}
610
-
611
-
612
- * ### tag.coderay.process_body
613
-
614
- Specifies whether the body of the tag should be processed by the tags content processor first.
615
-
616
- * Syntax: `BOOLEAN` where `BOOLEAN` is either `true` or `false`.
617
-
618
- <%= show_default['tag.coderay.process_body'] %>
619
-
620
- * Example for setting the option in the configuration file:
621
-
622
- tag.coderay.process_body: false
623
-
624
- Example for setting the option directly in a tag:
625
-
626
- wrapping in a span: \{coderay:: {lang: ruby, process_body: false}}puts 5 + 5{coderay}
627
-
628
-
629
- * ### tag.coderay.wrap
630
-
631
- Specifies in which HTML element the highlighted code should be wrapped.
632
-
633
- * Syntax: `WRAP` where `WRAP` is either `:div` or `:span`
634
-
635
- <%= show_default['tag.coderay.wrap'] %>
636
-
637
- * Example for setting the option in the configuration file:
638
-
639
- tag.coderay.wrap: span
640
-
641
- Example for setting the option directly in a tag:
642
-
643
- wrapping in a span: \{coderay:: {lang: ruby, wrap: span}}puts 5 + 5{coderay}
644
-
645
-
646
- * ### tag.coderay.line_numbers
647
-
648
- Specifies whether line numbers should be shown.
649
-
650
- * Syntax: `BOOLEAN` where `BOOLEAN` is either `true` or `false`.
651
-
652
- <%= show_default['tag.coderay.line_numbers'] %>
653
-
654
- * Example for setting the option in the configuration file:
655
-
656
- tag.coderay.line_numbers: false
657
-
658
- Example for setting the option directly in a tag:
659
-
660
- not showing line numbers: \{coderay:: {lang: ruby, line_numbers: false}}puts 5 + 5{coderay}
661
-
662
-
663
- * ### tag.coderay.line_number_start
664
-
665
- Specifies the line number that should be used for the first line.
666
-
667
- * Syntax: `NUMBER` where `NUMBER` is an integer value.
668
-
669
- <%= show_default['tag.coderay.line_number_start'] %>
670
-
671
- * Example for setting the option in the configuration file:
672
-
673
- tag.coderay.line_number_start: 4
674
-
675
- Example for setting the option directly in a tag:
676
-
677
- starting with line 4: \{coderay:: {lang: ruby, line_number_start: 4}}puts 5 + 5{coderay}
678
-
679
-
680
- * ### tag.coderay.bold_every
681
-
682
- Specifies the interval at which the line numbers should appear bold.
683
-
684
- * Syntax: `NUMBER` where `NUMBER` is an integer value.
685
-
686
- <%= show_default['tag.coderay.bold_every'] %>
687
-
688
- * Example for setting the option in the configuration file:
689
-
690
- tag.coderay.bold_every: 2
691
-
692
- Example for setting the option directly in a tag:
693
-
694
- every other line bold: \{coderay:: {lang: ruby, bold_every: 2}}puts 5 + 5{coderay}
695
-
696
-
697
- * ### tag.coderay.tab_width
698
-
699
- Specifies the number of spaces that should be used to replace tabulator characters.
700
-
701
- * Syntax: `NUMBER` where `NUMBER` is an integer value.
702
-
703
- <%= show_default['tag.coderay.tab_width'] %>
704
-
705
- * Example for setting the option in the configuration file:
706
-
707
- tag.coderay.tab_width: 4
708
-
709
- Example for setting the option directly in a tag:
710
-
711
- tabulator == 4 spaces: \{coderay:: {lang: ruby, tab_width: 4}}puts 5 + 5{coderay}
712
-
713
-
714
- * ### tag.coderay.css
715
-
716
- Specifies how the highlighted code should be styled.
717
-
718
- If set to `style`, the CSS style attributes are set directly on the various HTML elements.
719
-
720
- If set to `class`, only classes are set on the HTML elements and a default external stylesheet
721
- is used - the [content processor head]({relocatable: contentprocessor/head.html}) is needed for
722
- this to work.
723
-
724
- If set to `other`, only classes are set like with the `class` value but no default external
725
- stylesheet is used. You have to provide the styles yourself.
726
-
727
- * Syntax: `STYLE` where `STYLE` is either `style`, `css` or `other`.
728
-
729
- <%= show_default['tag.coderay.css'] %>
730
-
731
- * Example for setting the option in the configuration file:
732
-
733
- tag.coderay.css: style
734
-
735
- Example for setting the option directly in a tag:
736
-
737
- with external stylesheet: \{coderay:: {lang: ruby, css: class}}puts 5 + 5{coderay}
738
-
739
-
740
- * ### tag.date.format
741
-
742
- Specifies the format that should be used for formatting the current date. The format string
743
- needs to be in a format supported by Ruby's method
744
- [Time#strftime](http://www.ruby-doc.org/core/classes/Time.html).
745
-
746
- * Syntax: `FORMAT` where `FORMAT` is a string.
747
-
748
- <%= show_default['tag.date.format'] %>
749
-
750
- * Example for setting the option in the configuration file:
751
-
752
- tag.date.format: '%Y-%m-%d'
753
-
754
- Example for setting the option directly in a tag:
755
-
756
- very short date format: \{date: {format: '%Y-%m-%d'}}
757
-
758
-
759
- * ### tag.executecommand.command
760
-
761
- Specifies the command that should be executed. This option is the default mandatory option for
762
- Webgen::Tag::ExecuteCommand.
763
-
764
- * Syntax: `COMMAND` where `COMMAND` is the to-be-executed command.
765
-
766
- <%= show_default['tag.executecommand.command'] %>
767
-
768
- * Example for setting the option directly in a tag:
769
-
770
- executing a simple command \{exeucte_cmd: echo hallo}
771
-
772
-
773
- * ### tag.executecommand.process_output
774
-
775
- Specifies whether the output of the executed command should be further processed by the tags
776
- content processor.
777
-
778
- * Syntax: `BOOLEAN` where `BOOLEAN` is either `true` or `false`.
779
-
780
- <%= show_default['tag.executecommand.process_output'] %>
781
-
782
- * Example for setting the option in the configuration file:
783
-
784
- tag.executecommand.process_output: false
785
-
786
- Example for setting the option directly in a tag:
787
-
788
- executing command without further processing \{execute_cmd: {command: 'echo hallo', process_output: false}}
789
-
790
-
791
- * ### tag.executecommand.escape_html
792
-
793
- Specifies whether special HTML characters in the output of the executed command should be escaped.
794
-
795
- * Syntax: `BOOLEAN` where `BOOLEAN` is either `true` or `false`.
796
-
797
- <%= show_default['tag.executecommand.escape_html'] %>
798
-
799
- * Example for setting the option in the configuration file:
800
-
801
- tag.executecommand.escape_html: false
802
-
803
- Example for setting the option directly in a tag:
804
-
805
- executing command, output not escaped \{execute_cmd: {command: 'echo hallo', escape_html: false}}
806
-
807
-
808
- * ### tag.includefile.filename
809
-
810
- Specifies the name of the file that should be included. The filename needs to be relative to the
811
- website directory or an absolute path. This option is the default mandatory option for
812
- Webgen::Tag::IncludeFile.
813
-
814
- * Syntax: `FILENAME` where `FILENAME` is the name of a file
815
-
816
- <%= show_default['tag.includefile.filename'] %>
817
-
818
- * Example for setting the option directly in a tag:
819
-
820
- including a file \{include_file: my_file.txt}
821
-
822
-
823
- * ### tag.includefile.process_output
824
-
825
- Specifies whether the content of the file should be further processed by the tags content
826
- processor.
827
-
828
- * Syntax: `BOOLEAN` where `BOOLEAN` is either `true` or `false`.
829
-
830
- <%= show_default['tag.includefile.process_output'] %>
831
-
832
- * Example for setting the option in the configuration file:
833
-
834
- tag.includefile.process_output: false
835
-
836
- Example for setting the option directly in a tag:
837
-
838
- including a file without further processing \{include_file: {filename: my_file.txt, process_output: false}}
839
-
840
-
841
- * ### tag.includefile.escape_html
842
-
843
- Specifies whether special HTML characters in the content of the file should be escaped.
844
-
845
- * Syntax: `BOOLEAN` where `BOOLEAN` is either `true` or `false`.
846
-
847
- <%= show_default['tag.includefile.escape_html'] %>
848
-
849
- * Example for setting the option in the configuration file:
850
-
851
- tag.includefile.escape_html: false
852
-
853
- Example for setting the option directly in a tag:
854
-
855
- including a file without escaping \{include_file: {filename: my_file.txt, escape_html: false}}
856
-
857
-
858
- * ### tag.langbar.separator
859
-
860
- Specifies the string that should be used as separator between the individual language parts.
861
-
862
- * Syntax: `SEPARATOR` where `SEPARATOR` is a string (special HTML characters need to be properly
863
- escaped)
864
-
865
- <%= show_default['tag.langbar.separator'] %>
866
-
867
- * Example for setting the option in the configuration file:
868
-
869
- tag.langbar.separator: ' --- '
870
-
871
- Example for setting the option directly in a tag:
872
-
873
- Langbar with another separator: \{langbar: {separator: ' --- '}}
874
-
875
-
876
- * ### tag.langbar.show_own_lang
877
-
878
- Specifies whether the link to the language of the current page should be displayed.
879
-
880
- * Syntax: `BOOLEAN` where `BOOLEAN` is either `true` or `false`.
881
-
882
- <%= show_default['tag.langbar.show_own_lang'] %>
883
-
884
- * Example for setting the option in the configuration file:
885
-
886
- tag.langbar.show_own_lang: false
887
-
888
- Example for setting the option directly in a tag:
889
-
890
- Langbar with current page's lang not shown: \{langbar: {show_own_lang: false}}
891
-
892
-
893
- * ### tag.langbar.show_single_lang
894
-
895
- Specifies whether the list should be displayed even if there are no translations of the page
896
- (i.e. when there is only one page).
897
-
898
- * Syntax: `BOOLEAN` where `BOOLEAN` is either `true` or `false`.
899
-
900
- <%= show_default['tag.langbar.show_single_lang'] %>
901
-
902
- * Example for setting the option in the configuration file:
903
-
904
- tag.langbar.show_single_lang: false
905
-
906
- Example for setting the option directly in a tag:
907
-
908
- Langbar with single language not shown: \{langbar: {show_single_lang: false}}
909
-
910
-
911
- * ### tag.langbar.lang_names
912
-
913
- This configuration option can be used to specify the language names that should be displayed
914
- instead of the language codes.
915
-
916
- * Syntax: `\{CODE: NAME, ...}` where `CODE` is a language code and `NAME` the associated language
917
- name of the code.
918
-
919
- <%= show_default['tag.langbar.lang_names'] %>
920
-
921
- * Example for setting the option in the configuration file:
922
-
923
- tag.langbar.lang_names: \{de: Deutsch, en: English}
924
-
925
- Example for setting the option directly in a tag:
926
-
927
- Langbar with custom language names: \{langbar: {lang_names: {de: Deutsch, en: English}}}
928
-
929
-
930
- * ### tag.link.path
931
-
932
- The default mandatory configuration option for Tag::Link that specifies the (AL)CN path to which
933
- should be linked.
934
-
935
- * Syntax: `PATH` where `PATH` is an (absolute) (localized) canonical name.
936
-
937
- <%= show_default['tag.link.path'] %>
938
-
939
- * Example for setting the option directly in a tag:
940
-
941
- You will find more information on the \{link: docu.html} page!
942
-
943
-
944
- * ### tag.link.attr
945
-
946
- Specifies additional HTML attributes that should be set on the link generated by Tag::Link.
947
-
948
- * Syntax: `\{NAME: VALUE, ...}` where `NAME` is a valid HTML attribute name and `VALUE` its
949
- value.
950
-
951
- <%= show_default['tag.link.attr'] %>
952
-
953
- * Example for setting the option in the configuration file:
954
-
955
- tag.link.attr: \{title: DocuPage}
956
-
957
- Example for setting the option directly in a tag:
958
-
959
- You will find more info on the \{link: {path: docu.html, attr: {title: DocuPage}}} page!
960
-
961
-
962
- * ### tag.metainfo.escape_html
963
-
964
- Specifies whether special HTML characters in the meta information value should be escaped.
965
-
966
- * Syntax: `BOOLEAN` where `BOOLEAN` is either `true` or `false`.
967
-
968
- <%= show_default['tag.metainfo.escape_html'] %>
969
-
970
- * Example for setting the option in the configuration file:
971
-
972
- tag.metainfo.escape_html: false
973
-
974
- Example for setting the option directly in a tag:
975
-
976
- value of meta info `title` is not escaped \{title: {escape_html: false}}
977
-
978
-
979
- * ### tag.menu.used_nodes
980
-
981
- Specifies the type of nodes that should be used for menu generation. If `all` is specified then
982
- all available menu nodes are used, if `files` is specified then only menu nodes that represent
983
- files or directories are used and if `fragments` is specified then only the fragment nodes of
984
- the displayed file are used.
985
-
986
- * Syntax: `TYPE` where `TYPE` is one of `all`, `files` or `fragments`
987
-
988
- <%= show_default['tag.menu.used_nodes'] %>
989
-
990
- * Example for setting the option in the configuration file:
991
-
992
- tag.menu.used_nodes: fragments
993
-
994
- Example for setting the option directly in a tag:
995
-
996
- Show the fragment node menu: \{menu: {used_nodes: fragments}}
997
-
998
-
999
- * ### tag.menu.start_level
1000
-
1001
- Specifies the start level for the menu. All nodes with a lower level than this number are not
1002
- shown in the menu.
1003
-
1004
- * Syntax: `LEVEL` where `LEVEL` is a number that is greater or equal to one.
1005
-
1006
- <%= show_default['tag.menu.start_level'] %>
1007
-
1008
- * Example for setting the option in the configuration file:
1009
-
1010
- tag.menu.start_level: 2
1011
-
1012
- Example for setting the option directly in a tag:
1013
-
1014
- Menu starting at level 2: \{menu: {start_level: 2}}
1015
-
1016
-
1017
- * ### tag.menu.min_levels
1018
-
1019
- Specifies the minimum number of levels that should always be shown. For example, if this is set
1020
- to `2` then two menu levels are always shown.
1021
-
1022
- * Syntax: `LEVEL` where `LEVEL` is a number that is greater or equal to one.
1023
-
1024
- <%= show_default['tag.menu.min_levels'] %>
1025
-
1026
- * Example for setting the option in the configuration file:
1027
-
1028
- tag.menu.min_levels: 2
1029
-
1030
- Example for setting the option directly in a tag:
1031
-
1032
- Menu that always shows at least 2 levels : \{menu: {min_levels: 2}}
1033
-
1034
-
1035
- * ### tag.menu.max_levels
1036
-
1037
- Specifies the maximum number of levels that should be shown even if there would be more. For
1038
- example, if this is set to `2` then there are only shown at most two menu levels.
1039
-
1040
- * Syntax: `LEVEL` where `LEVEL` is a number that is greater or equal to one.
1041
-
1042
- <%= show_default['tag.menu.max_levels'] %>
1043
-
1044
- * Example for setting the option in the configuration file:
1045
-
1046
- tag.menu.max_levels: 2
1047
-
1048
- Example for setting the option directly in a tag:
1049
-
1050
- Menu that always shows at most 2 levels : \{menu: {max_levels: 2}}
1051
-
1052
-
1053
- * ### tag.menu.show_current_subtree_only
1054
-
1055
- Specifies whether only the current subtree (ie. the subtree in which the node is that is
1056
- displayed) should be shown in the menu or all subtrees. This option takes effect when there are
1057
- at least two menu levels visible.
1058
-
1059
- * Syntax: `BOOLEAN` where `BOOLEAN` is either `true` or `false`.
1060
-
1061
- <%= show_default['tag.menu.show_current_subtree_only'] %>
1062
-
1063
- * Example for setting the option in the configuration file:
1064
-
1065
- tag.menu.show_current_subtree_only: false
1066
-
1067
- Example for setting the option directly in a tag:
1068
-
1069
- Showing all subtrees: \{menu: {show_current_subtree_only: false}}
1070
-
1071
-
1072
- * ### tag.menu.nested
1073
-
1074
- Specifies whether the generated menu should contain nested lists, ie. whether sub menus are
1075
- put inline
1076
-
1077
- ul 1
1078
- li 2
1079
- ul 3
1080
- li 4
1081
- li 5
1082
- li 6
1083
-
1084
- or separately following the previous menu level
1085
-
1086
- ul 1
1087
- li 2
1088
- li 6
1089
- ul 3
1090
- li 4
1091
- li 5
1092
-
1093
- > When this option is enabled you should enable the option
1094
- > `tag.menu.show_current_subtree_only`. Otherwise the generated menu will look a little bit
1095
- > confusing.
1096
- {.information}
1097
-
1098
- * Syntax: `BOOLEAN` where `BOOLEAN` is either `true` or `false`.
1099
-
1100
- <%= show_default['tag.menu.nested'] %>
1101
-
1102
- * Example for setting the option in the configuration file:
1103
-
1104
- tag.menu.nested: false
1105
-
1106
- Example for setting the option directly in a tag:
1107
-
1108
- Don't use nested lists: \{menu: {nested: false}}
1109
-
1110
-
1111
- * ### tag.relocatable.path
1112
-
1113
- The default mandatory configuration option for Tag::Relocatable that specifies the path that
1114
- should be made relocatable.
1115
-
1116
- * Syntax: `PATH` where `PATH` is a (localized) canonical name.
1117
-
1118
- <%= show_default['tag.relocatable.path'] %>
1119
-
1120
- * Example for setting the option directly in a tag:
1121
-
1122
- <a href="\{relocatable: ../features.html}">Some Path</a>
1123
-
1124
-
1125
- * ### tag.tikz.path
1126
-
1127
- The default mandatory configuration option for Tag::TikZ that specifies the (naturally
1128
- non-existing) source path that should be used for creating the TikZ image. The output path is
1129
- derived from this path the usual way. You shouldn't use a path that does already exist!
1130
-
1131
- * Syntax: `PATH` where `PATH` is a relative or absolute source path.
1132
-
1133
- <%= show_default['tag.tikz.path'] %>
1134
-
1135
- * Example for setting the option directly in a tag:
1136
-
1137
- \{tikz:: images/tikz.png}\tikz \draw (0,0) -- (0,2);{tikz}
1138
-
1139
-
1140
- * ### tag.tikz.libraries
1141
-
1142
- Specifies the names of additional TikZ library names that should be used when creating the
1143
- image.
1144
-
1145
- * Syntax: `[NAME, ...]` where `NAME` is the name of a TikZ library.
1146
-
1147
- <%= show_default['tag.tikz.libraries'] %>
1148
-
1149
- * Example for setting the option in the configuration file:
1150
-
1151
- tag.tikz.libraries: [mindmap, arrows]
1152
-
1153
- Example for setting the option directly in a tag:
1154
-
1155
- \{tikz:: {path: images/tikz.png, libraries: [mindmap, arrows]}}
1156
- \tikz \draw (0,0) -- (0,2) -- (2,2);
1157
- {tikz}
1158
-
1159
-
1160
- * ### tag.tikz.opts
1161
-
1162
- Specifies additional global options for the `tikzpicture` environment.
1163
-
1164
- * Syntax: `OPTS` where `OPTS` is the string with the global options.
1165
-
1166
- <%= show_default['tag.tikz.opts'] %>
1167
-
1168
- * Example for setting the option in the configuration file:
1169
-
1170
- tag.tikz.opts: 'scale=3, line cap=round'
1171
-
1172
- Example for setting the option directly in a tag:
1173
-
1174
- \{tikz:: {path: images/tikz.png, opts: 'scale=3, line cap=round'}}
1175
- \tikz \draw (0,0) -- (0,2) -- (2,2);
1176
- {tikz}
1177
-
1178
-
1179
- * ### tag.tikz.resolution
1180
-
1181
- Specifies the render and output resolutions that should be used to convert the TikZ image in PDF
1182
- format to the chosen image format. The first number specifies the render resolution and the
1183
- second one the output resolution. If the render resolution is higher than the output resolution,
1184
- the final image quality is better but the image needs to be scaled down to the output resolution.
1185
-
1186
- * Syntax: `RENDER_RES OUTPUT_RES` where `RENDER_RES` is the integer specifying the render
1187
- resolution and `OUTPUT_RES` is the integer specifying the output resolution.
1188
-
1189
- <%= show_default['tag.tikz.resolution'] %>
1190
-
1191
- * Example for setting the option in the configuration file:
1192
-
1193
- tag.tikz.resolution: 300 72
1194
-
1195
- Example for setting the option directly in a tag:
1196
-
1197
- \{tikz:: {path: images/tikz.png, resolution: 300 72}}
1198
- \tikz \draw (0,0) -- (0,2) -- (2,2);
1199
- {tikz}
1200
-
1201
-
1202
- * ### tag.tikz.transparent
1203
-
1204
- Specifies whether the generated image should be transparent. This only works when the path
1205
- specified by `tag.tikz.path` option has the extension `.png`! You should probably also set the
1206
- background of the generated image tag to transparent.
1207
-
1208
- * Syntax: `BOOLEAN` where `BOOLEAN` is either `true` or `false`.
1209
-
1210
- <%= show_default['tag.tikz.transparent'] %>
1211
-
1212
- * Example for setting the option in the configuration file:
1213
-
1214
- tag.tikz.transparent: true
1215
-
1216
- Example for setting the option directly in a tag:
1217
-
1218
- \{tikz:: {path: images/tikz.png, transparent: true}}
1219
- \tikz \draw (0,0) -- (0,2) -- (2,2);
1220
- {tikz}
1221
-
1222
-
1223
- * ### tag.tikz.img_attr
1224
-
1225
- Specifies additional HTML attributes that should be set on the generated `img` tag.
1226
-
1227
- * Syntax: `\{KEY:VALUE, ...}` where `KEY` is a valid HTML `img` tag attribute name and `VALUE`
1228
- the to-be-set value.
1229
-
1230
- <%= show_default['tag.tikz.img_attr'] %>
1231
-
1232
- * Example for setting the option in the configuration file:
1233
-
1234
- tag.tikz.img_attr: \{alt: Some TikZ picture}
1235
-
1236
- Example for setting the option directly in a tag:
1237
-
1238
- \{tikz:: {path: images/tikz.png, img_attr: {alt: Some TikZ picture}}}
1239
- \tikz \draw (0,0) -- (0,2) -- (2,2);
1240
- {tikz}
1241
-
1242
- ---
1243
-
1244
- ## Miscelleanous Configuration Options
1245
-
1246
- * ### resources
1247
-
1248
- A map from resource names to resource identifiers. Should only be used by extensions and not be
1249
- set in the configuration file.
1250
-
1251
- * Syntax: `NAME` TODO
1252
-
1253
- # All things regarding logging
1254
- config.logger.mask(nil, :doc => 'Only show logging events which match the regexp mask')