webgen 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. data/Rakefile +15 -4
  2. data/VERSION +1 -1
  3. data/data/webgen/webgui/controller/main.rb +1 -1
  4. data/data/webgen/website_skeleton/ext/init.rb +6 -0
  5. data/data/webgen/website_styles/1024px/src/default.css +188 -188
  6. data/data/webgen/website_styles/1024px/src/default.template +51 -51
  7. data/data/webgen/website_styles/andreas00/src/default.template +1 -1
  8. data/data/webgen/website_styles/andreas01/src/default.css +8 -8
  9. data/data/webgen/website_styles/andreas01/src/default.template +1 -1
  10. data/data/webgen/website_styles/andreas03/src/default.css +3 -3
  11. data/data/webgen/website_styles/andreas03/src/default.template +2 -2
  12. data/data/webgen/website_styles/andreas04/src/default.css +1 -1
  13. data/data/webgen/website_styles/andreas05/src/default.css +3 -3
  14. data/data/webgen/website_styles/andreas05/src/default.template +26 -26
  15. data/data/webgen/website_styles/andreas06/src/default.css +6 -6
  16. data/data/webgen/website_styles/andreas06/src/default.template +1 -1
  17. data/data/webgen/website_styles/andreas07/src/default.css +6 -6
  18. data/data/webgen/website_styles/andreas08/src/default.css +7 -7
  19. data/data/webgen/website_styles/andreas08/src/default.template +2 -2
  20. data/data/webgen/website_styles/andreas09/src/default.css +3 -3
  21. data/data/webgen/website_styles/andreas09/src/default.template +1 -1
  22. data/data/webgen/website_styles/simple/src/default.css +84 -84
  23. data/data/webgen/website_styles/simple/src/default.template +1 -1
  24. data/doc/index.page +27 -12
  25. data/doc/manual.page +52 -10
  26. data/doc/reference_configuration.page +108 -52
  27. data/doc/reference_metainfo.page +77 -2
  28. data/doc/sourcehandler/feed.page +82 -0
  29. data/doc/sourcehandler/metainfo.page +3 -2
  30. data/doc/sourcehandler/sitemap.page +46 -0
  31. data/doc/tag.template +2 -3
  32. data/doc/tag/breadcrumbtrail.page +11 -3
  33. data/doc/tag/menu.page +6 -4
  34. data/doc/tag/sitemap.page +31 -0
  35. data/doc/upgrading.page +67 -0
  36. data/lib/webgen/cli/utils.rb +4 -4
  37. data/lib/webgen/cli/webgui_command.rb +2 -1
  38. data/lib/webgen/common.rb +10 -0
  39. data/lib/webgen/common/sitemap.rb +76 -0
  40. data/lib/webgen/configuration.rb +64 -1
  41. data/lib/webgen/contentprocessor.rb +1 -1
  42. data/lib/webgen/contentprocessor/builder.rb +1 -1
  43. data/lib/webgen/contentprocessor/erb.rb +1 -1
  44. data/lib/webgen/contentprocessor/haml.rb +1 -1
  45. data/lib/webgen/contentprocessor/maruku.rb +1 -1
  46. data/lib/webgen/contentprocessor/sass.rb +1 -1
  47. data/lib/webgen/coreext.rb +10 -0
  48. data/lib/webgen/default_config.rb +35 -4
  49. data/lib/webgen/node.rb +12 -6
  50. data/lib/webgen/page.rb +1 -1
  51. data/lib/webgen/path.rb +1 -1
  52. data/lib/webgen/sourcehandler.rb +11 -6
  53. data/lib/webgen/sourcehandler/base.rb +5 -2
  54. data/lib/webgen/sourcehandler/feed.rb +121 -0
  55. data/lib/webgen/sourcehandler/metainfo.rb +22 -13
  56. data/lib/webgen/sourcehandler/page.rb +5 -3
  57. data/lib/webgen/sourcehandler/sitemap.rb +60 -0
  58. data/lib/webgen/sourcehandler/template.rb +5 -1
  59. data/lib/webgen/sourcehandler/virtual.rb +1 -0
  60. data/lib/webgen/tag.rb +1 -0
  61. data/lib/webgen/tag/breadcrumbtrail.rb +42 -10
  62. data/lib/webgen/tag/langbar.rb +1 -1
  63. data/lib/webgen/tag/menu.rb +10 -14
  64. data/lib/webgen/tag/sitemap.rb +42 -0
  65. data/lib/webgen/tree.rb +1 -1
  66. data/lib/webgen/version.rb +1 -1
  67. data/lib/webgen/website.rb +5 -6
  68. data/misc/default.css +6 -2
  69. data/test/helper.rb +13 -0
  70. data/test/test_common_sitemap.rb +56 -0
  71. data/test/test_configuration.rb +24 -0
  72. data/test/test_contentprocessor_maruku.rb +4 -1
  73. data/test/test_node.rb +4 -1
  74. data/test/test_page.rb +11 -5
  75. data/test/test_path.rb +10 -10
  76. data/test/test_sourcehandler_feed.rb +74 -0
  77. data/test/test_sourcehandler_metainfo.rb +26 -12
  78. data/test/test_sourcehandler_page.rb +1 -0
  79. data/test/test_sourcehandler_sitemap.rb +47 -0
  80. data/test/test_sourcehandler_template.rb +3 -0
  81. data/test/test_sourcehandler_virtual.rb +4 -1
  82. data/test/test_tag_breadcrumbtrail.rb +33 -23
  83. data/test/test_tag_menu.rb +24 -25
  84. data/test/test_tag_sitemap.rb +44 -0
  85. metadata +37 -4
data/Rakefile CHANGED
@@ -134,13 +134,22 @@ EOF
134
134
  s.version = Webgen::VERSION
135
135
  s.summary = SUMMARY
136
136
  s.description = DESCRIPTION
137
+ s.post_install_message = <<EOF
138
+ Thanks for choosing webgen! Here are some places to get you started:
139
+ * The webgen User Documentation at <http://webgen.rubyforge.org/documentation/index.html>
140
+ * The mailing list archive at <http://rubyforge.org/pipermail/webgen-users/>
141
+
142
+ Have a look at <http://webgen.rubyforge.org/news/index.html> for a list of changes!
143
+
144
+ Have fun!
145
+ EOF
137
146
 
138
147
  #### Dependencies, requirements and files
139
148
 
140
149
  s.files = PKG_FILES.to_a
141
150
  s.add_dependency('cmdparse', '~> 2.0.0')
142
151
  s.add_dependency('maruku', '>= 0.5.6')
143
- s.add_dependency('facets', '>= 2.4.1')
152
+ s.add_dependency('facets', '>= 2.4.3')
144
153
  s.add_dependency('rake', '>= 0.8.0')
145
154
  s.add_dependency('ramaze', '2008.06')
146
155
  s.add_dependency('launchy', '>= 0.3.2')
@@ -152,6 +161,7 @@ EOF
152
161
  s.add_development_dependency('builder', '>= 2.1.0')
153
162
  s.add_development_dependency('rdoc', '>= 2.0.0')
154
163
  s.add_development_dependency('coderay', '>= 0.7.4.215')
164
+ s.add_development_dependency('feedtools', '>= 0.2.29')
155
165
 
156
166
  s.require_path = 'lib'
157
167
 
@@ -229,14 +239,14 @@ EOF
229
239
  site.config_block = lambda do |config|
230
240
  config['sources'] += [['/documentation/', 'Webgen::Source::FileSystem', '../doc'],
231
241
  ['/', "Webgen::Source::FileSystem", '../misc', 'default.css'],
242
+ ['/documentation/', "Webgen::Source::FileSystem", '../misc', 'htmldoc.virtual'],
232
243
  ['/', "Webgen::Source::FileSystem", '../misc', 'images/**/*']]
233
244
  end
234
245
  end
235
- task :website => ['rdoc']
236
246
 
237
247
  desc "Upload the webgen website to Rubyforge"
238
- task :publish_website => [:website] do
239
- sh "rsync -avc --delete --exclude 'documentation/0.5.x' --exclude 'documentation/0.4.x' --exclude 'wiki' --exclude 'robots.txt' website/out/ gettalong@rubyforge.org:/var/www/gforge-projects/webgen/"
248
+ task :publish_website => ['rdoc', :website] do
249
+ sh "rsync -avc --delete --exclude documentation/rdoc --exclude 'documentation/0.5.x' --exclude 'documentation/0.4.x' --exclude 'wiki' --exclude 'robots.txt' website/out/ gettalong@rubyforge.org:/var/www/gforge-projects/webgen/"
240
250
  sh "rsync -avc --delete htmldoc/rdoc/ gettalong@rubyforge.org:/var/www/gforge-projects/webgen/documentation/rdoc"
241
251
  end
242
252
 
@@ -272,6 +282,7 @@ EOF
272
282
  EXCLUDED_FOR_TESTS=FileList.new(['lib/webgen/cli{*,**/*}', 'lib/webgen/version.rb',
273
283
  'lib/webgen/output.rb', 'lib/webgen/source.rb',
274
284
  'lib/webgen/tag.rb', 'lib/webgen/default_config.rb',
285
+ 'lib/webgen/common.rb'
275
286
  ])
276
287
 
277
288
  EXCLUDED_FOR_DOCU=FileList.new(['lib/webgen/cli{*,**/*}', 'lib/webgen/contentprocessor/context.rb',
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.2
1
+ 0.5.3
@@ -102,7 +102,7 @@ class MainController < Ramaze::Controller
102
102
  @styles = wm.styles.keys.select {|k| k =~ /^website-|[^-]+/ }.sort
103
103
 
104
104
  if !@cur_style.nil? && !@cur_template.nil?
105
- ws = Webgen::Website.new('unknown') do |config|
105
+ ws = Webgen::Website.new('unknown', nil) do |config|
106
106
  config['sources'] = [
107
107
  ['/', 'Webgen::Source::Resource', 'webgen-website-template-' + @cur_template, '/src/**', '/src'],
108
108
  ['/', 'Webgen::Source::Resource', 'webgen-website-style-' + @cur_style, '/src/**', '/src']
@@ -0,0 +1,6 @@
1
+ # = webgen extensions directory
2
+ #
3
+ # All init.rb files anywhere under this directory get automatically loaded on a webgen run. This
4
+ # allows you to add your own extensions to webgen or to modify webgen's core!
5
+ #
6
+ # If you don't need this feature you can savely delete this file and the directory in which it is!
@@ -1,188 +1,188 @@
1
- /* 1024px - An open source xhtml/css website template by Andreas Viklund - http://andreasviklund.com . Free to use in any way and for any purpose as long as the proper credits are given to the original designer.
2
-
3
- Version: 1.2, April 20, 2006 */
4
-
5
- /******** General tags ********/
6
- body{
7
- font:76% Verdana,Tahoma,Arial,sans-serif;
8
- background:#ffffff url(images/background.gif) top center repeat-y;
9
- color:#404040;
10
- line-height:1.2em;
11
- margin:0 auto;
12
- padding:0;
13
- }
14
-
15
- a, #sidebar .webgen-menu span {
16
- text-decoration:none;
17
- color:#4088b8;
18
- font-weight:bold;
19
- }
20
-
21
- a:hover{text-decoration:underline;}
22
- a img{border:0;}
23
- p{margin:0 0 18px 10px;}
24
- ul,ol,dl{font-size:0.9em; margin:2px 0 16px 35px;}
25
- ul ul,ol ol{margin:4px 0 4px 35px;}
26
-
27
- h1{
28
- font-size:4.2em;
29
- letter-spacing:-5px;
30
- margin:0 0 30px 25px;
31
- color:#4088b8;
32
- }
33
-
34
- h1 a{text-transform:none; color:#4088b8;}
35
-
36
- h2{
37
- font-size:1.4em;
38
- color:#4088b8;
39
- border-bottom:4px solid #dadada;
40
- padding:0 2px 2px 5px;
41
- margin:0 0 10px 0;
42
- letter-spacing:-1px;
43
- }
44
-
45
- h3{
46
- font-size:1.2em;
47
- font-weight:bold;
48
- color:#4088b8;
49
- border-bottom:1px solid #dadada;
50
- margin:10px 0 8px 0;
51
- padding:1px 2px 2px 3px;
52
- }
53
-
54
- blockquote{
55
- font-size:0.9em;
56
- border:1px solid #dadada;
57
- margin:20px 10px;
58
- padding:8px;
59
- }
60
-
61
- /******** Main wrap ********/
62
- #wrap{
63
- color:#404040;
64
- width:970px;
65
- margin:10px auto;
66
- padding:0;
67
- }
68
-
69
- #header{margin:0;}
70
-
71
- #header h1 {margin-top: -30px}
72
-
73
- #toplinks{text-align:right; padding:5px 2px 2px 3px;}
74
-
75
- #slogan{
76
- font-size:1.5em;
77
- color:#808080;
78
- font-weight:bold;
79
- letter-spacing:-1px;
80
- margin:15px 0px 20px 35px;
81
- line-height:1.2em;
82
- }
83
-
84
- /******** sidebar ********/
85
- #sidebar{
86
- float:left;
87
- width:195px;
88
- margin:0 0 5px 0;
89
- padding:1px 0 0 0;
90
- }
91
-
92
- #sidebar ul{
93
- list-style:none;
94
- font-size:0.9em;
95
- margin:0;
96
- padding:0 0 15px 10px;
97
- }
98
-
99
- #sidebar li{
100
- list-style:none;
101
- margin:0 0 4px 0;
102
- padding:0;
103
- }
104
-
105
- #sidebar li a, #sidebar li span {
106
- font-size:1.2em;
107
- font-weight:bold;
108
- padding:2px;
109
- }
110
-
111
- #sidebar ul ul{
112
- margin:4px 0 3px 15px;
113
- line-height:1.2em;
114
- padding:0;
115
- }
116
-
117
- #sidebar ul ul li a, #sidebar ul ul li span {font-weight:normal;}
118
- #sidebar h2{margin:3px 0px 8px 0px;}
119
-
120
- /******** Content variations ********/
121
- #content{
122
- line-height:1.5em;
123
- width:750px;
124
- float:right;
125
- text-align:left;
126
- margin:0;
127
- padding:0;
128
- }
129
-
130
- #contentalt{
131
- line-height:1.5em;
132
- width:750px;
133
- float:left;
134
- text-align:left;
135
- padding:0;
136
- margin-right:20px;
137
- }
138
-
139
- #content h3, #contentalt h3{margin:10px 0 8px;}
140
-
141
- /******** Footer ********/
142
- #footer{
143
- clear:both;
144
- text-align:right;
145
- color:#808080;
146
- font-size:0.9em;
147
- border-top:4px solid #dadada;
148
- margin:0 auto;
149
- padding:8px 0;
150
- line-height:1.6em;
151
- }
152
-
153
- #footer p{margin:0; padding:0;}
154
- #footer a{color:#808080;}
155
-
156
- /******** Various classes ********/
157
- .box{
158
- color:#ffffff;
159
- font-size:0.9em;
160
- background-color:#4088b8;
161
- border:1px solid #c8c8c8;
162
- line-height:1.3em;
163
- padding:5px 5px 5px 8px;
164
- }
165
-
166
- .box a{color:#f0f0f0;}
167
- .left{float:left; margin:0 15px 4px 0;}
168
- .right{float:right; margin:0 0 4px 15px;}
169
- .textright{text-align:right;}
170
- .readmore{text-align:right; margin:-10px 10px 12px 0;}
171
-
172
- .center{text-align:center;}
173
- .blue{color:#4088b8;}
174
- .big{font-size:1.3em;}
175
- .small{font-size:0.8em;}
176
- .bold{font-weight:bold;}
177
-
178
- .clear{clear:both;}
179
- .hide{display:none;}
180
- .fade{color:#c8c8c8;}
181
- .gray{color:#808080;}
182
-
183
- .photo{
184
- border:1px solid #bababa;
185
- padding:2px;
186
- background-color:#ffffff;
187
- margin:6px 18px 2px 5px;
188
- }
1
+ /* 1024px - An open source xhtml/css website template by Andreas Viklund - http://andreasviklund.com . Free to use in any way and for any purpose as long as the proper credits are given to the original designer.
2
+
3
+ Version: 1.2, April 20, 2006 */
4
+
5
+ /******** General tags ********/
6
+ body{
7
+ font:76% Verdana,Tahoma,Arial,sans-serif;
8
+ background:#ffffff url(images/background.gif) top center repeat-y;
9
+ color:#404040;
10
+ line-height:1.2em;
11
+ margin:0 auto;
12
+ padding:0;
13
+ }
14
+
15
+ a, #sidebar #menu span {
16
+ text-decoration:none;
17
+ color:#4088b8;
18
+ font-weight:bold;
19
+ }
20
+
21
+ a:hover{text-decoration:underline;}
22
+ a img{border:0;}
23
+ p{margin:0 0 18px 10px;}
24
+ ul,ol,dl{font-size:0.9em; margin:2px 0 16px 35px;}
25
+ ul ul,ol ol{margin:4px 0 4px 35px;}
26
+
27
+ h1{
28
+ font-size:4.2em;
29
+ letter-spacing:-5px;
30
+ margin:0 0 30px 25px;
31
+ color:#4088b8;
32
+ }
33
+
34
+ h1 a{text-transform:none; color:#4088b8;}
35
+
36
+ h2{
37
+ font-size:1.4em;
38
+ color:#4088b8;
39
+ border-bottom:4px solid #dadada;
40
+ padding:0 2px 2px 5px;
41
+ margin:0 0 10px 0;
42
+ letter-spacing:-1px;
43
+ }
44
+
45
+ h3{
46
+ font-size:1.2em;
47
+ font-weight:bold;
48
+ color:#4088b8;
49
+ border-bottom:1px solid #dadada;
50
+ margin:10px 0 8px 0;
51
+ padding:1px 2px 2px 3px;
52
+ }
53
+
54
+ blockquote{
55
+ font-size:0.9em;
56
+ border:1px solid #dadada;
57
+ margin:20px 10px;
58
+ padding:8px;
59
+ }
60
+
61
+ /******** Main wrap ********/
62
+ #wrap{
63
+ color:#404040;
64
+ width:970px;
65
+ margin:10px auto;
66
+ padding:0;
67
+ }
68
+
69
+ #header{margin:0;}
70
+
71
+ #header h1 {margin-top: -30px}
72
+
73
+ #toplinks{text-align:right; padding:5px 2px 2px 3px;}
74
+
75
+ #slogan{
76
+ font-size:1.5em;
77
+ color:#808080;
78
+ font-weight:bold;
79
+ letter-spacing:-1px;
80
+ margin:15px 0px 20px 35px;
81
+ line-height:1.2em;
82
+ }
83
+
84
+ /******** sidebar ********/
85
+ #sidebar{
86
+ float:left;
87
+ width:195px;
88
+ margin:0 0 5px 0;
89
+ padding:1px 0 0 0;
90
+ }
91
+
92
+ #sidebar ul{
93
+ list-style:none;
94
+ font-size:0.9em;
95
+ margin:0;
96
+ padding:0 0 15px 10px;
97
+ }
98
+
99
+ #sidebar li{
100
+ list-style:none;
101
+ margin:0 0 4px 0;
102
+ padding:0;
103
+ }
104
+
105
+ #sidebar li a, #sidebar li span {
106
+ font-size:1.2em;
107
+ font-weight:bold;
108
+ padding:2px;
109
+ }
110
+
111
+ #sidebar ul ul{
112
+ margin:4px 0 3px 15px;
113
+ line-height:1.2em;
114
+ padding:0;
115
+ }
116
+
117
+ #sidebar ul ul li a, #sidebar ul ul li span {font-weight:normal;}
118
+ #sidebar h2{margin:3px 0px 8px 0px;}
119
+
120
+ /******** Content variations ********/
121
+ #content{
122
+ line-height:1.5em;
123
+ width:750px;
124
+ float:right;
125
+ text-align:left;
126
+ margin:0;
127
+ padding:0;
128
+ }
129
+
130
+ #contentalt{
131
+ line-height:1.5em;
132
+ width:750px;
133
+ float:left;
134
+ text-align:left;
135
+ padding:0;
136
+ margin-right:20px;
137
+ }
138
+
139
+ #content h3, #contentalt h3{margin:10px 0 8px;}
140
+
141
+ /******** Footer ********/
142
+ #footer{
143
+ clear:both;
144
+ text-align:right;
145
+ color:#808080;
146
+ font-size:0.9em;
147
+ border-top:4px solid #dadada;
148
+ margin:0 auto;
149
+ padding:8px 0;
150
+ line-height:1.6em;
151
+ }
152
+
153
+ #footer p{margin:0; padding:0;}
154
+ #footer a{color:#808080;}
155
+
156
+ /******** Various classes ********/
157
+ .box{
158
+ color:#ffffff;
159
+ font-size:0.9em;
160
+ background-color:#4088b8;
161
+ border:1px solid #c8c8c8;
162
+ line-height:1.3em;
163
+ padding:5px 5px 5px 8px;
164
+ }
165
+
166
+ .box a{color:#f0f0f0;}
167
+ .left{float:left; margin:0 15px 4px 0;}
168
+ .right{float:right; margin:0 0 4px 15px;}
169
+ .textright{text-align:right;}
170
+ .readmore{text-align:right; margin:-10px 10px 12px 0;}
171
+
172
+ .center{text-align:center;}
173
+ .blue{color:#4088b8;}
174
+ .big{font-size:1.3em;}
175
+ .small{font-size:0.8em;}
176
+ .bold{font-weight:bold;}
177
+
178
+ .clear{clear:both;}
179
+ .hide{display:none;}
180
+ .fade{color:#c8c8c8;}
181
+ .gray{color:#808080;}
182
+
183
+ .photo{
184
+ border:1px solid #bababa;
185
+ padding:2px;
186
+ background-color:#ffffff;
187
+ margin:6px 18px 2px 5px;
188
+ }