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,46 @@
|
|
1
|
+
---
|
2
|
+
title: Webgen::ContentProcessor::Erubis
|
3
|
+
---
|
4
|
+
## Description
|
5
|
+
|
6
|
+
This processor uses the [Erubis][1] library to process embedded Ruby statements. Erubis is quite a
|
7
|
+
bit faster than the standard ERB library that is shipped with Ruby and provides many other useful
|
8
|
+
options.
|
9
|
+
|
10
|
+
> This extension is only available if you have installed the [erubis][1] library. The preferred
|
11
|
+
> way to do this is via Rubygems:
|
12
|
+
>
|
13
|
+
> gem install erubis
|
14
|
+
{.exclamation}
|
15
|
+
|
16
|
+
[1]: http://www.kuwata-lab.com/erubis/ "Erubis Homepage"
|
17
|
+
|
18
|
+
You can use some special objects provided by webgen in your embedded Ruby code. These are the same
|
19
|
+
objects that are available to the `erb` processor, have a look at its [documentation
|
20
|
+
page]({relocatable: erb.html}).
|
21
|
+
|
22
|
+
The default mode of Erubis works like ERB. So everyting said on the [erb page]({relocatable:
|
23
|
+
erb.html}) is also true for Erubis. However, you can customize how this processor works by using the
|
24
|
+
following configuration options:
|
25
|
+
|
26
|
+
* `contentprocessor.erubis.use_pi`: Use processing instructions instead of ERB like
|
27
|
+
instructions. Normally you use statements like `<%% result = some_method_call(opts) %>` or `<%%=
|
28
|
+
context.content_node.absolute_lcn %>` in your content. When setting this option to `true`, you can
|
29
|
+
use XML processing instructions instead, like this: `<?rb result = some_method_call(opts) ?>` or
|
30
|
+
`@{context.content_node.absolute_lcn}@`.
|
31
|
+
|
32
|
+
* `contentprocessor.erubis.options`: This is hash which is passed to the Erubis interpreter and
|
33
|
+
which can be used to set additional options.
|
34
|
+
|
35
|
+
For more information on the additional options or on how to use the processing instructions mode of
|
36
|
+
Erubis, have a look at the [Erubis User Guide](http://www.kuwata-lab.com/erubis/users-guide.html)!
|
37
|
+
|
38
|
+
You can also use block options to modify the behavior of Erubis. The block option `erubis_use_pi` is
|
39
|
+
used instead of the configuration option `contentprocessor.erubis.use_pi` and all other block
|
40
|
+
options starting with `erubis_` are added the options hash that is passed to the Erubis
|
41
|
+
interpreter. For example, the following page tells the Erubis interpreter to use the processing
|
42
|
+
instructions mode and to trim spaces:
|
43
|
+
|
44
|
+
--- erubis_use_pi:true erubis_trim:true
|
45
|
+
Here are the numbers from 1 to 5:
|
46
|
+
<?rb for i in [1,2,3,4,5] ?>@{i}@<?rb end ?>
|
@@ -0,0 +1,47 @@
|
|
1
|
+
---
|
2
|
+
title: Webgen::ContentProcessor::Haml
|
3
|
+
---
|
4
|
+
## Description
|
5
|
+
|
6
|
+
This processor converts the content, which is assumed to be in the Haml markup language, to valid
|
7
|
+
XHTML by using the Haml library. For detailed information about Haml have a look at the [Haml
|
8
|
+
Homepage][1]!
|
9
|
+
|
10
|
+
You can use some special objects provided by webgen in your Haml markup. These are the same objects
|
11
|
+
that are available to the `erb` processor, have a look at its [documentation page]({relocatable:
|
12
|
+
erb.html}).
|
13
|
+
|
14
|
+
> This extension is only available if you have installed the [haml][1] library. The preferred way to
|
15
|
+
> do this is via Rubygems:
|
16
|
+
>
|
17
|
+
> gem install haml
|
18
|
+
{.exclamation}
|
19
|
+
|
20
|
+
|
21
|
+
## Example
|
22
|
+
|
23
|
+
Here is a short sample of a text in Haml markup:
|
24
|
+
|
25
|
+
%h1#myid This a h1 header
|
26
|
+
|
27
|
+
%p
|
28
|
+
You can just write
|
29
|
+
%b your
|
30
|
+
paragraphs here and
|
31
|
+
%a{:href => 'http://someurl.com'} link
|
32
|
+
them below. This is a
|
33
|
+
%strong nice
|
34
|
+
format!
|
35
|
+
|
36
|
+
%blockquote.information
|
37
|
+
Citations are easy too.
|
38
|
+
Really. And you can assign them attributes.
|
39
|
+
|
40
|
+
%ul
|
41
|
+
%li Lists
|
42
|
+
%li aren't
|
43
|
+
%li difficult
|
44
|
+
%li either.
|
45
|
+
|
46
|
+
|
47
|
+
[1]: http://haml.hamptoncatlin.com/
|
@@ -0,0 +1,41 @@
|
|
1
|
+
---
|
2
|
+
title: Webgen::ContentProcessor::Maruku
|
3
|
+
---
|
4
|
+
## Description
|
5
|
+
|
6
|
+
This processor converts the content, which is assumed to be in Markdown markup, to HTML by using the
|
7
|
+
Maruku library. Maruku is a Markdown processor which supports a superset of Markdown, including
|
8
|
+
support for assigning ids and classes to every element, support for Markdown inside HTML elements
|
9
|
+
and footnotes.
|
10
|
+
|
11
|
+
For detailed information about Maruku have a look at the [Maruku Homepage][1]. There you will find
|
12
|
+
information about the general Markdown syntax as well as information about the extras added by
|
13
|
+
Maruku.
|
14
|
+
|
15
|
+
> Maruku is the default markup content processor for webgen as its markup syntax is easy to learn
|
16
|
+
> and nice to look at. Give it a try!
|
17
|
+
{.info}
|
18
|
+
|
19
|
+
Example
|
20
|
+
-------
|
21
|
+
|
22
|
+
Here is a short sample of a text in Markdown+Extras markup:
|
23
|
+
|
24
|
+
# This a h1 header {#myid}
|
25
|
+
|
26
|
+
You can just write *your* paragraphs here and
|
27
|
+
[link][1] them below. This is **nice** format!
|
28
|
+
|
29
|
+
> Citations are easy too.
|
30
|
+
> Really. And you can assign them attributes.
|
31
|
+
{.information}
|
32
|
+
|
33
|
+
* Lists
|
34
|
+
* aren't
|
35
|
+
* difficult
|
36
|
+
* either.
|
37
|
+
|
38
|
+
[1]: http://someurl.com
|
39
|
+
|
40
|
+
|
41
|
+
[1]: http://maruku.rubyforge.org/
|
@@ -0,0 +1,37 @@
|
|
1
|
+
---
|
2
|
+
title: Webgen::ContentProcessor::RDiscount
|
3
|
+
---
|
4
|
+
## Description
|
5
|
+
|
6
|
+
This processor converts the content, which is assumed to be in Markdown markup, to HTML by using the
|
7
|
+
RDiscount library. This library is based on the C based discount library which provides very fast
|
8
|
+
Markdown processing. However, this processor does not support advanced features like the [Maruku
|
9
|
+
Markdown processor]({relocatable: maruku.html}) does.
|
10
|
+
|
11
|
+
> This extension is only available if you have installed the [rdiscount][1] library. The preferred
|
12
|
+
> way to do this is via Rubygems:
|
13
|
+
>
|
14
|
+
> gem install rdiscount
|
15
|
+
{.exclamation}
|
16
|
+
|
17
|
+
[1]: http://github.com/rtomayko/rdiscount
|
18
|
+
|
19
|
+
Example
|
20
|
+
-------
|
21
|
+
|
22
|
+
Here is a short sample of a text in Markdown markup:
|
23
|
+
|
24
|
+
# This a h1 header
|
25
|
+
|
26
|
+
You can just write *your* paragraphs here and
|
27
|
+
[link][1] them below. This is **nice** format!
|
28
|
+
|
29
|
+
> Citations are easy too.
|
30
|
+
> Really. And you can assign them attributes.
|
31
|
+
|
32
|
+
* Lists
|
33
|
+
* aren't
|
34
|
+
* difficult
|
35
|
+
* either.
|
36
|
+
|
37
|
+
[1]: http://someurl.com
|
@@ -0,0 +1,36 @@
|
|
1
|
+
---
|
2
|
+
title: Webgen::ContentProcessor::RDoc
|
3
|
+
---
|
4
|
+
## Description
|
5
|
+
|
6
|
+
This content processors converts content written in RDoc markup (the default documentation format
|
7
|
+
for Ruby source files, [reference][1]) to HTML.
|
8
|
+
|
9
|
+
> This extension needs the [new RDoc implementation][2] and is not compatible with the
|
10
|
+
> implementation included in the Ruby distribution. The preferred way to install the new
|
11
|
+
> implementation is via Rubygems:
|
12
|
+
>
|
13
|
+
> gem install rdoc
|
14
|
+
{.exclamation}
|
15
|
+
|
16
|
+
[1]: http://rdoc.rubyforge.org/rdoc/ "RDoc Reference"
|
17
|
+
[2]: http://rubyforge.org/projects/rdoc/ "New RDoc implementation"
|
18
|
+
|
19
|
+
## Example
|
20
|
+
|
21
|
+
Here is a short sample of a text in RDoc markup:
|
22
|
+
|
23
|
+
= This a h1 header
|
24
|
+
|
25
|
+
You can just write *your* paragraphs here and <a href="http://someurl.com">link</a> them below.
|
26
|
+
This is also a _nice_ format!
|
27
|
+
|
28
|
+
<blockquote class='information>
|
29
|
+
Citations are easy too.
|
30
|
+
Really. And you can assign them attributes.
|
31
|
+
</blockquote>
|
32
|
+
|
33
|
+
* Lists
|
34
|
+
* aren't
|
35
|
+
* difficult
|
36
|
+
* either.
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
title: Webgen::ContentProcessor::RedCloth
|
3
|
+
---
|
4
|
+
## Description
|
5
|
+
|
6
|
+
This processor converts the content, which is assumed to be in Textile markup, to HTML by using the
|
7
|
+
RedCloth library. For detailed information about Textile have a look at the [Textile Reference][1]!
|
8
|
+
|
9
|
+
> This extension is only available if you have installed the [redcloth][2] library. The preferred
|
10
|
+
> way to do this is via Rubygems:
|
11
|
+
>
|
12
|
+
> gem install RedCloth
|
13
|
+
{.exclamation}
|
14
|
+
|
15
|
+
|
16
|
+
Example
|
17
|
+
-------
|
18
|
+
|
19
|
+
Here is a short sample of a text in Textile markup:
|
20
|
+
|
21
|
+
h1(#myid). This a h1 header
|
22
|
+
|
23
|
+
You can just write *your* paragraphs here and
|
24
|
+
"link":http://someurl.com them below. This is also a
|
25
|
+
**nice** format!
|
26
|
+
|
27
|
+
<blockquote class='information>
|
28
|
+
Citations are easy too.
|
29
|
+
Really. And you can assign them attributes.
|
30
|
+
</blockquote>
|
31
|
+
|
32
|
+
* Lists
|
33
|
+
* aren't
|
34
|
+
* difficult
|
35
|
+
* either.
|
36
|
+
|
37
|
+
|
38
|
+
[1]: http://hobix.com/textile/
|
39
|
+
[2]: http://whytheluckystiff.net/ruby/redcloth/
|
@@ -0,0 +1,31 @@
|
|
1
|
+
---
|
2
|
+
title: Webgen::ContentProcessor::Sass
|
3
|
+
---
|
4
|
+
## Description
|
5
|
+
|
6
|
+
This processor converts the content, which is assumed to be in the Sass meta language, to valid CSS
|
7
|
+
using the Haml library. For detailed information about Sass have a look at the [Haml Homepage][1]!
|
8
|
+
|
9
|
+
> This extension is only available if you have installed the [haml][1] library. The preferred way to
|
10
|
+
> do this is via Rubygems:
|
11
|
+
>
|
12
|
+
> gem install haml
|
13
|
+
{.exclamation}
|
14
|
+
|
15
|
+
|
16
|
+
## Example
|
17
|
+
|
18
|
+
Here is a short sample of a text in the Sass meta language:
|
19
|
+
|
20
|
+
#main
|
21
|
+
:width 90%
|
22
|
+
p
|
23
|
+
:border-style solid
|
24
|
+
:border-color #00f
|
25
|
+
a
|
26
|
+
:font-weight bold
|
27
|
+
a:hover
|
28
|
+
:text-decoration underline
|
29
|
+
|
30
|
+
|
31
|
+
[1]: http://haml.hamptoncatlin.com/
|
@@ -0,0 +1,73 @@
|
|
1
|
+
---
|
2
|
+
title: Webgen::ContentProcessor::Tags
|
3
|
+
---
|
4
|
+
## Description
|
5
|
+
|
6
|
+
This processor provides an easy method for adding dynamic content to web pages. It uses so called
|
7
|
+
webgen tags to replace special markup constructs with dynamic content. This system allows webgen to
|
8
|
+
generate menus and breadcrumb trails, include files and much more. webgen already comes with many
|
9
|
+
tags that handle simple things, like including a file, to advanced things, like generating a
|
10
|
+
menu.
|
11
|
+
|
12
|
+
Each webgen tag is defined using a unique name and handled by a tag class. A tag can have zero or
|
13
|
+
more parameters some of which are mandatory. Tag parameters map directly to configuration options,
|
14
|
+
so you can temporarily (for the rendering of the tag) override some configuration options. Since
|
15
|
+
normally only the special configuration options for the tag itself are used, a shorter form can be
|
16
|
+
used for them: just remove the tag class name part (without the `Webgen::` prefix) from the
|
17
|
+
configuration option. For example, the relocatable tag handled by Webgen::Tag::Relocatable specifies
|
18
|
+
the configuration option `tag.relocatable.path` and the short name for it (when used as parameter
|
19
|
+
for the relocatable tag, not when used for other tags) is therefore just `path`. The supported
|
20
|
+
parameters (and if they are mandatory) are listed for each tag on its documentation page. The
|
21
|
+
default mandatory parameter can be specified in a special way, see the following section. When spe
|
22
|
+
|
23
|
+
When content is parsed and a webgen tag is encountered, the registered class for this tag is
|
24
|
+
called. If no class for a tag exists there are two possibilities: if a default tag class exists,
|
25
|
+
then this default class is called. Otherwise an error is raised.
|
26
|
+
|
27
|
+
For information on how to create such a tag classes have a look at the API documentation of the
|
28
|
+
class Webgen::Tag::Base.
|
29
|
+
|
30
|
+
|
31
|
+
## Syntax for webgen Tags {#syntax}
|
32
|
+
|
33
|
+
webgen tags are defined using a special markup construct which consists of the tag name, a parameter
|
34
|
+
part and a body part.
|
35
|
+
|
36
|
+
A tag can be specified in one of the following ways:
|
37
|
+
|
38
|
+
* The simplest form of a webgen tag just consists of the tag name itself. This form can only be used
|
39
|
+
if the tag does not have any mandatory parameters.
|
40
|
+
|
41
|
+
\{tagname:}
|
42
|
+
|
43
|
+
* If a plugin has only one mandatory parameter, there is a short-cut syntax for specifying its
|
44
|
+
value.
|
45
|
+
|
46
|
+
\{tagname: value}
|
47
|
+
|
48
|
+
* If a plugin has more than one mandatory parameter or if some default parameter values should be
|
49
|
+
overwritten, one needs to use the following general form.
|
50
|
+
|
51
|
+
\{tagname: {option: value, other_option: other_value}}
|
52
|
+
|
53
|
+
> The parameters defined using this syntax are actually specified using a hash in YAML
|
54
|
+
> markup. So you can use any valid YAML construct in the YAML hash definition.
|
55
|
+
{.information}
|
56
|
+
|
57
|
+
* Additionally, you can use a body part with any of the above forms. To specify that the tag has a
|
58
|
+
body part, just use two colons instead of one after the tag name and don't forget the closing
|
59
|
+
tag.
|
60
|
+
|
61
|
+
\{tagname::}Here comes the body{tagname}
|
62
|
+
|
63
|
+
Although you can always specify a body part, only some tags actually use it - the documentation
|
64
|
+
for each tag states if the body part is used or not.
|
65
|
+
|
66
|
+
Sometimes you need to specify something which looks like a webgen tag but should not be processed
|
67
|
+
like one. In such cases, you need to escape the tag with a backslash, like this:
|
68
|
+
|
69
|
+
\\\{tagname: {key:value}}
|
70
|
+
|
71
|
+
Another solution to this is to specify a general prefix for all webgen tags using the configuration
|
72
|
+
option `contentprocessor.tags.prefix`. Let's imagine that you set the prefix to `webgen:`; then this
|
73
|
+
content processor will only process webgen tags of the form `\{webgen:tagname: {key: value}}`.
|
@@ -0,0 +1,29 @@
|
|
1
|
+
contentprocessor/:
|
2
|
+
index_path: ~
|
3
|
+
|
4
|
+
contentprocessor/*:
|
5
|
+
template: ../contentprocessor.template
|
6
|
+
|
7
|
+
sourcehandler/:
|
8
|
+
index_path: ~
|
9
|
+
|
10
|
+
sourcehandler/*:
|
11
|
+
template: ../sourcehandler.template
|
12
|
+
|
13
|
+
tag/:
|
14
|
+
index_path: ~
|
15
|
+
|
16
|
+
tag/*:
|
17
|
+
template: ../tag.template
|
18
|
+
|
19
|
+
source/:
|
20
|
+
index_path: ~
|
21
|
+
|
22
|
+
source/*:
|
23
|
+
template: ../extensions.template
|
24
|
+
|
25
|
+
output/:
|
26
|
+
index_path: ~
|
27
|
+
|
28
|
+
output/*:
|
29
|
+
template: ../extensions.template
|
data/doc/extensions.page
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
---
|
2
|
+
title: Extensions
|
3
|
+
---
|
4
|
+
# Extension Listing
|
5
|
+
|
6
|
+
Following is a listing of all available extensions:
|
7
|
+
|
8
|
+
<%
|
9
|
+
pattern = /#{File.join(node.parent.absolute_lcn, '/')}(contentprocessor|output|source|sourcehandler|tag|)\//
|
10
|
+
context.content_node.tree.node_access[:alcn].select {|alcn, n| alcn =~ pattern}.sort.each do |alcn, n|
|
11
|
+
next if n.is_fragment?
|
12
|
+
%>
|
13
|
+
* <%= dest_node.link_to(n) %>
|
14
|
+
<%
|
15
|
+
end
|
16
|
+
%>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
--- pipeline:erb,tags,maruku,blocks
|
2
|
+
[Back]({relocatable: extensions.html}) to the extension listing.
|
3
|
+
{.backlink}
|
4
|
+
|
5
|
+
# {title:}
|
6
|
+
|
7
|
+
<% if (context[:chain][1] || context[:chain][0]).node_info[:page].blocks.has_key?('summary') %>
|
8
|
+
## Summary
|
9
|
+
|
10
|
+
<webgen:block name='summary' />
|
11
|
+
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<webgen:block name='content' />
|
15
|
+
|
16
|
+
[Back]({relocatable: extensions.html}) to the extension listing.
|
17
|
+
{.backlink}
|
data/doc/faq.page
ADDED
@@ -0,0 +1,214 @@
|
|
1
|
+
---
|
2
|
+
title: FAQ
|
3
|
+
---
|
4
|
+
# General Questions
|
5
|
+
|
6
|
+
* **webgen fails with an error after upgrading to a newer version - what to do?**
|
7
|
+
|
8
|
+
Delete the cache file and try again. The structure of the cache may not be valid anymore after a
|
9
|
+
version update. So it is always good to delete the cache after installing a new webgen version.
|
10
|
+
|
11
|
+
* **Why can I specify multiple blocks in a page/template file?**
|
12
|
+
|
13
|
+
This allows you to provide different content parts for one page. For example, image you have a
|
14
|
+
layout with a sidebar and you want to have page specific sidebar contents. The easiest way to
|
15
|
+
achieve that is to add a `sidebar` block to the page files that provide a page specific sidebar
|
16
|
+
content and conditionally include the `sidebar` block in your `default.template`, like this:
|
17
|
+
|
18
|
+
<%% if node.node_info[:page].blocks.has_key?('sidebar') %>
|
19
|
+
\<webgen:block name='sidebar' />
|
20
|
+
<%% end %>
|
21
|
+
|
22
|
+
* **What do I have to do to use the extensions?**
|
23
|
+
|
24
|
+
Nothing! Extensions are initialized and used automatically when needed. So, for example, if you
|
25
|
+
add a `my.feed` file to your website, the `Webgen::SourceHandler::Feed` extension gets
|
26
|
+
automatically used. The same is true for all types of extensions (source handler, content
|
27
|
+
processors, tags, ...).
|
28
|
+
|
29
|
+
* **Is there any way to add comments to my webgen website?**
|
30
|
+
|
31
|
+
Surely! There are several comment engines out there, however, the following two look very
|
32
|
+
promising:
|
33
|
+
|
34
|
+
* [JS-Kit](http://js-kit.com/comments/)
|
35
|
+
* [DISQUS](http://disqus.com)
|
36
|
+
|
37
|
+
# How to ...
|
38
|
+
|
39
|
+
This section provides quick answers and links to more information for the most commonly asked
|
40
|
+
questions.
|
41
|
+
|
42
|
+
### ... create a website?
|
43
|
+
|
44
|
+
Use the `webgen` command to create the needed directories
|
45
|
+
|
46
|
+
webgen create -t project -s andreas07 my_site
|
47
|
+
|
48
|
+
This will create a webgen website in the directory `my_site` using the specified template and style.
|
49
|
+
|
50
|
+
### ... set configuration options?
|
51
|
+
|
52
|
+
You can set any configuration options via the configuration file called `config.yaml`. For example,
|
53
|
+
say you want to set the option `website.link_to_current_page` to `true`, then you would add the
|
54
|
+
following to the configuration file:
|
55
|
+
|
56
|
+
website.link_to_current_page: true
|
57
|
+
|
58
|
+
There is a second possibility for webgen tags: you can set the options directly in the tag
|
59
|
+
definition, like this:
|
60
|
+
|
61
|
+
\{menu: {start_level: 2, min_levels: 3}}
|
62
|
+
|
63
|
+
And if you want to have complete control over the configuration options, you can use the file
|
64
|
+
`ext/init.rb`. For example, the following specifies that all page files should be in the menu by
|
65
|
+
default:
|
66
|
+
|
67
|
+
config = Webgen::WebsiteAccess.website.config
|
68
|
+
config['sourcehandler.default_meta_info']['Webgen::SourceHandler::Page']['in_menu'] = true
|
69
|
+
|
70
|
+
### ... change the default language?
|
71
|
+
|
72
|
+
To use, for example, German as the default language, put the following into the configuration file:
|
73
|
+
|
74
|
+
website.lang: de
|
75
|
+
|
76
|
+
The value needs to be a valid ISO-639-1/2 language code.
|
77
|
+
|
78
|
+
### ... use a different processing pipeline for page files?
|
79
|
+
|
80
|
+
If you want to change the processing pipeline (ie. how a page file get rendered), you need to add
|
81
|
+
the following to your configuration file:
|
82
|
+
|
83
|
+
default_processing_pipeline:
|
84
|
+
Page: erb,tags,textile,blocks
|
85
|
+
|
86
|
+
The `default_processing_pipeline` key is a special key which allows to directly set the processing
|
87
|
+
pipeline (instead of going through all the meta information).
|
88
|
+
|
89
|
+
If you just want to change the pipeline for one block, you can do it like this:
|
90
|
+
|
91
|
+
--- pipeline:erb,tags,textile,blocks
|
92
|
+
This is the content of the block
|
93
|
+
|
94
|
+
### ... set the default meta information for files created by a specific source handler?
|
95
|
+
|
96
|
+
Use the configuration file! For example, to change the meta information `in-menu` sothat it defaults
|
97
|
+
to `true` for all page files use the following in your configuration file:
|
98
|
+
|
99
|
+
default_meta_info:
|
100
|
+
Page:
|
101
|
+
inMenu: true
|
102
|
+
|
103
|
+
The key `default_meta_info` is a special key in the configuration file which allows to update the
|
104
|
+
default meta information for a source handler and not to substitute it.
|
105
|
+
|
106
|
+
### ... ignore files in the source directory?
|
107
|
+
|
108
|
+
This can be done using the `sourcehandler.ignore` configuration options. For example, to ignore all
|
109
|
+
files starting with `core`, you would put the following in the configuration file:
|
110
|
+
|
111
|
+
sourcehandler.ignore: [**/core*]
|
112
|
+
|
113
|
+
The value of this option has to be an array of path patterns. Be aware that this overwrites the
|
114
|
+
default setting.
|
115
|
+
|
116
|
+
### ... change the output name style?
|
117
|
+
|
118
|
+
You have several options of varying granularity:
|
119
|
+
|
120
|
+
* Set the meta information `output_path_style` for all source handlers:
|
121
|
+
|
122
|
+
default_meta_info:
|
123
|
+
:all:
|
124
|
+
output_path_style: [:parent, :cnbase, [., :lang], :ext]
|
125
|
+
|
126
|
+
* Set the meta information `output_path_style` for a specific source handler to only change the
|
127
|
+
output paths of this source handler (the page source handler in the following example):
|
128
|
+
|
129
|
+
default_meta_info:
|
130
|
+
Page:
|
131
|
+
output_path_style: [:parent, :cnbase, [., :lang], :ext]
|
132
|
+
|
133
|
+
* Add the meta information `output_path_style` to a single file via, for example, a meta information
|
134
|
+
backing file.
|
135
|
+
|
136
|
+
### ... modify the template chain?
|
137
|
+
|
138
|
+
To stop the template chain at a specific template or even at the page file itself, specify a
|
139
|
+
null template in the meta information, like this:
|
140
|
+
|
141
|
+
template: ~
|
142
|
+
|
143
|
+
To nest templates, you just need to specify the template, in which this template/page file should be
|
144
|
+
nested, in the meta information:
|
145
|
+
|
146
|
+
template: my_special.template
|
147
|
+
|
148
|
+
Be aware that if no `template` meta information is specified for a page or template file, the
|
149
|
+
template handler automatically searches for a default template in the directory and the parent
|
150
|
+
directories of the file!
|
151
|
+
|
152
|
+
### ... localize a directory name?
|
153
|
+
|
154
|
+
Just set the `routed_title` meta information on the correct localized directory index files.
|
155
|
+
|
156
|
+
### ... provide additional attributes on links to a file?
|
157
|
+
|
158
|
+
You can specify additional attributes for a link to a file by using the `link_attrs` meta
|
159
|
+
information. Take the following page file:
|
160
|
+
|
161
|
+
---
|
162
|
+
title: Tutorial
|
163
|
+
in_menu: true
|
164
|
+
link_attrs:
|
165
|
+
title: This is a rather large tutorial
|
166
|
+
accesskey: D
|
167
|
+
tabindex: 5
|
168
|
+
---
|
169
|
+
Yippieh, this is my tutorial!
|
170
|
+
|
171
|
+
When a link to this page is created, the specified attributes get additionally set on the link!
|
172
|
+
|
173
|
+
### ... add page specific sidebar content?
|
174
|
+
|
175
|
+
There are many ways to accomplish this, I will show only one way here using blocks. Add the
|
176
|
+
following to the sidebar part in your `default.template` (ensure that you haven't disabled `erb` in
|
177
|
+
the processing pipeline):
|
178
|
+
|
179
|
+
<%% if node.node_info[:page].blocks.has_key?('sidebar') %>
|
180
|
+
\<webgen:block name='sidebar' />
|
181
|
+
<%% end %>
|
182
|
+
|
183
|
+
This will include the contents of the block `sidebar` in the sidebar if such a block exists for a
|
184
|
+
page. You can then add a sidebar block to each page file which needs it. Following is such a sample
|
185
|
+
page file:
|
186
|
+
|
187
|
+
This is the main content block
|
188
|
+
--- name:sidebar
|
189
|
+
This is the sidebar block and everything in here goes to the sidebar!
|
190
|
+
|
191
|
+
### ... create XML output?
|
192
|
+
|
193
|
+
This can be achieved manually (by removing any markup processor in the processing pipeline of the
|
194
|
+
page file and then directly creating the XML elements) or by changing the processing pipeline to
|
195
|
+
include content processor `builder` which provides an easy way of programmatically creating an XML
|
196
|
+
compliant file. More information on this can be found on the documentation page of
|
197
|
+
Webgen::ContentProcessor::Builder!
|
198
|
+
|
199
|
+
### ... create a static menu?
|
200
|
+
|
201
|
+
You can use virtual nodes to define virtually any menu structure you like, including things like
|
202
|
+
having menu entries that point to the same page and links to external pages.
|
203
|
+
|
204
|
+
### ... use short menu title?
|
205
|
+
|
206
|
+
You can use a special of the meta information `link_attrs` to achieve that. Just use the following
|
207
|
+
in the meta information block of the page file for which you want a short menu title:
|
208
|
+
|
209
|
+
link_attrs:
|
210
|
+
:link_text: Short title
|
211
|
+
|
212
|
+
> Be aware that this changes not only how the page appears in a menu but also how it appears in
|
213
|
+
> breadcrumb trails and other links generated by webgen.
|
214
|
+
{.exclamation}
|