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.
- data/AUTHORS +8 -0
- data/COPYING +10 -0
- data/GPL +340 -0
- data/Rakefile +334 -0
- data/THANKS +18 -0
- data/bin/webgen +12 -0
- data/data/webgen/resources.yaml +3 -0
- data/data/webgen/webgui/controller/main.rb +135 -0
- data/data/webgen/webgui/overrides/win32console.rb +0 -0
- data/data/webgen/webgui/public/css/jquery.autocomplete.css +50 -0
- data/data/webgen/webgui/public/css/ramaze_error.css +90 -0
- data/data/webgen/webgui/public/css/style.css +55 -0
- data/data/webgen/webgui/public/img/headerbg.jpg +0 -0
- data/data/webgen/webgui/public/img/webgen_logo.png +0 -0
- data/data/webgen/webgui/public/js/jquery.autocomplete.js +15 -0
- data/data/webgen/webgui/public/js/jquery.js +32 -0
- data/data/webgen/webgui/view/create_website.xhtml +22 -0
- data/data/webgen/webgui/view/error.xhtml +64 -0
- data/data/webgen/webgui/view/index.xhtml +22 -0
- data/data/webgen/webgui/view/manage_website.xhtml +18 -0
- data/data/webgen/webgui/view/page.xhtml +40 -0
- data/data/webgen/website_skeleton/README +10 -0
- data/data/webgen/website_skeleton/Rakefile +40 -0
- data/data/webgen/website_skeleton/config.yaml +17 -0
- data/data/webgen/website_skeleton/ext/init.rb +10 -0
- data/data/webgen/website_styles/1024px/README +13 -0
- data/data/webgen/website_styles/1024px/src/default.css +188 -0
- data/data/webgen/website_styles/1024px/src/default.template +60 -0
- data/data/webgen/website_styles/1024px/src/images/background.gif +0 -0
- data/data/webgen/website_styles/andreas00/README +13 -0
- data/data/webgen/website_styles/andreas00/src/default.css +290 -0
- data/data/webgen/website_styles/andreas00/src/default.template +60 -0
- data/data/webgen/website_styles/andreas00/src/images/bg.gif +0 -0
- data/data/webgen/website_styles/andreas00/src/images/front.jpg +0 -0
- data/data/webgen/website_styles/andreas00/src/images/menubg.gif +0 -0
- data/data/webgen/website_styles/andreas00/src/images/menubg2.gif +0 -0
- data/data/webgen/website_styles/andreas01/README +14 -0
- data/data/webgen/website_styles/andreas01/src/default.css +310 -0
- data/data/webgen/website_styles/andreas01/src/default.template +62 -0
- data/data/webgen/website_styles/andreas01/src/images/bg.gif +0 -0
- data/data/webgen/website_styles/andreas01/src/images/front.jpg +0 -0
- data/data/webgen/website_styles/andreas01/src/print.css +35 -0
- data/data/webgen/website_styles/andreas03/README +14 -0
- data/data/webgen/website_styles/andreas03/src/default.css +223 -0
- data/data/webgen/website_styles/andreas03/src/default.template +58 -0
- data/data/webgen/website_styles/andreas03/src/images/bodybg.png +0 -0
- data/data/webgen/website_styles/andreas03/src/images/contbg.png +0 -0
- data/data/webgen/website_styles/andreas03/src/images/footerbg.png +0 -0
- data/data/webgen/website_styles/andreas03/src/images/gradient1.png +0 -0
- data/data/webgen/website_styles/andreas03/src/images/gradient2.png +0 -0
- data/data/webgen/website_styles/andreas04/README +15 -0
- data/data/webgen/website_styles/andreas04/src/default.css +290 -0
- data/data/webgen/website_styles/andreas04/src/default.template +81 -0
- data/data/webgen/website_styles/andreas04/src/images/blinkarrow.gif +0 -0
- data/data/webgen/website_styles/andreas04/src/images/bodybg.png +0 -0
- data/data/webgen/website_styles/andreas04/src/images/contentbg.png +0 -0
- data/data/webgen/website_styles/andreas04/src/images/entrybg.png +0 -0
- data/data/webgen/website_styles/andreas04/src/images/flash.gif +0 -0
- data/data/webgen/website_styles/andreas04/src/images/flash2.gif +0 -0
- data/data/webgen/website_styles/andreas04/src/images/globe.gif +0 -0
- data/data/webgen/website_styles/andreas04/src/images/globebottom.gif +0 -0
- data/data/webgen/website_styles/andreas04/src/images/linkarrow.gif +0 -0
- data/data/webgen/website_styles/andreas04/src/images/menuhover.png +0 -0
- data/data/webgen/website_styles/andreas05/README +14 -0
- data/data/webgen/website_styles/andreas05/src/default.css +33 -0
- data/data/webgen/website_styles/andreas05/src/default.template +40 -0
- data/data/webgen/website_styles/andreas05/src/images/bodybg.gif +0 -0
- data/data/webgen/website_styles/andreas05/src/images/front.png +0 -0
- data/data/webgen/website_styles/andreas06/README +14 -0
- data/data/webgen/website_styles/andreas06/src/default.css +354 -0
- data/data/webgen/website_styles/andreas06/src/default.template +70 -0
- data/data/webgen/website_styles/andreas06/src/images/bodybg.gif +0 -0
- data/data/webgen/website_styles/andreas06/src/images/boxbg.gif +0 -0
- data/data/webgen/website_styles/andreas06/src/images/greypx.gif +0 -0
- data/data/webgen/website_styles/andreas06/src/images/header.jpg +0 -0
- data/data/webgen/website_styles/andreas06/src/images/innerbg.gif +0 -0
- data/data/webgen/website_styles/andreas06/src/images/leaves.jpg +0 -0
- data/data/webgen/website_styles/andreas06/src/images/tabs.gif +0 -0
- data/data/webgen/website_styles/andreas07/README +15 -0
- data/data/webgen/website_styles/andreas07/src/browserfix.css +7 -0
- data/data/webgen/website_styles/andreas07/src/default.css +92 -0
- data/data/webgen/website_styles/andreas07/src/default.template +42 -0
- data/data/webgen/website_styles/andreas07/src/images/bodybg.gif +0 -0
- data/data/webgen/website_styles/andreas07/src/images/sidebarbg.gif +0 -0
- data/data/webgen/website_styles/andreas08/README +14 -0
- data/data/webgen/website_styles/andreas08/src/default.css +224 -0
- data/data/webgen/website_styles/andreas08/src/default.template +51 -0
- data/data/webgen/website_styles/andreas09/README +14 -0
- data/data/webgen/website_styles/andreas09/src/default.css +308 -0
- data/data/webgen/website_styles/andreas09/src/default.template +68 -0
- data/data/webgen/website_styles/andreas09/src/images/bodybg-black.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/bodybg-green.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/bodybg-orange.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/bodybg-purple.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/bodybg-red.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/bodybg.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/footerbg.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/menuhover-black.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/menuhover-green.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/menuhover-orange.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/menuhover-purple.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/menuhover-red.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/menuhover.jpg +0 -0
- data/data/webgen/website_styles/simple/README +6 -0
- data/data/webgen/website_styles/simple/src/default.css +84 -0
- data/data/webgen/website_styles/simple/src/default.template +36 -0
- data/data/webgen/website_templates/default/README +6 -0
- data/data/webgen/website_templates/default/src/index.page +8 -0
- data/data/webgen/website_templates/project/README +5 -0
- data/data/webgen/website_templates/project/src/about.page +12 -0
- data/data/webgen/website_templates/project/src/download.page +15 -0
- data/data/webgen/website_templates/project/src/features.page +8 -0
- data/data/webgen/website_templates/project/src/index.page +9 -0
- data/data/webgen/website_templates/project/src/screenshots.page +18 -0
- data/doc/contentprocessor.template +11 -0
- data/doc/contentprocessor/blocks.page +129 -0
- data/doc/contentprocessor/builder.page +80 -0
- data/doc/contentprocessor/erb.page +59 -0
- data/doc/contentprocessor/erubis.page +46 -0
- data/doc/contentprocessor/fragments.page +25 -0
- data/doc/contentprocessor/haml.page +47 -0
- data/doc/contentprocessor/maruku.page +41 -0
- data/doc/contentprocessor/rdiscount.page +37 -0
- data/doc/contentprocessor/rdoc.page +36 -0
- data/doc/contentprocessor/redcloth.page +39 -0
- data/doc/contentprocessor/sass.page +31 -0
- data/doc/contentprocessor/tags.page +73 -0
- data/doc/extensions.metainfo +29 -0
- data/doc/extensions.page +16 -0
- data/doc/extensions.template +17 -0
- data/doc/faq.page +219 -0
- data/doc/getting_started.page +135 -0
- data/doc/index.page +65 -0
- data/doc/manual.page +589 -0
- data/doc/reference_configuration.page +959 -0
- data/doc/reference_metainfo.page +222 -0
- data/doc/source/filesystem.page +39 -0
- data/doc/source/tararchive.page +40 -0
- data/doc/sourcehandler.template +21 -0
- data/doc/sourcehandler/copy.page +19 -0
- data/doc/sourcehandler/directory.page +27 -0
- data/doc/sourcehandler/feed.page +105 -0
- data/doc/sourcehandler/metainfo.page +41 -0
- data/doc/sourcehandler/page.page +14 -0
- data/doc/sourcehandler/sitemap.page +46 -0
- data/doc/sourcehandler/template.page +45 -0
- data/doc/sourcehandler/virtual.page +49 -0
- data/doc/tag.template +25 -0
- data/doc/tag/breadcrumbtrail.page +40 -0
- data/doc/tag/coderay.page +49 -0
- data/doc/tag/date.page +31 -0
- data/doc/tag/executecommand.page +26 -0
- data/doc/tag/includefile.page +32 -0
- data/doc/tag/langbar.page +44 -0
- data/doc/tag/link.page +44 -0
- data/doc/tag/menu.page +106 -0
- data/doc/tag/metainfo.page +29 -0
- data/doc/tag/relocatable.page +38 -0
- data/doc/tag/sitemap.page +31 -0
- data/doc/tag/tikz.page +158 -0
- data/doc/upgrading.page +139 -0
- data/doc/webgen_page_format.page +129 -0
- data/lib/webgen/blackboard.rb +78 -0
- data/lib/webgen/cache.rb +87 -0
- data/lib/webgen/cli.rb +124 -0
- data/lib/webgen/cli/apply_command.rb +64 -0
- data/lib/webgen/cli/create_command.rb +66 -0
- data/lib/webgen/cli/run_command.rb +22 -0
- data/lib/webgen/cli/utils.rb +88 -0
- data/lib/webgen/cli/webgui_command.rb +72 -0
- data/lib/webgen/common.rb +21 -0
- data/lib/webgen/common/sitemap.rb +83 -0
- data/lib/webgen/configuration.rb +153 -0
- data/lib/webgen/contentprocessor.rb +99 -0
- data/lib/webgen/contentprocessor/blocks.rb +60 -0
- data/lib/webgen/contentprocessor/builder.rb +30 -0
- data/lib/webgen/contentprocessor/context.rb +89 -0
- data/lib/webgen/contentprocessor/erb.rb +28 -0
- data/lib/webgen/contentprocessor/erubis.rb +40 -0
- data/lib/webgen/contentprocessor/fragments.rb +25 -0
- data/lib/webgen/contentprocessor/haml.rb +30 -0
- data/lib/webgen/contentprocessor/maruku.rb +20 -0
- data/lib/webgen/contentprocessor/rdiscount.rb +17 -0
- data/lib/webgen/contentprocessor/rdoc.rb +19 -0
- data/lib/webgen/contentprocessor/redcloth.rb +17 -0
- data/lib/webgen/contentprocessor/sass.rb +20 -0
- data/lib/webgen/contentprocessor/tags.rb +136 -0
- data/lib/webgen/coreext.rb +13 -0
- data/lib/webgen/default_config.rb +215 -0
- data/lib/webgen/languages.rb +589 -0
- data/lib/webgen/loggable.rb +25 -0
- data/lib/webgen/logger.rb +97 -0
- data/lib/webgen/node.rb +391 -0
- data/lib/webgen/output.rb +82 -0
- data/lib/webgen/output/filesystem.rb +69 -0
- data/lib/webgen/page.rb +153 -0
- data/lib/webgen/path.rb +194 -0
- data/lib/webgen/source.rb +54 -0
- data/lib/webgen/source/filesystem.rb +61 -0
- data/lib/webgen/source/resource.rb +44 -0
- data/lib/webgen/source/stacked.rb +55 -0
- data/lib/webgen/source/tararchive.rb +73 -0
- data/lib/webgen/sourcehandler.rb +226 -0
- data/lib/webgen/sourcehandler/base.rb +248 -0
- data/lib/webgen/sourcehandler/copy.rb +43 -0
- data/lib/webgen/sourcehandler/directory.rb +36 -0
- data/lib/webgen/sourcehandler/feed.rb +117 -0
- data/lib/webgen/sourcehandler/fragment.rb +68 -0
- data/lib/webgen/sourcehandler/memory.rb +43 -0
- data/lib/webgen/sourcehandler/metainfo.rb +128 -0
- data/lib/webgen/sourcehandler/page.rb +59 -0
- data/lib/webgen/sourcehandler/sitemap.rb +60 -0
- data/lib/webgen/sourcehandler/template.rb +66 -0
- data/lib/webgen/sourcehandler/virtual.rb +110 -0
- data/lib/webgen/tag.rb +27 -0
- data/lib/webgen/tag/base.rb +170 -0
- data/lib/webgen/tag/breadcrumbtrail.rb +70 -0
- data/lib/webgen/tag/coderay.rb +31 -0
- data/lib/webgen/tag/date.rb +18 -0
- data/lib/webgen/tag/executecommand.rb +30 -0
- data/lib/webgen/tag/includefile.rb +42 -0
- data/lib/webgen/tag/langbar.rb +52 -0
- data/lib/webgen/tag/link.rb +26 -0
- data/lib/webgen/tag/menu.rb +207 -0
- data/lib/webgen/tag/metainfo.rb +25 -0
- data/lib/webgen/tag/relocatable.rb +54 -0
- data/lib/webgen/tag/sitemap.rb +41 -0
- data/lib/webgen/tag/tikz.rb +119 -0
- data/lib/webgen/tree.rb +90 -0
- data/lib/webgen/version.rb +8 -0
- data/lib/webgen/webgentask.rb +152 -0
- data/lib/webgen/website.rb +342 -0
- data/lib/webgen/websiteaccess.rb +31 -0
- data/lib/webgen/websitemanager.rb +127 -0
- data/man/man1/webgen.1 +73 -0
- data/misc/default.css +384 -0
- data/misc/default.template +75 -0
- data/misc/htmldoc.metainfo +25 -0
- data/misc/htmldoc.virtual +5 -0
- data/misc/images/arrow.gif +0 -0
- data/misc/images/error.png +0 -0
- data/misc/images/headerbg.jpg +0 -0
- data/misc/images/important.png +0 -0
- data/misc/images/information.png +0 -0
- data/misc/images/quote.gif +0 -0
- data/misc/images/warning.png +0 -0
- data/setup.rb +1585 -0
- data/test/helper.rb +45 -0
- data/test/test_blackboard.rb +60 -0
- data/test/test_cache.rb +59 -0
- data/test/test_cli.rb +21 -0
- data/test/test_common.rb +18 -0
- data/test/test_common_sitemap.rb +58 -0
- data/test/test_configuration.rb +68 -0
- data/test/test_contentprocessor.rb +33 -0
- data/test/test_contentprocessor_blocks.rb +68 -0
- data/test/test_contentprocessor_builder.rb +23 -0
- data/test/test_contentprocessor_context.rb +40 -0
- data/test/test_contentprocessor_erb.rb +23 -0
- data/test/test_contentprocessor_erubis.rb +49 -0
- data/test/test_contentprocessor_fragments.rb +42 -0
- data/test/test_contentprocessor_haml.rb +23 -0
- data/test/test_contentprocessor_maruku.rb +29 -0
- data/test/test_contentprocessor_rdiscount.rb +17 -0
- data/test/test_contentprocessor_rdoc.rb +18 -0
- data/test/test_contentprocessor_redcloth.rb +15 -0
- data/test/test_contentprocessor_sass.rb +22 -0
- data/test/test_contentprocessor_tags.rb +99 -0
- data/test/test_languages.rb +67 -0
- data/test/test_loggable.rb +32 -0
- data/test/test_logger.rb +94 -0
- data/test/test_node.rb +367 -0
- data/test/test_output_filesystem.rb +60 -0
- data/test/test_page.rb +214 -0
- data/test/test_path.rb +165 -0
- data/test/test_source_filesystem.rb +76 -0
- data/test/test_source_resource.rb +28 -0
- data/test/test_source_stacked.rb +36 -0
- data/test/test_source_tararchive.rb +65 -0
- data/test/test_sourcehandler_base.rb +123 -0
- data/test/test_sourcehandler_copy.rb +47 -0
- data/test/test_sourcehandler_directory.rb +42 -0
- data/test/test_sourcehandler_feed.rb +77 -0
- data/test/test_sourcehandler_fragment.rb +69 -0
- data/test/test_sourcehandler_memory.rb +44 -0
- data/test/test_sourcehandler_metainfo.rb +118 -0
- data/test/test_sourcehandler_page.rb +65 -0
- data/test/test_sourcehandler_sitemap.rb +49 -0
- data/test/test_sourcehandler_template.rb +65 -0
- data/test/test_sourcehandler_virtual.rb +87 -0
- data/test/test_tag_base.rb +85 -0
- data/test/test_tag_breadcrumbtrail.rb +91 -0
- data/test/test_tag_coderay.rb +32 -0
- data/test/test_tag_date.rb +18 -0
- data/test/test_tag_executecommand.rb +41 -0
- data/test/test_tag_includefile.rb +50 -0
- data/test/test_tag_langbar.rb +72 -0
- data/test/test_tag_link.rb +69 -0
- data/test/test_tag_menu.rb +207 -0
- data/test/test_tag_metainfo.rb +19 -0
- data/test/test_tag_relocatable.rb +59 -0
- data/test/test_tag_sitemap.rb +47 -0
- data/test/test_tag_tikz.rb +69 -0
- data/test/test_tree.rb +70 -0
- data/test/test_webgentask.rb +23 -0
- data/test/test_website.rb +98 -0
- data/test/test_websiteaccess.rb +25 -0
- data/test/test_websitemanager.rb +70 -0
- 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>
|
data/doc/upgrading.page
ADDED
@@ -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.
|