gettalong-webgen 0.5.4.20080929
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +5 -0
- data/COPYING +10 -0
- data/GPL +340 -0
- data/Rakefile +324 -0
- data/THANKS +17 -0
- data/bin/webgen +10 -0
- data/data/webgen/resources.yaml +3 -0
- data/data/webgen/webgui/controller/main.rb +129 -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 +6 -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 +61 -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 +66 -0
- data/doc/contentprocessor/builder.page +80 -0
- data/doc/contentprocessor/erb.page +56 -0
- data/doc/contentprocessor/erubis.page +46 -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 +214 -0
- data/doc/getting_started.page +134 -0
- data/doc/index.page +65 -0
- data/doc/manual.page +532 -0
- data/doc/reference_configuration.page +646 -0
- data/doc/reference_metainfo.page +213 -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 +82 -0
- data/doc/sourcehandler/metainfo.page +41 -0
- data/doc/sourcehandler/page.page +30 -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 +22 -0
- data/doc/tag/menu.page +92 -0
- data/doc/tag/metainfo.page +29 -0
- data/doc/tag/relocatable.page +38 -0
- data/doc/tag/sitemap.page +31 -0
- data/doc/upgrading.page +139 -0
- data/doc/webgen_page_format.page +128 -0
- data/lib/webgen/blackboard.rb +73 -0
- data/lib/webgen/cache.rb +85 -0
- data/lib/webgen/cli.rb +118 -0
- data/lib/webgen/cli/create_command.rb +64 -0
- data/lib/webgen/cli/run_command.rb +20 -0
- data/lib/webgen/cli/utils.rb +86 -0
- data/lib/webgen/cli/webgui_command.rb +49 -0
- data/lib/webgen/common.rb +10 -0
- data/lib/webgen/common/sitemap.rb +76 -0
- data/lib/webgen/configuration.rb +147 -0
- data/lib/webgen/contentprocessor.rb +96 -0
- data/lib/webgen/contentprocessor/blocks.rb +46 -0
- data/lib/webgen/contentprocessor/builder.rb +26 -0
- data/lib/webgen/contentprocessor/context.rb +90 -0
- data/lib/webgen/contentprocessor/erb.rb +24 -0
- data/lib/webgen/contentprocessor/erubis.rb +40 -0
- data/lib/webgen/contentprocessor/haml.rb +25 -0
- data/lib/webgen/contentprocessor/maruku.rb +18 -0
- data/lib/webgen/contentprocessor/rdiscount.rb +15 -0
- data/lib/webgen/contentprocessor/rdoc.rb +17 -0
- data/lib/webgen/contentprocessor/redcloth.rb +15 -0
- data/lib/webgen/contentprocessor/sass.rb +18 -0
- data/lib/webgen/contentprocessor/tags.rb +134 -0
- data/lib/webgen/coreext.rb +10 -0
- data/lib/webgen/default_config.rb +198 -0
- data/lib/webgen/languages.rb +578 -0
- data/lib/webgen/loggable.rb +23 -0
- data/lib/webgen/logger.rb +78 -0
- data/lib/webgen/node.rb +347 -0
- data/lib/webgen/output.rb +37 -0
- data/lib/webgen/output/filesystem.rb +67 -0
- data/lib/webgen/page.rb +133 -0
- data/lib/webgen/path.rb +182 -0
- data/lib/webgen/source.rb +24 -0
- data/lib/webgen/source/filesystem.rb +58 -0
- data/lib/webgen/source/resource.rb +42 -0
- data/lib/webgen/source/stacked.rb +53 -0
- data/lib/webgen/sourcehandler.rb +202 -0
- data/lib/webgen/sourcehandler/base.rb +211 -0
- data/lib/webgen/sourcehandler/copy.rb +41 -0
- data/lib/webgen/sourcehandler/directory.rb +31 -0
- data/lib/webgen/sourcehandler/feed.rb +121 -0
- data/lib/webgen/sourcehandler/fragment.rb +71 -0
- data/lib/webgen/sourcehandler/metainfo.rb +117 -0
- data/lib/webgen/sourcehandler/page.rb +77 -0
- data/lib/webgen/sourcehandler/sitemap.rb +60 -0
- data/lib/webgen/sourcehandler/template.rb +68 -0
- data/lib/webgen/sourcehandler/virtual.rb +75 -0
- data/lib/webgen/tag.rb +23 -0
- data/lib/webgen/tag/base.rb +162 -0
- data/lib/webgen/tag/breadcrumbtrail.rb +71 -0
- data/lib/webgen/tag/coderay.rb +32 -0
- data/lib/webgen/tag/date.rb +18 -0
- data/lib/webgen/tag/executecommand.rb +29 -0
- data/lib/webgen/tag/includefile.rb +42 -0
- data/lib/webgen/tag/langbar.rb +52 -0
- data/lib/webgen/tag/menu.rb +186 -0
- data/lib/webgen/tag/metainfo.rb +25 -0
- data/lib/webgen/tag/relocatable.rb +53 -0
- data/lib/webgen/tag/sitemap.rb +42 -0
- data/lib/webgen/tree.rb +80 -0
- data/lib/webgen/version.rb +6 -0
- data/lib/webgen/webgentask.rb +148 -0
- data/lib/webgen/website.rb +214 -0
- data/lib/webgen/websiteaccess.rb +29 -0
- data/lib/webgen/websitemanager.rb +125 -0
- data/man/man1/webgen.1 +67 -0
- data/misc/default.css +360 -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.gif +0 -0
- data/misc/images/exclamation.gif +0 -0
- data/misc/images/headerbg.jpg +0 -0
- data/misc/images/information.gif +0 -0
- data/misc/images/quote.gif +0 -0
- data/setup.rb +1585 -0
- data/test/helper.rb +41 -0
- data/test/test_blackboard.rb +58 -0
- data/test/test_cache.rb +57 -0
- data/test/test_common_sitemap.rb +56 -0
- data/test/test_configuration.rb +66 -0
- data/test/test_contentprocessor.rb +31 -0
- data/test/test_contentprocessor_blocks.rb +34 -0
- data/test/test_contentprocessor_builder.rb +19 -0
- data/test/test_contentprocessor_context.rb +38 -0
- data/test/test_contentprocessor_erb.rb +20 -0
- data/test/test_contentprocessor_erubis.rb +47 -0
- data/test/test_contentprocessor_haml.rb +20 -0
- data/test/test_contentprocessor_maruku.rb +27 -0
- data/test/test_contentprocessor_rdiscount.rb +15 -0
- data/test/test_contentprocessor_rdoc.rb +16 -0
- data/test/test_contentprocessor_redcloth.rb +12 -0
- data/test/test_contentprocessor_sass.rb +20 -0
- data/test/test_contentprocessor_tags.rb +97 -0
- data/test/test_languages.rb +53 -0
- data/test/test_loggable.rb +30 -0
- data/test/test_logger.rb +73 -0
- data/test/test_node.rb +339 -0
- data/test/test_output_filesystem.rb +58 -0
- data/test/test_page.rb +203 -0
- data/test/test_path.rb +131 -0
- data/test/test_source_filesystem.rb +59 -0
- data/test/test_source_resource.rb +26 -0
- data/test/test_source_stacked.rb +34 -0
- data/test/test_sourcehandler_base.rb +92 -0
- data/test/test_sourcehandler_copy.rb +45 -0
- data/test/test_sourcehandler_directory.rb +25 -0
- data/test/test_sourcehandler_feed.rb +74 -0
- data/test/test_sourcehandler_fragment.rb +67 -0
- data/test/test_sourcehandler_metainfo.rb +93 -0
- data/test/test_sourcehandler_page.rb +70 -0
- data/test/test_sourcehandler_sitemap.rb +47 -0
- data/test/test_sourcehandler_template.rb +63 -0
- data/test/test_sourcehandler_virtual.rb +56 -0
- data/test/test_tag_base.rb +82 -0
- data/test/test_tag_breadcrumbtrail.rb +89 -0
- data/test/test_tag_coderay.rb +30 -0
- data/test/test_tag_date.rb +16 -0
- data/test/test_tag_executecommand.rb +39 -0
- data/test/test_tag_includefile.rb +48 -0
- data/test/test_tag_langbar.rb +60 -0
- data/test/test_tag_menu.rb +195 -0
- data/test/test_tag_metainfo.rb +17 -0
- data/test/test_tag_relocatable.rb +57 -0
- data/test/test_tag_sitemap.rb +44 -0
- data/test/test_tree.rb +69 -0
- data/test/test_webgentask.rb +21 -0
- data/test/test_website.rb +96 -0
- data/test/test_websiteaccess.rb +23 -0
- data/test/test_websitemanager.rb +68 -0
- metadata +575 -0
@@ -0,0 +1,213 @@
|
|
1
|
+
---
|
2
|
+
title: Meta Information Reference
|
3
|
+
---
|
4
|
+
# Meta Information Reference
|
5
|
+
|
6
|
+
Following is a list of all the meta information items that are used in one way or another by an
|
7
|
+
extension, be it a source handler, a tag or any other extension. Each meta information description
|
8
|
+
follows the same pattern:
|
9
|
+
|
10
|
+
* First the type of the value and an example value are listed.
|
11
|
+
* Then the paths for which this item is valid are listed.
|
12
|
+
* And at last follows a detailed description.
|
13
|
+
|
14
|
+
|
15
|
+
{:miref: .meta-information-ref}
|
16
|
+
|
17
|
+
### author
|
18
|
+
|
19
|
+
{:miref}
|
20
|
+
* String: `Thomas Leitner`
|
21
|
+
* Any
|
22
|
+
|
23
|
+
Sets the author of the path. This information is used, for example, by Webgen::SourceHandler::Feed.
|
24
|
+
|
25
|
+
### author\_url
|
26
|
+
|
27
|
+
{:miref}
|
28
|
+
* String: `http://webgen.rubyforge.org`
|
29
|
+
* Any where `author` is also set
|
30
|
+
|
31
|
+
Sets the homepage of the author of the path. This information is used, for example, by
|
32
|
+
Webgen::SourceHandler::Feed and normally only when `author` is also set.
|
33
|
+
|
34
|
+
### blocks
|
35
|
+
|
36
|
+
{:miref}
|
37
|
+
* Hash of Hashes: `\{default: {pipeline:textile}, 1: {name: content, pipeline:maruku,erb,tags}}`
|
38
|
+
* Files in Webgen Page Format
|
39
|
+
|
40
|
+
Specifies the default names and additional options for the blocks. The special key `default` is used
|
41
|
+
to set default options for all blocks. Specific options for (or the name of) a block can be set by
|
42
|
+
using the block index as key (numbering starts from one).
|
43
|
+
|
44
|
+
### change\_freq
|
45
|
+
|
46
|
+
{:miref}
|
47
|
+
* String: `hourly`
|
48
|
+
* Any
|
49
|
+
|
50
|
+
Sets the change frequency of the page. This information is used, for example, by the sitemap source
|
51
|
+
handler. You can use the following values for this key: `hourly, daily, weekly, monthly, yearly,
|
52
|
+
never`.
|
53
|
+
|
54
|
+
### created\_at
|
55
|
+
|
56
|
+
{:miref}
|
57
|
+
* Time: `2008-08-14 10:25:34 +02:00`
|
58
|
+
* Any
|
59
|
+
|
60
|
+
Sets the time when the path was created. This information cannot automatically be derived for paths
|
61
|
+
provided by Webgen::Source::FileSystem, so this has to be set manually.
|
62
|
+
|
63
|
+
### draft
|
64
|
+
|
65
|
+
{:miref}
|
66
|
+
* Boolean: `true`
|
67
|
+
* Any
|
68
|
+
|
69
|
+
If this meta information is set on a path, no node will be created from it. This is useful to add
|
70
|
+
content to a website which should only be used later on.
|
71
|
+
|
72
|
+
### fragments\_in\_menu
|
73
|
+
|
74
|
+
{:miref}
|
75
|
+
* Boolean: `false`
|
76
|
+
* Page files
|
77
|
+
|
78
|
+
Specifies if the fragment nodes of the page file should be in the menu.
|
79
|
+
|
80
|
+
### index\_path
|
81
|
+
|
82
|
+
{:miref}
|
83
|
+
* String: `myindex.html`
|
84
|
+
* Directories
|
85
|
+
|
86
|
+
Sets the directory index path for the directory overriding the default value.
|
87
|
+
|
88
|
+
### in\_menu
|
89
|
+
|
90
|
+
{:miref}
|
91
|
+
* Boolean: `true`
|
92
|
+
* Any
|
93
|
+
|
94
|
+
Specifies if the path should appear in menus.
|
95
|
+
|
96
|
+
### kind
|
97
|
+
|
98
|
+
{:miref}
|
99
|
+
* String: `page`
|
100
|
+
* Any
|
101
|
+
|
102
|
+
Specifies the kind of the path. Some source handlers define a default value for this meta
|
103
|
+
information for nodes created by them.
|
104
|
+
|
105
|
+
### lang
|
106
|
+
|
107
|
+
{:miref}
|
108
|
+
* String: `de`
|
109
|
+
* Page files
|
110
|
+
|
111
|
+
Sets the language for the path. Has to be a valid ISO-639-1/2 character code for the language. This
|
112
|
+
meta information needs to be set before a node gets created.
|
113
|
+
|
114
|
+
### link\_attrs
|
115
|
+
|
116
|
+
{:miref}
|
117
|
+
* Hash: `\{title: Hallo, class: extra}`
|
118
|
+
* Any
|
119
|
+
|
120
|
+
Specifies additional attribute-value pairs (in form of a Hash) that should be added to a link to the
|
121
|
+
path.
|
122
|
+
|
123
|
+
### modified\_at
|
124
|
+
|
125
|
+
{:miref}
|
126
|
+
* Time: `2008-08-14 10:25:34 +02:00`
|
127
|
+
* Any
|
128
|
+
|
129
|
+
Sets the time when the path was last modified. This information is automatically set for paths
|
130
|
+
provided by Webgen::Source::FileSystem but can be overridden by setting it manually. If not set to a
|
131
|
+
valid time, the time when webgen is executed is used for this meta information.
|
132
|
+
|
133
|
+
### no\_output
|
134
|
+
|
135
|
+
{:miref}
|
136
|
+
* Boolean: `true`
|
137
|
+
* Any
|
138
|
+
|
139
|
+
Specifies whether an output path for the node should be written or not. This differs from `draft`
|
140
|
+
that a node for the path gets created nonetheless.
|
141
|
+
|
142
|
+
### omit\_index\_path
|
143
|
+
|
144
|
+
{:miref}
|
145
|
+
* Boolean: `false`
|
146
|
+
* Index paths
|
147
|
+
|
148
|
+
Controls whether the index path should appear in a breadcrumb trail despite the setting of the
|
149
|
+
`tag.breadcrumbtrail.omit_index_path` option.
|
150
|
+
|
151
|
+
### output\_path\_style
|
152
|
+
|
153
|
+
{:miref}
|
154
|
+
* Array: `[:parent, :cnbase, [., :lang], .html]`
|
155
|
+
* Any
|
156
|
+
|
157
|
+
Sets a custom output path style for the specified path. The basename is substituted for the value
|
158
|
+
`:cnbase` and the language for the value `:lang`. Strings are used verbatim. If `:lang` is specified
|
159
|
+
in a sub-array, the whole sub-array is omitted, if the configuration option
|
160
|
+
`sourcehandler.default_lang_in_output_path` is false. For more and detailed information, have look
|
161
|
+
at the [output path creation section]({relocatable: manual.html#source-output}) of the manual!
|
162
|
+
|
163
|
+
> This meta information has to be set BEFORE a node gets created. Setting this value is therefore
|
164
|
+
> only useful, for example, in the `paths` block of a meta information backing file.
|
165
|
+
{.exclamation}
|
166
|
+
|
167
|
+
### priority
|
168
|
+
|
169
|
+
{:miref}
|
170
|
+
* Float: `0.5`
|
171
|
+
* Any
|
172
|
+
|
173
|
+
Specifies the priority of this file in respect to all the other files of the website. This
|
174
|
+
information is used, for example, by the sitemap source handler.
|
175
|
+
|
176
|
+
### routed\_title
|
177
|
+
|
178
|
+
{:miref}
|
179
|
+
* String: `Image Directory`
|
180
|
+
* Any
|
181
|
+
|
182
|
+
Only used if set on a directory index path; specifies the title of the directory for which it is the
|
183
|
+
index path. If this meta information is not specified, the title of the directory will be used
|
184
|
+
instead.
|
185
|
+
|
186
|
+
### sort\_info
|
187
|
+
|
188
|
+
{:miref}
|
189
|
+
* Integer or String: `15`
|
190
|
+
* Any
|
191
|
+
|
192
|
+
Sets the sort information for the path. Any String or Integer value can be used here. When two nodes
|
193
|
+
are compared using this information and both have Integers, then an Integer comparision is
|
194
|
+
done. Otherwise a String comparision is done.
|
195
|
+
|
196
|
+
Setting a String value is useful, for example, for specifying dates as sort information.
|
197
|
+
|
198
|
+
### template
|
199
|
+
|
200
|
+
{:miref}
|
201
|
+
* String or null: `my.template` or `~`
|
202
|
+
* Page/Template files
|
203
|
+
|
204
|
+
Sets the template for the page/template file overriding the default value. If set to null
|
205
|
+
(i.e. `~`), no template is used for the page/template file!
|
206
|
+
|
207
|
+
### title
|
208
|
+
|
209
|
+
{:miref}
|
210
|
+
* String: `New Title`
|
211
|
+
* Any
|
212
|
+
|
213
|
+
Sets the title for the path.
|
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
template: extensions.template
|
3
|
+
--- name:summary pipeline:erb,tags,maruku,blocks
|
4
|
+
<%
|
5
|
+
patterns = context.website.config['sourcehandler.patterns'][context.content_node['title']]
|
6
|
+
if patterns
|
7
|
+
%>
|
8
|
+
This source handler operates on paths that match one of the following path patterns (see the [path pattern documentation]({relocatable: manual.html#source-pathpattern}) for more information): `<%= patterns.join(', ') %>`
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<%
|
12
|
+
meta_info = context.website.config['sourcehandler.default_meta_info'][context.content_node['title']]
|
13
|
+
if meta_info
|
14
|
+
%>
|
15
|
+
Following is the default meta information set on any node created by this source handler:
|
16
|
+
<pre>
|
17
|
+
<%= meta_info.to_yaml.gsub(/^---/, '').strip %>
|
18
|
+
</pre>
|
19
|
+
<% end %>
|
20
|
+
--- name:content
|
21
|
+
<webgen:block name='content' />
|
@@ -0,0 +1,19 @@
|
|
1
|
+
---
|
2
|
+
title: Webgen::SourceHandler::Copy
|
3
|
+
---
|
4
|
+
## Description
|
5
|
+
|
6
|
+
This source handler copies files from the source to the output directory, optionally running a
|
7
|
+
content processor over the content. It is useful, for example, for CSS stylesheets, javascript files
|
8
|
+
and images.
|
9
|
+
|
10
|
+
It decides using the file extension if a content processor should be used and which one. If the
|
11
|
+
short name of a content processor is the first part of the file extension, the file is processed by
|
12
|
+
this content processor and the first part is removed from the file extension. Otherwise no
|
13
|
+
processing is done at all. For example, a file named `hello.jpg` just gets copied verbatimly but a
|
14
|
+
file named `usage.erb.html` gets preprocessed by the `erb` content processor and written to a file
|
15
|
+
named `usage.html`. As you can see in this example, the processor name gets stripped from the file
|
16
|
+
extension.
|
17
|
+
|
18
|
+
If you want to use a specific content processor for processing a file, have a look at its
|
19
|
+
documentation page which shows the unique short name that needs to be used in the file extension.
|
@@ -0,0 +1,27 @@
|
|
1
|
+
---
|
2
|
+
title: Webgen::SourceHandler::Directory
|
3
|
+
---
|
4
|
+
## Description
|
5
|
+
|
6
|
+
The directory handler is used for handling directories, ie. it creates the target directories.
|
7
|
+
Additionally an index path for each directory can be specified which is used instead of the plain
|
8
|
+
directory index for displaying purposes. This means that when the directory path is specified
|
9
|
+
(e.g. by Webgen::Tag::Relocatable) the index path is returned.
|
10
|
+
|
11
|
+
The name of the index path is specified with the meta information `index_path` which is set to
|
12
|
+
`index.html` by default. This meta information needs to be set directly on the directory node (for
|
13
|
+
example, via a meta information backing file).
|
14
|
+
|
15
|
+
The title for a directory can be set via the `title` meta information on the directory itself.
|
16
|
+
However, if the directory has an index path, the meta information `routed_title` of the index path
|
17
|
+
is used for the directory title. This enables webgen to provide correctly localized directory names.
|
18
|
+
|
19
|
+
Normally, webgen shows a warning if it could not find the directory index path for a directory.
|
20
|
+
However, there are most certainly directories which should not have an index path, for example, a
|
21
|
+
directory containing only images. To prevent webgen from displaying warnings for such directories,
|
22
|
+
you can set a null index path using a meta information backing file:
|
23
|
+
|
24
|
+
dirWithOnlyImages:
|
25
|
+
index_path: ~
|
26
|
+
|
27
|
+
This will prevent webgen from showing warnings because you explicitly define a null index path.
|
@@ -0,0 +1,82 @@
|
|
1
|
+
---
|
2
|
+
title: Webgen::SourceHandler::Feed
|
3
|
+
---
|
4
|
+
## Description
|
5
|
+
|
6
|
+
This source handler automatically generates an atom or RSS feed for a set of files from a file in
|
7
|
+
[Webgen Page Format]({relocatable: ../webgen_page_format.html}) (the format which is also used for
|
8
|
+
page files).
|
9
|
+
|
10
|
+
The following meta information keys are supported:
|
11
|
+
|
12
|
+
* `entries` (MANDATORY)
|
13
|
+
|
14
|
+
A LCN pattern (or an array of LCN patterns) which specify the page files that should be
|
15
|
+
used. Other matched files are excluded from the list.
|
16
|
+
|
17
|
+
* `number_of_entries` (OPTIONAL)
|
18
|
+
|
19
|
+
The number of entries that should be included in the feed. Defaults to 10.
|
20
|
+
|
21
|
+
* `atom` (OPTIONAL)
|
22
|
+
|
23
|
+
An atom feed is generated if this key is set to `true`. Defaults to `true`.
|
24
|
+
|
25
|
+
* `rss` (OPTIONAL)
|
26
|
+
|
27
|
+
A RSS feed is generated if this key is set to `true`. Defaults to `true`.
|
28
|
+
|
29
|
+
* `site_url` (MANDATORY)
|
30
|
+
|
31
|
+
The base url of the website for which the feed is generated.
|
32
|
+
|
33
|
+
* `author` (MANDATORY)
|
34
|
+
|
35
|
+
Specifies the author of the feed.
|
36
|
+
|
37
|
+
* `author_url` (OPTIONAL)
|
38
|
+
|
39
|
+
Specifies the URL of the homepage of the author.
|
40
|
+
|
41
|
+
* `title` (MANDATORY)
|
42
|
+
|
43
|
+
The title of the feed.
|
44
|
+
|
45
|
+
* `description` (OPTIONAL)
|
46
|
+
|
47
|
+
A short description of the feed.
|
48
|
+
|
49
|
+
* `created_at` (OPTIONAL)
|
50
|
+
|
51
|
+
The time at which this feed was created. Defaults to the current time if not set.
|
52
|
+
|
53
|
+
* `icon` (OPTIONAL)
|
54
|
+
|
55
|
+
The absolute localized canonical name of the feed's icon image.
|
56
|
+
|
57
|
+
The following meta information keys of page files are used if they are specified:
|
58
|
+
|
59
|
+
* `created_at`
|
60
|
+
|
61
|
+
The time at which the page file was created, used as the publication time.
|
62
|
+
|
63
|
+
* `modified_at`
|
64
|
+
|
65
|
+
The time at which the page file was last modified, used as the time at which this feed entry was
|
66
|
+
updated.
|
67
|
+
|
68
|
+
* `title`
|
69
|
+
|
70
|
+
The title of the page file, used as title of the feed entry.
|
71
|
+
|
72
|
+
* `author`
|
73
|
+
|
74
|
+
The name of the author of the page file, used as the author of the feed entry.
|
75
|
+
|
76
|
+
* `author_url`
|
77
|
+
|
78
|
+
The URL of the homepage of the author. Only used if the `author` meta information is also set.
|
79
|
+
|
80
|
+
The default implementation supports the generation of atom and RSS feeds. You can override the
|
81
|
+
default generation mechanism by adding an `atom_template` and/or `rss_template` block in the feed
|
82
|
+
file which are then used to generate the atom or the RSS feed respectively.
|
@@ -0,0 +1,41 @@
|
|
1
|
+
---
|
2
|
+
title: Webgen::SourceHandler::Metainfo
|
3
|
+
---
|
4
|
+
## Description
|
5
|
+
|
6
|
+
This source handler provides the ability to set meta information for any path. It uses files in
|
7
|
+
[Webgen Page Format]({relocatable: ../webgen_page_format.html}) which can have two special blocks:
|
8
|
+
|
9
|
+
* `paths`: This block specifies meta information for paths and therefore this meta information is
|
10
|
+
applied before a node for a path is created. This can be used, for example, to change the output
|
11
|
+
path style. When specifying patterns, remember that the patterns are matched against paths!
|
12
|
+
|
13
|
+
* `alcn`: This block specifies meta information for nodes and this meta information is applied
|
14
|
+
directly after a node has been created. When specifying patterns, remember that the patterns are
|
15
|
+
matched against absolute localized canonical names! So you always need to take the language part
|
16
|
+
into account, ie. `/index.html` won't match but `/index.en.html`.
|
17
|
+
|
18
|
+
When no name is specified in the meta information file, the first block is assumed to be the `paths`
|
19
|
+
block and the second block is assumed to be the `alcn` block. The format of the two blocks is the
|
20
|
+
same: they need to be in YAML format and provide a hash with path patterns as keys and the
|
21
|
+
to-be-assigned meta information as values. This is best showed in an example:
|
22
|
+
|
23
|
+
--- name:paths
|
24
|
+
/**/index.page:
|
25
|
+
output_path_style: [:parent, :cnbase, :ext, [., :lang]]
|
26
|
+
|
27
|
+
mypic.jpg:
|
28
|
+
in_menu: true
|
29
|
+
--- name:alcn
|
30
|
+
**/index.en.html:
|
31
|
+
in_menu: true
|
32
|
+
|
33
|
+
All paths named `index.page` are assigned a new output path style. This has to be done in the
|
34
|
+
`paths` block because otherwise it would have no effect. And the file `mypic.jpg` will show up in
|
35
|
+
the menu. Notice, that the first form is specified as an absolute path pattern and the second
|
36
|
+
not. If this meta information file lies in the root directory there is no difference between those
|
37
|
+
two approaches. However, when it lies in a sub directory, the first form is still absolute but the
|
38
|
+
second form is taken relative to the directory in which the meta information file is in.
|
39
|
+
|
40
|
+
And last but not least, all nodes with a localized canonical name of `index.en.html` will show up in
|
41
|
+
the menu (again, notice that the pattern is relative).
|
@@ -0,0 +1,30 @@
|
|
1
|
+
---
|
2
|
+
title: Webgen::SourceHandler::Page
|
3
|
+
---
|
4
|
+
## Description
|
5
|
+
|
6
|
+
This source handler uses page files which are used to specify the actual content for the
|
7
|
+
website. These files are written using [Webgen Page Format]({relocatable:
|
8
|
+
../webgen_page_format.html}). Therefore they contain the content for the web page and, optionally,
|
9
|
+
meta information.
|
10
|
+
|
11
|
+
*In contrast* to other handled files, page files can never be unlocalized! If they have no language
|
12
|
+
set, the default language specified using the configuration option `website.lang` is used. This
|
13
|
+
means that for the default language set to English and a source path named `index.page`, the
|
14
|
+
language meta information is automatically set to English.
|
15
|
+
|
16
|
+
## Fragment nodes
|
17
|
+
|
18
|
+
The page handler automatically generates fragment nodes for all found header tags in the block named
|
19
|
+
`content` (i.e. `h1`, `h2`, ...) that have an `id` attribute set. The default markup language Maruku
|
20
|
+
automatically generates an `id` attribute for all headers. If you use another markup language or
|
21
|
+
plain old HTML, you might need to set the `id` attributes by hand.
|
22
|
+
|
23
|
+
> The reason why only header tags with an `id` attribute are used is that only those can be
|
24
|
+
> referenced and linked to later.
|
25
|
+
{.information}
|
26
|
+
|
27
|
+
The generated fragment nodes can be used like any other node. So you can link to them and use them
|
28
|
+
in a menu. Concerning the menu, there is a setting for the `tag.menu.used_nodes` option called
|
29
|
+
`fragments` which only uses the fragment node of the current page to generate a menu. This allows to
|
30
|
+
generate a nice overview of the page.
|
@@ -0,0 +1,46 @@
|
|
1
|
+
---
|
2
|
+
title: Webgen::SourceHandler::Sitemap
|
3
|
+
---
|
4
|
+
## Description
|
5
|
+
|
6
|
+
This source handler automatically generates a sitemap based on the specification of
|
7
|
+
[sitemaps.org](http://sitemaps.org) from a file in [Webgen Page Format]({relocatable:
|
8
|
+
../webgen_page_format.html}).
|
9
|
+
|
10
|
+
> This extension can only be used if you have installed the [builder](http://builder.rubyforge.org)
|
11
|
+
> library. The preferred way to do this is via Rubygems:
|
12
|
+
>
|
13
|
+
> gem install builder
|
14
|
+
{.exclamation}
|
15
|
+
|
16
|
+
The following meta information keys are supported:
|
17
|
+
|
18
|
+
* `site_url` (MANDATORY)
|
19
|
+
|
20
|
+
The base url of the website for which the sitemap is generated.
|
21
|
+
|
22
|
+
* `default_change_freq` (OPTIONAL)
|
23
|
+
|
24
|
+
The default change frequency of a file.
|
25
|
+
|
26
|
+
* `default_priority` (OPTIONAL)
|
27
|
+
|
28
|
+
The default priority of a file.
|
29
|
+
|
30
|
+
You can also specify all common sitemap configuration options to customize the output of the source
|
31
|
+
handler.
|
32
|
+
|
33
|
+
The following meta information keys of files are used if they are specified:
|
34
|
+
|
35
|
+
* `modified_at`
|
36
|
+
|
37
|
+
The time at which the file was last modified, used as the time at which this feed entry was
|
38
|
+
updated.
|
39
|
+
|
40
|
+
* `change_freq`
|
41
|
+
|
42
|
+
The change frequency of the the file.
|
43
|
+
|
44
|
+
* `priority`
|
45
|
+
|
46
|
+
The priority of the file in respect to the other files.
|