TwP-webby 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (174) hide show
  1. data/History.txt +176 -0
  2. data/Manifest.txt +173 -0
  3. data/README.txt +92 -0
  4. data/Rakefile +50 -0
  5. data/bin/webby +8 -0
  6. data/bin/webby-gen +8 -0
  7. data/examples/blog/Sitefile +7 -0
  8. data/examples/blog/tasks/blog.rake +72 -0
  9. data/examples/blog/templates/atom_feed.erb +40 -0
  10. data/examples/blog/templates/blog/month.erb +22 -0
  11. data/examples/blog/templates/blog/post.erb +16 -0
  12. data/examples/blog/templates/blog/year.erb +22 -0
  13. data/examples/presentation/Sitefile +10 -0
  14. data/examples/presentation/content/css/uv/twilight.css +137 -0
  15. data/examples/presentation/content/presentation/_sample_code.txt +10 -0
  16. data/examples/presentation/content/presentation/index.txt +63 -0
  17. data/examples/presentation/content/presentation/s5/blank.gif +0 -0
  18. data/examples/presentation/content/presentation/s5/bodybg.gif +0 -0
  19. data/examples/presentation/content/presentation/s5/framing.css +23 -0
  20. data/examples/presentation/content/presentation/s5/iepngfix.htc +42 -0
  21. data/examples/presentation/content/presentation/s5/opera.css +7 -0
  22. data/examples/presentation/content/presentation/s5/outline.css +15 -0
  23. data/examples/presentation/content/presentation/s5/pretty.css +86 -0
  24. data/examples/presentation/content/presentation/s5/print.css +1 -0
  25. data/examples/presentation/content/presentation/s5/s5-core.css +9 -0
  26. data/examples/presentation/content/presentation/s5/slides.css +3 -0
  27. data/examples/presentation/content/presentation/s5/slides.js +553 -0
  28. data/examples/presentation/layouts/presentation.txt +43 -0
  29. data/examples/presentation/templates/_code_partial.erb +13 -0
  30. data/examples/presentation/templates/presentation.erb +40 -0
  31. data/examples/tumblog/Sitefile +9 -0
  32. data/examples/tumblog/content/css/tumblog.css +308 -0
  33. data/examples/tumblog/content/images/tumblog/permalink.gif +0 -0
  34. data/examples/tumblog/content/images/tumblog/rss.gif +0 -0
  35. data/examples/tumblog/content/tumblog/200806/the-noble-chicken/index.txt +12 -0
  36. data/examples/tumblog/content/tumblog/200807/historical-perspectives-on-the-classic-chicken-joke/index.txt +12 -0
  37. data/examples/tumblog/content/tumblog/200807/mad-city-chickens/index.txt +10 -0
  38. data/examples/tumblog/content/tumblog/200807/the-wisdom-of-the-dutch/index.txt +11 -0
  39. data/examples/tumblog/content/tumblog/200807/up-a-tree/index.txt +13 -0
  40. data/examples/tumblog/content/tumblog/index.txt +37 -0
  41. data/examples/tumblog/content/tumblog/rss.txt +37 -0
  42. data/examples/tumblog/layouts/tumblog/default.txt +44 -0
  43. data/examples/tumblog/layouts/tumblog/post.txt +15 -0
  44. data/examples/tumblog/lib/tumblog_helper.rb +32 -0
  45. data/examples/tumblog/tasks/tumblog.rake +30 -0
  46. data/examples/tumblog/templates/atom_feed.erb +40 -0
  47. data/examples/tumblog/templates/tumblog/conversation.erb +12 -0
  48. data/examples/tumblog/templates/tumblog/link.erb +10 -0
  49. data/examples/tumblog/templates/tumblog/photo.erb +13 -0
  50. data/examples/tumblog/templates/tumblog/post.erb +12 -0
  51. data/examples/tumblog/templates/tumblog/quote.erb +11 -0
  52. data/examples/webby/Sitefile +19 -0
  53. data/examples/webby/content/communicate/index.txt +28 -0
  54. data/examples/webby/content/css/background.gif +0 -0
  55. data/examples/webby/content/css/blueprint/print.css +76 -0
  56. data/examples/webby/content/css/blueprint/screen.css +696 -0
  57. data/examples/webby/content/css/coderay.css +96 -0
  58. data/examples/webby/content/css/site.css +196 -0
  59. data/examples/webby/content/css/uv/twilight.css +137 -0
  60. data/examples/webby/content/index.txt +37 -0
  61. data/examples/webby/content/learn/index.txt +28 -0
  62. data/examples/webby/content/reference/index.txt +204 -0
  63. data/examples/webby/content/release-notes/rel-0-9-0/index.txt +73 -0
  64. data/examples/webby/content/robots.txt +6 -0
  65. data/examples/webby/content/script/jquery.corner.js +152 -0
  66. data/examples/webby/content/script/jquery.js +31 -0
  67. data/examples/webby/content/sitemap.txt +31 -0
  68. data/examples/webby/content/tips_and_tricks/index.txt +96 -0
  69. data/examples/webby/content/tutorial/index.txt +131 -0
  70. data/examples/webby/content/user-manual/index.txt +419 -0
  71. data/examples/webby/layouts/default.txt +49 -0
  72. data/examples/webby/templates/page.erb +10 -0
  73. data/examples/website/Sitefile +7 -0
  74. data/examples/website/content/css/blueprint/License.txt +21 -0
  75. data/examples/website/content/css/blueprint/Readme.txt +100 -0
  76. data/examples/website/content/css/blueprint/compressed/print.css +76 -0
  77. data/examples/website/content/css/blueprint/compressed/screen.css +696 -0
  78. data/examples/website/content/css/blueprint/lib/forms.css +45 -0
  79. data/examples/website/content/css/blueprint/lib/grid.css +193 -0
  80. data/examples/website/content/css/blueprint/lib/grid.png +0 -0
  81. data/examples/website/content/css/blueprint/lib/ie.css +30 -0
  82. data/examples/website/content/css/blueprint/lib/reset.css +39 -0
  83. data/examples/website/content/css/blueprint/lib/typography.css +116 -0
  84. data/examples/website/content/css/blueprint/plugins/buttons/Readme +31 -0
  85. data/examples/website/content/css/blueprint/plugins/buttons/buttons.css +97 -0
  86. data/examples/website/content/css/blueprint/plugins/buttons/icons/cross.png +0 -0
  87. data/examples/website/content/css/blueprint/plugins/buttons/icons/key.png +0 -0
  88. data/examples/website/content/css/blueprint/plugins/buttons/icons/tick.png +0 -0
  89. data/examples/website/content/css/blueprint/plugins/css-classes/Readme +14 -0
  90. data/examples/website/content/css/blueprint/plugins/css-classes/css-classes.css +24 -0
  91. data/examples/website/content/css/blueprint/plugins/fancy-type/Readme +22 -0
  92. data/examples/website/content/css/blueprint/plugins/fancy-type/fancy-type-compressed.css +5 -0
  93. data/examples/website/content/css/blueprint/plugins/fancy-type/fancy-type.css +74 -0
  94. data/examples/website/content/css/blueprint/print.css +68 -0
  95. data/examples/website/content/css/blueprint/screen.css +22 -0
  96. data/examples/website/content/css/coderay.css +111 -0
  97. data/examples/website/content/css/site.css +67 -0
  98. data/examples/website/content/index.txt +19 -0
  99. data/examples/website/layouts/default.txt +58 -0
  100. data/examples/website/lib/breadcrumbs.rb +28 -0
  101. data/examples/website/templates/_partial.erb +10 -0
  102. data/examples/website/templates/page.erb +18 -0
  103. data/examples/website/templates/presentation.erb +40 -0
  104. data/lib/webby/apps/generator.rb +283 -0
  105. data/lib/webby/apps/main.rb +221 -0
  106. data/lib/webby/apps.rb +12 -0
  107. data/lib/webby/auto_builder.rb +83 -0
  108. data/lib/webby/builder.rb +183 -0
  109. data/lib/webby/core_ext/enumerable.rb +11 -0
  110. data/lib/webby/core_ext/hash.rb +28 -0
  111. data/lib/webby/core_ext/kernel.rb +21 -0
  112. data/lib/webby/core_ext/string.rb +163 -0
  113. data/lib/webby/core_ext/time.rb +9 -0
  114. data/lib/webby/filters/basepath.rb +97 -0
  115. data/lib/webby/filters/erb.rb +9 -0
  116. data/lib/webby/filters/haml.rb +18 -0
  117. data/lib/webby/filters/markdown.rb +16 -0
  118. data/lib/webby/filters/outline.rb +309 -0
  119. data/lib/webby/filters/sass.rb +17 -0
  120. data/lib/webby/filters/slides.rb +56 -0
  121. data/lib/webby/filters/textile.rb +16 -0
  122. data/lib/webby/filters/tidy.rb +76 -0
  123. data/lib/webby/filters.rb +91 -0
  124. data/lib/webby/helpers/capture_helper.rb +141 -0
  125. data/lib/webby/helpers/coderay_helper.rb +69 -0
  126. data/lib/webby/helpers/graphviz_helper.rb +136 -0
  127. data/lib/webby/helpers/tag_helper.rb +65 -0
  128. data/lib/webby/helpers/tex_img_helper.rb +133 -0
  129. data/lib/webby/helpers/ultraviolet_helper.rb +63 -0
  130. data/lib/webby/helpers/url_helper.rb +235 -0
  131. data/lib/webby/helpers.rb +30 -0
  132. data/lib/webby/link_validator.rb +152 -0
  133. data/lib/webby/renderer.rb +379 -0
  134. data/lib/webby/resources/db.rb +251 -0
  135. data/lib/webby/resources/file.rb +221 -0
  136. data/lib/webby/resources/layout.rb +63 -0
  137. data/lib/webby/resources/page.rb +118 -0
  138. data/lib/webby/resources/partial.rb +79 -0
  139. data/lib/webby/resources/resource.rb +160 -0
  140. data/lib/webby/resources/static.rb +52 -0
  141. data/lib/webby/resources.rb +96 -0
  142. data/lib/webby/stelan/mktemp.rb +135 -0
  143. data/lib/webby/stelan/paginator.rb +150 -0
  144. data/lib/webby/stelan/spawner.rb +339 -0
  145. data/lib/webby/tasks/build.rake +27 -0
  146. data/lib/webby/tasks/create.rake +22 -0
  147. data/lib/webby/tasks/deploy.rake +22 -0
  148. data/lib/webby/tasks/growl.rake +15 -0
  149. data/lib/webby/tasks/heel.rake +28 -0
  150. data/lib/webby/tasks/validate.rake +19 -0
  151. data/lib/webby.rb +227 -0
  152. data/spec/core_ext/hash_spec.rb +47 -0
  153. data/spec/core_ext/string_spec.rb +110 -0
  154. data/spec/core_ext/time_spec.rb +19 -0
  155. data/spec/spec.opts +1 -0
  156. data/spec/spec_helper.rb +14 -0
  157. data/spec/webby/apps/generator_spec.rb +111 -0
  158. data/spec/webby/apps/main_spec.rb +75 -0
  159. data/spec/webby/helpers/capture_helper_spec.rb +56 -0
  160. data/spec/webby/resources/file_spec.rb +104 -0
  161. data/spec/webby/resources_spec.rb +17 -0
  162. data/tasks/ann.rake +81 -0
  163. data/tasks/bones.rake +21 -0
  164. data/tasks/gem.rake +126 -0
  165. data/tasks/git.rake +41 -0
  166. data/tasks/manifest.rake +49 -0
  167. data/tasks/notes.rake +28 -0
  168. data/tasks/post_load.rake +39 -0
  169. data/tasks/rdoc.rake +51 -0
  170. data/tasks/rubyforge.rake +57 -0
  171. data/tasks/setup.rb +268 -0
  172. data/tasks/spec.rake +55 -0
  173. data/tasks/website.rake +38 -0
  174. metadata +289 -0
data/History.txt ADDED
@@ -0,0 +1,176 @@
1
+ == 0.9.0 / 2008-08-25
2
+
3
+ * 2 major enhancements
4
+ - The "rake" command line tool has been replaced by the "webby"
5
+ command line tool for day to day site tasks
6
+ - Now using the "rdiscount" gem for markdown syntax
7
+ * 4 minor enhancements
8
+ - Layouts can exist in subdirectories of the layouts folder
9
+ - Addition of a "tumblog" template
10
+ - Addition of a sitemap file (Ana Nelson)
11
+ - Updated to version 6.4.2 of ImageMagick for tex2img conversions
12
+ * 5 bug fixes
13
+ - Better error message when an unkonwn filter is given
14
+ - Table of contents generation bug
15
+ - Failing to clean out the "content_for" cache when doing a
16
+ multi-page render
17
+ - Explicitly loading the RedCloth gem
18
+ - Handling exceptions from system calls on the Windows platform
19
+
20
+ == 0.8.4 / 2008-06-03
21
+
22
+ * 1 minor improvement
23
+ - Global defaults for HAML and SASS [Dag Odenhall]
24
+ * 1 bug fix
25
+ - Added the blog templates to the package
26
+
27
+ == 0.8.3 / 2008-06-02
28
+
29
+ * 2 major enhancements
30
+ - Added blogging support
31
+ - Added S5 slide presentation support
32
+ * 6 minor enhancements
33
+ - Changed the arguments to the DB#find method
34
+ - Added locals support for page templates
35
+ - Updated atom feed generation template
36
+ - Partials now support local variables when rendering
37
+ - Can guard rendering results from processing by subsequent filters
38
+ (useful when rendering partials or embedding other pages)
39
+ - Support for "content_for" style captures [M@ McCray]
40
+ * 5 bug fixes
41
+ - Fixed reference to an non-existent Error class
42
+ - Basepath filter now handles XML files properly
43
+ - Removed the "--delete" flag from the rsync options [Denis Defreyne]
44
+ - Fixed a nil cursor bug in the rendering filter stack
45
+ - Recursive find now works from the root content folder (bug 20281)
46
+
47
+ == 0.8.2 / 2008-03-12
48
+
49
+ * 2 bug fixes
50
+ - Fixed an error when paginating on an index page
51
+ - Fixed an error where leading and trailing whitespace was being
52
+ stripped from syntax highlighted code blocks
53
+
54
+ == 0.8.1 / 2008-03-09
55
+
56
+ * 2 major enhancement
57
+ - Added support for UltraViolet syntax highlighting
58
+ (code provided by Guillaume Carbonneau)
59
+ - Added rake tasks to validate the hyperlinks for the HTML files
60
+ in the output directory
61
+ * 2 minor enhancements
62
+ - Improved error handling and reporting during the build process
63
+ - Added site defaults for the helpers (coderay, graphviv, latex,
64
+ etc.)
65
+ * 1 bug fix
66
+ - Fixed an error with the prev / next calls in the paginator and
67
+ rendering links to those pages
68
+
69
+ == 0.8.0 / 2008-02-28
70
+
71
+ * 3 major enhancements
72
+ - Added support for partials
73
+ - Refactored the coderay and graphviz filters into helper methods
74
+ accessible from ERB
75
+ - Added support for embedding LaTeX mathematical equations
76
+ * 3 minor enhancements
77
+ - Added a template file for creating Atom feeds
78
+ - The SITE configuration is available in pages and layouts as
79
+ the @config variable
80
+ - Can specify the port the Heel webserver starts on using the
81
+ SITE.heel_port option in the Rakefile
82
+ * 2 bug fixes
83
+ - When creating pages in directory mode the full page path was
84
+ not being created
85
+ - Read only files were being created in the output folder
86
+ preventing them from being overwritten if changed
87
+
88
+ == 0.7.4 / 2008-02-15
89
+
90
+ * 3 minor enhancements
91
+ - Added "limit" and "sort_by" options to the pages find method
92
+ - Removed dependency on RedCloth for outline generation
93
+ - Added some more options for outline generation, numbering, and
94
+ table of contents generation
95
+ * 1 bug fix
96
+ - Fixed incompatibility with the new logging library
97
+
98
+ == 0.7.3 / 2008-02-05
99
+
100
+ * 2 bug fixes
101
+ - The setup.rb task now requires rubygems in case it is not in the
102
+ user's rubyopt
103
+ - Fixed file line endings on Windows when creating a new site
104
+
105
+ == 0.7.2 / 2008-02-02
106
+
107
+ * 4 minor enhancements
108
+ - Created a URI base path rewriter filter
109
+ - Create an outline filter for generating table of contents
110
+ - Pages can be created as files or as directories
111
+ - The @pages find method now recurses into sub-directories
112
+ * 3 bug fixes
113
+ - Fixed a bug in the graphviz filter where the wrong map ID was
114
+ being generated
115
+ - Now passing the binding of the Renderer to the HAML filter
116
+ (this makes the @page, @pages availabe in HAML pages)
117
+ - The created_at attribute was not being created as a YAML
118
+ time object
119
+
120
+ == 0.7.1 / 2008-01-03
121
+
122
+ * 2 bug fixes
123
+ - No longer appending a '.' to files without an extension (like .htaccess)
124
+ (patch supplied by Stephen Duncan)
125
+ - Fixed a "No such file or directory" error when creating pages
126
+ from templates
127
+
128
+ == 0.7.0 / 2008-01-01
129
+
130
+ * 1 major enhancement
131
+ - Refactored how the filters are handled (thanks Bruce Williams)
132
+ * 2 minor enhancements
133
+ - Added helper methods for URL and anchor generation
134
+ - Added rake task to delete the generated website
135
+ * 2 bug fixes
136
+ - Fixed a bug arising from the order of the logger creation
137
+ - Removed the file extension form the page defaults
138
+ (should be set in the layout or the page itself)
139
+
140
+ == 0.6.0 / 2007-12-04
141
+
142
+ * Added support for embedded graphviz images and image maps
143
+ * Tidy can be used as a filter to format HTML and check for errors
144
+ * Simplified coderay when used with textile
145
+
146
+ == 0.5.1 / 2007-11-29
147
+
148
+ * Growl notifications now work on Leopard / Tiger
149
+ * Fixed a few things for compatibility with Ruby 1.9
150
+
151
+ == 0.5.0 / 2007-11-26
152
+
153
+ * Launching heel now works on Windows boxen
154
+ * Now using "logging" gem to output build status
155
+ * Updated find routine for the pages DB
156
+ * First whack at pagination support
157
+
158
+ == 0.4.0 / 2007-09-18
159
+
160
+ * Updated the Blueprint CSS stylesheets to version 0.5
161
+ * Updating documentation and comments
162
+
163
+ == 0.3.0 / 2007-09-17
164
+
165
+ * Added support for CodeRay syntax highlighting
166
+
167
+ == 0.2.0 / 2007-08-28
168
+
169
+ * Updated rake tasks for website deployment
170
+ * Can use 'heel' and 'launchy' for viewing websites
171
+ * Webby executable can update rake tasks for existing websites
172
+ * Added more rdoc documentation to classes
173
+
174
+ == 0.1.0 / 2007-08-22
175
+
176
+ * Birthday!
data/Manifest.txt ADDED
@@ -0,0 +1,173 @@
1
+ History.txt
2
+ Manifest.txt
3
+ README.txt
4
+ Rakefile
5
+ bin/webby
6
+ bin/webby-gen
7
+ examples/blog/Sitefile
8
+ examples/blog/tasks/blog.rake
9
+ examples/blog/templates/atom_feed.erb
10
+ examples/blog/templates/blog/month.erb
11
+ examples/blog/templates/blog/post.erb
12
+ examples/blog/templates/blog/year.erb
13
+ examples/presentation/Sitefile
14
+ examples/presentation/content/css/uv/twilight.css
15
+ examples/presentation/content/presentation/_sample_code.txt
16
+ examples/presentation/content/presentation/index.txt
17
+ examples/presentation/content/presentation/s5/blank.gif
18
+ examples/presentation/content/presentation/s5/bodybg.gif
19
+ examples/presentation/content/presentation/s5/framing.css
20
+ examples/presentation/content/presentation/s5/iepngfix.htc
21
+ examples/presentation/content/presentation/s5/opera.css
22
+ examples/presentation/content/presentation/s5/outline.css
23
+ examples/presentation/content/presentation/s5/pretty.css
24
+ examples/presentation/content/presentation/s5/print.css
25
+ examples/presentation/content/presentation/s5/s5-core.css
26
+ examples/presentation/content/presentation/s5/slides.css
27
+ examples/presentation/content/presentation/s5/slides.js
28
+ examples/presentation/layouts/presentation.txt
29
+ examples/presentation/templates/_code_partial.erb
30
+ examples/presentation/templates/presentation.erb
31
+ examples/tumblog/Sitefile
32
+ examples/tumblog/content/css/tumblog.css
33
+ examples/tumblog/content/images/tumblog/permalink.gif
34
+ examples/tumblog/content/images/tumblog/rss.gif
35
+ examples/tumblog/content/tumblog/200806/the-noble-chicken/index.txt
36
+ examples/tumblog/content/tumblog/200807/historical-perspectives-on-the-classic-chicken-joke/index.txt
37
+ examples/tumblog/content/tumblog/200807/mad-city-chickens/index.txt
38
+ examples/tumblog/content/tumblog/200807/the-wisdom-of-the-dutch/index.txt
39
+ examples/tumblog/content/tumblog/200807/up-a-tree/index.txt
40
+ examples/tumblog/content/tumblog/index.txt
41
+ examples/tumblog/content/tumblog/rss.txt
42
+ examples/tumblog/layouts/tumblog/default.txt
43
+ examples/tumblog/layouts/tumblog/post.txt
44
+ examples/tumblog/lib/tumblog_helper.rb
45
+ examples/tumblog/tasks/tumblog.rake
46
+ examples/tumblog/templates/atom_feed.erb
47
+ examples/tumblog/templates/tumblog/conversation.erb
48
+ examples/tumblog/templates/tumblog/link.erb
49
+ examples/tumblog/templates/tumblog/photo.erb
50
+ examples/tumblog/templates/tumblog/post.erb
51
+ examples/tumblog/templates/tumblog/quote.erb
52
+ examples/webby/Sitefile
53
+ examples/webby/content/communicate/index.txt
54
+ examples/webby/content/css/background.gif
55
+ examples/webby/content/css/blueprint/print.css
56
+ examples/webby/content/css/blueprint/screen.css
57
+ examples/webby/content/css/coderay.css
58
+ examples/webby/content/css/site.css
59
+ examples/webby/content/css/uv/twilight.css
60
+ examples/webby/content/index.txt
61
+ examples/webby/content/learn/index.txt
62
+ examples/webby/content/reference/index.txt
63
+ examples/webby/content/release-notes/rel-0-9-0/index.txt
64
+ examples/webby/content/robots.txt
65
+ examples/webby/content/script/jquery.corner.js
66
+ examples/webby/content/script/jquery.js
67
+ examples/webby/content/sitemap.txt
68
+ examples/webby/content/tips_and_tricks/index.txt
69
+ examples/webby/content/tutorial/index.txt
70
+ examples/webby/content/user-manual/index.txt
71
+ examples/webby/layouts/default.txt
72
+ examples/webby/templates/page.erb
73
+ examples/website/Sitefile
74
+ examples/website/content/css/blueprint/License.txt
75
+ examples/website/content/css/blueprint/Readme.txt
76
+ examples/website/content/css/blueprint/compressed/print.css
77
+ examples/website/content/css/blueprint/compressed/screen.css
78
+ examples/website/content/css/blueprint/lib/forms.css
79
+ examples/website/content/css/blueprint/lib/grid.css
80
+ examples/website/content/css/blueprint/lib/grid.png
81
+ examples/website/content/css/blueprint/lib/ie.css
82
+ examples/website/content/css/blueprint/lib/reset.css
83
+ examples/website/content/css/blueprint/lib/typography.css
84
+ examples/website/content/css/blueprint/plugins/buttons/Readme
85
+ examples/website/content/css/blueprint/plugins/buttons/buttons.css
86
+ examples/website/content/css/blueprint/plugins/buttons/icons/cross.png
87
+ examples/website/content/css/blueprint/plugins/buttons/icons/key.png
88
+ examples/website/content/css/blueprint/plugins/buttons/icons/tick.png
89
+ examples/website/content/css/blueprint/plugins/css-classes/Readme
90
+ examples/website/content/css/blueprint/plugins/css-classes/css-classes.css
91
+ examples/website/content/css/blueprint/plugins/fancy-type/Readme
92
+ examples/website/content/css/blueprint/plugins/fancy-type/fancy-type-compressed.css
93
+ examples/website/content/css/blueprint/plugins/fancy-type/fancy-type.css
94
+ examples/website/content/css/blueprint/print.css
95
+ examples/website/content/css/blueprint/screen.css
96
+ examples/website/content/css/coderay.css
97
+ examples/website/content/css/site.css
98
+ examples/website/content/index.txt
99
+ examples/website/layouts/default.txt
100
+ examples/website/lib/breadcrumbs.rb
101
+ examples/website/templates/_partial.erb
102
+ examples/website/templates/page.erb
103
+ examples/website/templates/presentation.erb
104
+ lib/webby.rb
105
+ lib/webby/apps.rb
106
+ lib/webby/apps/generator.rb
107
+ lib/webby/apps/main.rb
108
+ lib/webby/auto_builder.rb
109
+ lib/webby/builder.rb
110
+ lib/webby/core_ext/enumerable.rb
111
+ lib/webby/core_ext/hash.rb
112
+ lib/webby/core_ext/kernel.rb
113
+ lib/webby/core_ext/string.rb
114
+ lib/webby/core_ext/time.rb
115
+ lib/webby/filters.rb
116
+ lib/webby/filters/basepath.rb
117
+ lib/webby/filters/erb.rb
118
+ lib/webby/filters/haml.rb
119
+ lib/webby/filters/markdown.rb
120
+ lib/webby/filters/outline.rb
121
+ lib/webby/filters/sass.rb
122
+ lib/webby/filters/slides.rb
123
+ lib/webby/filters/textile.rb
124
+ lib/webby/filters/tidy.rb
125
+ lib/webby/helpers.rb
126
+ lib/webby/helpers/capture_helper.rb
127
+ lib/webby/helpers/coderay_helper.rb
128
+ lib/webby/helpers/graphviz_helper.rb
129
+ lib/webby/helpers/tag_helper.rb
130
+ lib/webby/helpers/tex_img_helper.rb
131
+ lib/webby/helpers/ultraviolet_helper.rb
132
+ lib/webby/helpers/url_helper.rb
133
+ lib/webby/link_validator.rb
134
+ lib/webby/renderer.rb
135
+ lib/webby/resources.rb
136
+ lib/webby/resources/db.rb
137
+ lib/webby/resources/file.rb
138
+ lib/webby/resources/layout.rb
139
+ lib/webby/resources/page.rb
140
+ lib/webby/resources/partial.rb
141
+ lib/webby/resources/resource.rb
142
+ lib/webby/resources/static.rb
143
+ lib/webby/stelan/mktemp.rb
144
+ lib/webby/stelan/paginator.rb
145
+ lib/webby/stelan/spawner.rb
146
+ lib/webby/tasks/build.rake
147
+ lib/webby/tasks/create.rake
148
+ lib/webby/tasks/deploy.rake
149
+ lib/webby/tasks/growl.rake
150
+ lib/webby/tasks/heel.rake
151
+ lib/webby/tasks/validate.rake
152
+ spec/core_ext/hash_spec.rb
153
+ spec/core_ext/string_spec.rb
154
+ spec/core_ext/time_spec.rb
155
+ spec/spec.opts
156
+ spec/spec_helper.rb
157
+ spec/webby/apps/generator_spec.rb
158
+ spec/webby/apps/main_spec.rb
159
+ spec/webby/helpers/capture_helper_spec.rb
160
+ spec/webby/resources/file_spec.rb
161
+ spec/webby/resources_spec.rb
162
+ tasks/ann.rake
163
+ tasks/bones.rake
164
+ tasks/gem.rake
165
+ tasks/git.rake
166
+ tasks/manifest.rake
167
+ tasks/notes.rake
168
+ tasks/post_load.rake
169
+ tasks/rdoc.rake
170
+ tasks/rubyforge.rake
171
+ tasks/setup.rb
172
+ tasks/spec.rake
173
+ tasks/website.rake
data/README.txt ADDED
@@ -0,0 +1,92 @@
1
+ Webby
2
+
3
+ * {Homepage}[http://webby.rubyforge.org/]
4
+ * {Rubyforge Project}[http://rubyforge.org/projects/webby]
5
+ * email tim dot pease at gmail dot com
6
+
7
+ == DESCRIPTION:
8
+
9
+ *Webby* is a fantastic little website management system. It would be called a _content management system_ if it were a bigger kid. But, it's just a runt with a special knack for transforming text. And that's really all it does - manages the legwork of turning text into something else, an *ASCII Alchemist* if you will.
10
+
11
+ Webby works by combining the contents of a *page* with a *layout* to produce HTML. The layout contains everything common to all the pages - HTML headers, navigation menu, footer, etc. - and the page contains just the information for that page. You can use your favorite markup language to write your pages; Webby supports quite a few.
12
+
13
+ Install Webby and try it out!
14
+
15
+ == FEATURES:
16
+
17
+ * choose your templating language: *ERB*, *Textile*, *Markdown*, *HAML*, *SASS*
18
+ * support for "UltraViolet":http://ultraviolet.rubyforge.org/ and "CodeRay":http://coderay.rubychan.de/ syntax highlighting
19
+ * embeddable DOT scripts for "Graphviz":http://www.graphviz.org/ graphs
20
+ * "LaTeX":http://www.latex-project.org/ snippets for mathematical formulas
21
+ * automatically clean up generated content using "Tidy":http://tidy.sourceforge.net/
22
+ * quick and speedy - only builds pages that have changed
23
+ * deploy anywhere - it's just HTML, no special server stuff required
24
+ * happy "rake":http://docs.rubyrake.org/ tasks for deploying your website to a server
25
+ * build new pages from templates for quicker blog posts and news items
26
+
27
+ But Wait! There's More!
28
+
29
+ Webby has a great _autobuild_ feature that continuously generates HTML whenever the *pages* or *layouts* change. The HTML is served up via "heel":http://copiousfreetime.rubyforge.org/heel/, a static file webserver based on mongrel. Whenever you change a page, you can immediately see those changes without having to run any commands.
30
+
31
+ $ webby autobuild
32
+ [10:21:26] INFO: starting autobuild (Ctrl-C to stop)
33
+ [10:21:26] INFO: creating output/index.html
34
+ [10:22:57] INFO: creating output/index.html
35
+
36
+ Webby is not limited to producing HTML. By no means! Do you ever get tired of repeating the same color code *#D3C4A2* in your CSS files? Webby can help. Need some customized JavaScript for your website. Webby can help. Anytime you find yourself repeating the same bit of text over and over, then you should be using Webby.
37
+
38
+ == INSTALL:
39
+
40
+ gem install webby
41
+
42
+ == EXAMPLE:
43
+
44
+ $ webby-gen website my_site
45
+ creating my_site
46
+
47
+ $ cd my_site
48
+
49
+ $ webby create:page 'new page'
50
+ creating content/new-page.txt
51
+
52
+ $ webby create:page 'another/new page'
53
+ creating content/another/new-page.txt
54
+
55
+ $ webby autobuild
56
+ [10:21:26] INFO: starting autobuild (Ctrl-C to stop)
57
+ [10:21:26] INFO: creating output/index.html
58
+ [10:21:26] INFO: creating output/new-page.html
59
+ [10:21:26] INFO: creating output/another/new-page.html
60
+
61
+ == REQUIREMENTS:
62
+
63
+ * directory_watcher
64
+ * heel
65
+ * hpricot
66
+ * logging
67
+ * rake
68
+ * rspec
69
+
70
+ == LICENSE:
71
+
72
+ MIT License
73
+ Copyright (c) 2007 - 2008
74
+
75
+ Permission is hereby granted, free of charge, to any person obtaining
76
+ a copy of this software and associated documentation files (the
77
+ 'Software'), to deal in the Software without restriction, including
78
+ without limitation the rights to use, copy, modify, merge, publish,
79
+ distribute, sub-license, and/or sell copies of the Software, and to
80
+ permit persons to whom the Software is furnished to do so, subject to
81
+ the following conditions:
82
+
83
+ The above copyright notice and this permission notice shall be
84
+ included in all copies or substantial portions of the Software.
85
+
86
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
87
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
88
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
89
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
90
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
91
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
92
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,50 @@
1
+ # $Id$
2
+
3
+ load 'tasks/setup.rb'
4
+
5
+ ensure_in_path 'lib'
6
+ require 'webby'
7
+
8
+ task :default => 'spec:specdoc'
9
+
10
+ PROJ.name = 'webby'
11
+ PROJ.summary = 'static website creation and management'
12
+ PROJ.authors = 'Tim Pease'
13
+ PROJ.email = 'tim.pease@gmail.com'
14
+ PROJ.url = 'http://webby.rubyforge.org/'
15
+ PROJ.description = paragraphs_of('README.txt', 3).join("\n\n")
16
+ PROJ.rubyforge.name = 'webby'
17
+ PROJ.version = Webby::VERSION
18
+ PROJ.release_name = 'Vegan Velociraptor'
19
+
20
+ PROJ.ruby_opts = %w[-W0]
21
+ PROJ.exclude << %w(^examples/[^/]+/output ^tasks/archive ^tags$ ^webby.gemspec$)
22
+
23
+ PROJ.rdoc.dir = 'doc/rdoc'
24
+ PROJ.rdoc.remote_dir = 'rdoc'
25
+ PROJ.rdoc.exclude << %w(^examples)
26
+
27
+ PROJ.spec.opts << '--color'
28
+
29
+ PROJ.ann.email[:to] << 'webby-forum@googlegroups.com'
30
+ PROJ.ann.email[:server] = 'smtp.gmail.com'
31
+ PROJ.ann.email[:port] = 587
32
+
33
+ PROJ.ann.text = <<-ANN
34
+ == POST SCRIPT
35
+
36
+ Visit the Webby forum to chat with other Webby-Heads:
37
+ http://groups.google.com/group/webby-forum
38
+
39
+ Blessings,
40
+ TwP
41
+ ANN
42
+
43
+ depend_on 'directory_watcher'
44
+ depend_on 'heel'
45
+ depend_on 'hpricot', '= 0.6.0'
46
+ depend_on 'logging'
47
+ depend_on 'rake'
48
+ depend_on 'rspec'
49
+
50
+ # EOF
data/bin/webby ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require File.expand_path(
4
+ File.join(File.dirname(__FILE__), %w[.. lib webby]))
5
+
6
+ ::Webby::Apps::Main.run(ARGV)
7
+
8
+ # EOF
data/bin/webby-gen ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require File.expand_path(
4
+ File.join(File.dirname(__FILE__), %w[.. lib webby]))
5
+
6
+ ::Webby::Apps::Generator.run(ARGV)
7
+
8
+ # EOF
@@ -0,0 +1,7 @@
1
+
2
+ task :default => :build
3
+
4
+ desc 'deploy the site to the webserver'
5
+ task :deploy => [:build, 'deploy:rsync']
6
+
7
+ # EOF
@@ -0,0 +1,72 @@
1
+
2
+ namespace :blog do
3
+
4
+ # iterate over all the files in the "templates/blog" folder and create a
5
+ # rake task corresponding to each file found
6
+ FileList["#{Webby.site.template_dir}/blog/*"].each do |template|
7
+ next unless test(?f, template)
8
+ name = template.pathmap('%n')
9
+ next if name =~ %r/^(month|year)$/ # skip month/year blog entries
10
+
11
+ desc "Create a new blog #{name}"
12
+ task name => [:create_year_index, :create_month_index] do |t|
13
+ page, title, dir = Webby::Builder.new_page_info
14
+
15
+ # if no directory was given use the default blog directory (underneath
16
+ # the content directory)
17
+ dir = Webby.site.blog_dir if dir.empty?
18
+ dir = File.join(dir, Time.now.strftime('%Y/%m/%d'))
19
+
20
+ page = File.join(dir, File.basename(page))
21
+ page = Webby::Builder.create(page, :from => template,
22
+ :locals => {:title => title, :directory => dir})
23
+ exec(::Webby.editor, page) unless ::Webby.editor.nil?
24
+ end
25
+ end # each
26
+
27
+ # this task is used to create the year index file (blog/2008/index.txt)
28
+ task :create_year_index do |t|
29
+ # parse out information about the page to create
30
+ _, _, dir = Webby::Builder.new_page_info
31
+ year = Time.now.strftime '%Y'
32
+
33
+ # if no directory was given use the default blog directory (underneath
34
+ # the content directory)
35
+ dir = Webby.site.blog_dir if dir.empty?
36
+ dir = File.join(dir, year)
37
+
38
+ # determine the filename and template name
39
+ fn = File.join(dir, 'index.txt')
40
+ tmpl = Dir.glob(File.join(Webby.site.template_dir, 'blog/year.*')).first.to_s
41
+
42
+ if test(?f, tmpl) and not test(?f, File.join(Webby.site.content_dir, fn))
43
+ Webby::Builder.create(fn, :from => tmpl,
44
+ :locals => {:title => year, :directory => dir})
45
+ end
46
+ end
47
+
48
+ # this task is used to create the month index file (blog/2008/04/index.txt)
49
+ task :create_month_index do |t|
50
+ # parse out information about the page to create
51
+ _, _, dir = Webby::Builder.new_page_info
52
+ now = Time.now
53
+ month = now.strftime '%m'
54
+
55
+ # if no directory was given use the default blog directory (underneath
56
+ # the content directory)
57
+ dir = Webby.site.blog_dir if dir.empty?
58
+ dir = File.join(dir, now.strftime('%Y/%m'))
59
+
60
+ # determine the filename and template name
61
+ fn = File.join(dir, 'index.txt')
62
+ tmpl = Dir.glob(File.join(Webby.site.template_dir, 'blog/month.*')).first.to_s
63
+
64
+ if test(?f, tmpl) and not test(?f, File.join(Webby.site.content_dir, fn))
65
+ Webby::Builder.create(fn, :from => tmpl,
66
+ :locals => {:title => month, :directory => dir})
67
+ end
68
+ end
69
+
70
+ end # namespace :blog
71
+
72
+ # EOF
@@ -0,0 +1,40 @@
1
+ ---
2
+ title: A New Atom Feed
3
+ subtitle: A really swell blog built with Webby
4
+ site: fake-n-site.org
5
+ author: Author's Name
6
+ email: author@fake-n-site.org
7
+ extension: xml
8
+ layout: nil
9
+ dirty: true
10
+ filter: erb
11
+ ---
12
+ <?xml version="1.0" encoding="utf-8"?>
13
+ <feed xmlns="http://www.w3.org/2005/Atom">
14
+
15
+ <title><%%= h(@page.title) %></title>
16
+ <subtitle><%%= h(@page.subtitle) %></subtitle>
17
+ <link href="http://<%%= @page.site %>/<%= directory %>/" rel="self" />
18
+ <link href="http://<%%= @page.site %>/" />
19
+ <updated><%%= Time.now.xmlschema %></updated>
20
+ <author>
21
+ <name><%%= h(@page.author) %></name>
22
+ <email><%%= h(@page.email) %></email>
23
+ </author>
24
+ <id>http://<%%= @page.site %>/</id>
25
+ <%% @pages.find(:limit => 10,
26
+ :in_directory => '<%= directory %>',
27
+ :recursive => true,
28
+ :sort_by => 'mtime',
29
+ :reverse => true).each do |article|
30
+ next if article == @page
31
+ %>
32
+ <entry>
33
+ <title><%%= h(article.title) %></title>
34
+ <link href="<%%= article.url %>" />
35
+ <id>tag:<%%= @page.site %>,<%%= article.created_at.strftime('%Y-%m-%d') %>:<%%= article.created_at.to_i %></id>
36
+ <updated><%%= article.created_at.xmlschema %></updated>
37
+ <content type="html"><%%= h(render(article)) %></content>
38
+ </entry>
39
+ <%% end %>
40
+ </feed>
@@ -0,0 +1,22 @@
1
+ ---
2
+ title: <%= title %>
3
+ created_at: <%= Time.now.to_y %>
4
+ filter: erb
5
+ dirty: true
6
+ ---
7
+ <h2><%%= h(@page.title) %></h2>
8
+
9
+ <%%
10
+ articles = @pages.find(:all, :in_directory => @page.dir, :recursive => true,
11
+ :sort_by => "created_at", :reverse => true, :blog_post => true)
12
+ articles.delete(@page)
13
+ paginate(articles, 10) do |page|
14
+ -%>
15
+ <div class="article">
16
+ <h1><%%= link_to_page(page) %><span class="date">(<%%= page.created_at.strftime('%Y-%m-%d') %>)</span></h1>
17
+
18
+ <div class="body">
19
+ <%%= render(page) %>
20
+ </div>
21
+ </div>
22
+ <%% end -%>
@@ -0,0 +1,16 @@
1
+ ---
2
+ title: <%= title %>
3
+ created_at: <%= Time.now.to_y %>
4
+ blog_post: true
5
+ filter:
6
+ - textile
7
+ ---
8
+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc congue ipsum vestibulum libero. Aenean vitae justo. Nam eget tellus. Etiam convallis, est eu lobortis mattis, lectus tellus tempus felis, a ultricies erat ipsum at metus.
9
+
10
+ h3. Litora Sociis
11
+
12
+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi et risus. Aliquam nisl. Nulla facilisi. Cras accumsan vestibulum ante. Vestibulum sed tortor. Praesent tempus fringilla elit. Ut elit diam, sagittis in, nonummy in, gravida non, nunc. Ut orci. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Nam egestas, orci eu imperdiet malesuada, nisl purus fringilla odio, quis commodo est orci vitae justo. Aliquam placerat odio tincidunt nulla. Cras in libero. Aenean rutrum, magna non tristique posuere, erat odio eleifend nisl, non convallis est tortor blandit ligula. Nulla id augue.
13
+
14
+ bq. Nullam mattis, odio ut tempus facilisis, metus nisl facilisis metus, auctor consectetuer felis ligula nec mauris. Vestibulum odio erat, fermentum at, commodo vitae, ultrices et, urna. Mauris vulputate, mi pulvinar sagittis condimentum, sem nulla aliquam velit, sed imperdiet mi purus eu magna. Nulla varius metus ut eros. Aenean aliquet magna eget orci. Class aptent taciti sociosqu ad litora.
15
+
16
+ Vivamus euismod. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse vel nibh ut turpis dictum sagittis. Aliquam vel velit a elit auctor sollicitudin. Nam vel dui vel neque lacinia pretium. Quisque nunc erat, venenatis id, volutpat ut, scelerisque sed, diam. Mauris ante. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec mattis. Morbi dignissim sollicitudin libero. Nulla lorem.