blowmage-webby 0.9.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (247) hide show
  1. data/History.txt +214 -0
  2. data/Manifest.txt +249 -0
  3. data/README.rdoc +92 -0
  4. data/Rakefile +56 -0
  5. data/bin/webby +41 -0
  6. data/bin/webby-gen +41 -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 +25 -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/index.txt +21 -0
  64. data/examples/webby/content/release-notes/rel-0-9-0/index.txt +74 -0
  65. data/examples/webby/content/release-notes/rel-0-9-1/index.txt +93 -0
  66. data/examples/webby/content/release-notes/rel-0-9-2/index.txt +14 -0
  67. data/examples/webby/content/release-notes/rel-0-9-3/index.txt +47 -0
  68. data/examples/webby/content/robots.txt +6 -0
  69. data/examples/webby/content/script/jquery.corner.js +152 -0
  70. data/examples/webby/content/script/jquery.js +31 -0
  71. data/examples/webby/content/sitemap.txt +31 -0
  72. data/examples/webby/content/tips_and_tricks/index.txt +97 -0
  73. data/examples/webby/content/tutorial/index.txt +135 -0
  74. data/examples/webby/content/user-manual/index.txt +419 -0
  75. data/examples/webby/layouts/default.txt +49 -0
  76. data/examples/webby/templates/page.erb +10 -0
  77. data/examples/website/Sitefile +7 -0
  78. data/examples/website/content/css/blueprint/ie.css +26 -0
  79. data/examples/website/content/css/blueprint/plugins/buttons/icons/cross.png +0 -0
  80. data/examples/website/content/css/blueprint/plugins/buttons/icons/key.png +0 -0
  81. data/examples/website/content/css/blueprint/plugins/buttons/icons/tick.png +0 -0
  82. data/examples/website/content/css/blueprint/plugins/buttons/readme.txt +32 -0
  83. data/examples/website/content/css/blueprint/plugins/buttons/screen.css +97 -0
  84. data/examples/website/content/css/blueprint/plugins/fancy-type/readme.txt +14 -0
  85. data/examples/website/content/css/blueprint/plugins/fancy-type/screen.css +71 -0
  86. data/examples/website/content/css/blueprint/plugins/link-icons/icons/doc.png +0 -0
  87. data/examples/website/content/css/blueprint/plugins/link-icons/icons/email.png +0 -0
  88. data/examples/website/content/css/blueprint/plugins/link-icons/icons/external.png +0 -0
  89. data/examples/website/content/css/blueprint/plugins/link-icons/icons/feed.png +0 -0
  90. data/examples/website/content/css/blueprint/plugins/link-icons/icons/im.png +0 -0
  91. data/examples/website/content/css/blueprint/plugins/link-icons/icons/pdf.png +0 -0
  92. data/examples/website/content/css/blueprint/plugins/link-icons/icons/visited.png +0 -0
  93. data/examples/website/content/css/blueprint/plugins/link-icons/icons/xls.png +0 -0
  94. data/examples/website/content/css/blueprint/plugins/link-icons/readme.txt +18 -0
  95. data/examples/website/content/css/blueprint/plugins/link-icons/screen.css +40 -0
  96. data/examples/website/content/css/blueprint/plugins/rtl/readme.txt +10 -0
  97. data/examples/website/content/css/blueprint/plugins/rtl/screen.css +109 -0
  98. data/examples/website/content/css/blueprint/print.css +30 -0
  99. data/examples/website/content/css/blueprint/screen.css +251 -0
  100. data/examples/website/content/css/blueprint/src/forms.css +49 -0
  101. data/examples/website/content/css/blueprint/src/grid.css +212 -0
  102. data/examples/website/content/css/blueprint/src/grid.png +0 -0
  103. data/examples/website/content/css/blueprint/src/ie.css +59 -0
  104. data/examples/website/content/css/blueprint/src/print.css +85 -0
  105. data/examples/website/content/css/blueprint/src/reset.css +38 -0
  106. data/examples/website/content/css/blueprint/src/typography.css +105 -0
  107. data/examples/website/content/css/coderay.css +111 -0
  108. data/examples/website/content/css/site.css +67 -0
  109. data/examples/website/content/index.txt +19 -0
  110. data/examples/website/layouts/default.txt +61 -0
  111. data/examples/website/lib/breadcrumbs.rb +28 -0
  112. data/examples/website/templates/_partial.erb +10 -0
  113. data/examples/website/templates/page.erb +18 -0
  114. data/lib/webby.rb +233 -0
  115. data/lib/webby/apps.rb +12 -0
  116. data/lib/webby/apps/generator.rb +276 -0
  117. data/lib/webby/apps/main.rb +258 -0
  118. data/lib/webby/auto_builder.rb +157 -0
  119. data/lib/webby/builder.rb +172 -0
  120. data/lib/webby/core_ext/enumerable.rb +11 -0
  121. data/lib/webby/core_ext/hash.rb +28 -0
  122. data/lib/webby/core_ext/kernel.rb +26 -0
  123. data/lib/webby/core_ext/string.rb +163 -0
  124. data/lib/webby/core_ext/time.rb +9 -0
  125. data/lib/webby/filters.rb +83 -0
  126. data/lib/webby/filters/basepath.rb +97 -0
  127. data/lib/webby/filters/erb.rb +9 -0
  128. data/lib/webby/filters/haml.rb +18 -0
  129. data/lib/webby/filters/markdown.rb +16 -0
  130. data/lib/webby/filters/maruku.rb +16 -0
  131. data/lib/webby/filters/outline.rb +309 -0
  132. data/lib/webby/filters/sass.rb +17 -0
  133. data/lib/webby/filters/slides.rb +56 -0
  134. data/lib/webby/filters/textile.rb +16 -0
  135. data/lib/webby/filters/tidy.rb +76 -0
  136. data/lib/webby/filters/wiki_words.rb +14 -0
  137. data/lib/webby/helpers.rb +30 -0
  138. data/lib/webby/helpers/capture_helper.rb +141 -0
  139. data/lib/webby/helpers/coderay_helper.rb +69 -0
  140. data/lib/webby/helpers/graphviz_helper.rb +136 -0
  141. data/lib/webby/helpers/tag_helper.rb +65 -0
  142. data/lib/webby/helpers/tex_img_helper.rb +133 -0
  143. data/lib/webby/helpers/ultraviolet_helper.rb +63 -0
  144. data/lib/webby/helpers/url_helper.rb +241 -0
  145. data/lib/webby/journal.rb +126 -0
  146. data/lib/webby/link_validator.rb +160 -0
  147. data/lib/webby/renderer.rb +386 -0
  148. data/lib/webby/resources.rb +136 -0
  149. data/lib/webby/resources/db.rb +251 -0
  150. data/lib/webby/resources/layout.rb +54 -0
  151. data/lib/webby/resources/meta_file.rb +211 -0
  152. data/lib/webby/resources/page.rb +82 -0
  153. data/lib/webby/resources/partial.rb +85 -0
  154. data/lib/webby/resources/resource.rb +201 -0
  155. data/lib/webby/resources/static.rb +36 -0
  156. data/lib/webby/stelan/mktemp.rb +135 -0
  157. data/lib/webby/stelan/paginator.rb +165 -0
  158. data/lib/webby/tasks/build.rake +27 -0
  159. data/lib/webby/tasks/create.rake +25 -0
  160. data/lib/webby/tasks/deploy.rake +22 -0
  161. data/lib/webby/tasks/growl.rake +16 -0
  162. data/lib/webby/tasks/validate.rake +19 -0
  163. data/spec/core_ext/hash_spec.rb +47 -0
  164. data/spec/core_ext/string_spec.rb +110 -0
  165. data/spec/core_ext/time_spec.rb +19 -0
  166. data/spec/data/hooligans/bad_meta_data_1.txt +34 -0
  167. data/spec/data/hooligans/bad_meta_data_2.txt +34 -0
  168. data/spec/data/html/anchor.html +11 -0
  169. data/spec/data/html/external.html +10 -0
  170. data/spec/data/html/invalid-relative.html +10 -0
  171. data/spec/data/html/relative-anchor.html +10 -0
  172. data/spec/data/html/relative-invalid-anchor.html +10 -0
  173. data/spec/data/html/relative.html +10 -0
  174. data/spec/data/outline/basic.out +81 -0
  175. data/spec/data/outline/basic.txt +25 -0
  176. data/spec/data/outline/no_clobber.out +86 -0
  177. data/spec/data/outline/numbering.out +81 -0
  178. data/spec/data/outline/numbering_only.out +21 -0
  179. data/spec/data/outline/toc_range_1.out +66 -0
  180. data/spec/data/outline/toc_range_2.out +55 -0
  181. data/spec/data/outline/toc_style.out +81 -0
  182. data/spec/data/site/Sitefile +9 -0
  183. data/spec/data/site/content/_partial.txt +10 -0
  184. data/spec/data/site/content/css/coderay.css +111 -0
  185. data/spec/data/site/content/css/site.css +67 -0
  186. data/spec/data/site/content/css/tumblog.css +308 -0
  187. data/spec/data/site/content/images/tumblog/permalink.gif +0 -0
  188. data/spec/data/site/content/images/tumblog/rss.gif +0 -0
  189. data/spec/data/site/content/index.txt +19 -0
  190. data/spec/data/site/content/photos.txt +21 -0
  191. data/spec/data/site/content/tumblog/200806/the-noble-chicken/index.txt +12 -0
  192. data/spec/data/site/content/tumblog/200807/historical-perspectives-on-the-classic-chicken-joke/index.txt +12 -0
  193. data/spec/data/site/content/tumblog/200807/mad-city-chickens/index.txt +10 -0
  194. data/spec/data/site/content/tumblog/200807/the-wisdom-of-the-dutch/index.txt +11 -0
  195. data/spec/data/site/content/tumblog/200807/up-a-tree/index.txt +13 -0
  196. data/spec/data/site/content/tumblog/index.txt +37 -0
  197. data/spec/data/site/content/tumblog/rss.txt +37 -0
  198. data/spec/data/site/layouts/default.txt +58 -0
  199. data/spec/data/site/layouts/tumblog/default.txt +44 -0
  200. data/spec/data/site/layouts/tumblog/post.txt +15 -0
  201. data/spec/data/site/lib/breadcrumbs.rb +28 -0
  202. data/spec/data/site/lib/tumblog_helper.rb +32 -0
  203. data/spec/data/site/tasks/tumblog.rake +30 -0
  204. data/spec/data/site/templates/_partial.erb +10 -0
  205. data/spec/data/site/templates/atom_feed.erb +40 -0
  206. data/spec/data/site/templates/page.erb +18 -0
  207. data/spec/data/site/templates/presentation.erb +40 -0
  208. data/spec/data/site/templates/tumblog/conversation.erb +12 -0
  209. data/spec/data/site/templates/tumblog/link.erb +10 -0
  210. data/spec/data/site/templates/tumblog/photo.erb +13 -0
  211. data/spec/data/site/templates/tumblog/post.erb +12 -0
  212. data/spec/data/site/templates/tumblog/quote.erb +11 -0
  213. data/spec/spec.opts +1 -0
  214. data/spec/spec_helper.rb +58 -0
  215. data/spec/webby/apps/generator_spec.rb +117 -0
  216. data/spec/webby/apps/main_spec.rb +88 -0
  217. data/spec/webby/filters/basepath_spec.rb +167 -0
  218. data/spec/webby/filters/maruku_spec.rb +31 -0
  219. data/spec/webby/filters/outline_spec.rb +92 -0
  220. data/spec/webby/filters/textile_spec.rb +31 -0
  221. data/spec/webby/helpers/capture_helper_spec.rb +56 -0
  222. data/spec/webby/link_validator_spec.rb +154 -0
  223. data/spec/webby/renderer_spec.rb +139 -0
  224. data/spec/webby/resources/db_spec.rb +250 -0
  225. data/spec/webby/resources/layout_spec.rb +83 -0
  226. data/spec/webby/resources/meta_file_spec.rb +171 -0
  227. data/spec/webby/resources/page_spec.rb +129 -0
  228. data/spec/webby/resources/partial_spec.rb +58 -0
  229. data/spec/webby/resources/resource_spec.rb +219 -0
  230. data/spec/webby/resources/static_spec.rb +49 -0
  231. data/spec/webby/resources_spec.rb +69 -0
  232. data/tasks/ann.rake +80 -0
  233. data/tasks/bones.rake +20 -0
  234. data/tasks/gem.rake +192 -0
  235. data/tasks/git.rake +40 -0
  236. data/tasks/manifest.rake +48 -0
  237. data/tasks/mswin32.rake +38 -0
  238. data/tasks/notes.rake +27 -0
  239. data/tasks/post_load.rake +39 -0
  240. data/tasks/rdoc.rake +50 -0
  241. data/tasks/rubyforge.rake +55 -0
  242. data/tasks/setup.rb +279 -0
  243. data/tasks/spec.rake +54 -0
  244. data/tasks/svn.rake +47 -0
  245. data/tasks/test.rake +40 -0
  246. data/tasks/website.rake +37 -0
  247. metadata +386 -0
@@ -0,0 +1,28 @@
1
+ ---
2
+ title: Learn
3
+ created_at: 2008-08-24 15:36:06.596051 -06:00
4
+ filter:
5
+ - erb
6
+ - textile
7
+ ---
8
+ h1. <%= h(@page.title) %>
9
+
10
+ This section is devoted to learning more about Webby. Located below are the various "official" documents to assist you on your way to becoming prolific with Webby.
11
+
12
+ If you cannot find your answer here, head on over to the <%= link_to_page('Communicate') %> section where the mailing list might help you.
13
+
14
+ p(pull). *<%= link_to_page('Tutorial') %>*
15
+
16
+ p(pulltext). The tutorial is a great introduction to Webby if you want to hit the ground running and figure things out as you go. Following along with the tutorial on your own computer will get you comfortable with the basic concepts of Webby.
17
+
18
+ p(pull). *<%= link_to_page('User Manual') %>*
19
+
20
+ p(pulltext). The user manual provides a more in-depth look into Webby. It assumes no prior experience with Webby, and it goes into more detail about the various aspects of creating a webby site and working with Webby itself. The user manual is the place to go if you want to go beyond the basics.
21
+
22
+ p(pull). *<%= link_to_page('Reference') %>*
23
+
24
+ p(pulltext). The reference does not provide an introduction to Webby. Instead, it is an indexed collection of the various Webby features with a brief explanation of each. It is useful when you vaguely remember reading something about filters and only need a quick refresher of the details without instructional text.
25
+
26
+ p(pull). *<%= link_to_page('Release Notes') %>*
27
+
28
+ p(pulltext). These are the release notes for past and present versions of Webby. Actually, it's only for the current version of Webby since formal release notes were only recently thought of by the developer. %(quiet)Bad developer! No latte!!%
@@ -0,0 +1,204 @@
1
+ ---
2
+ title: Reference
3
+ created_at: 2008-03-04 22:00:08.439182 -07:00
4
+ filter:
5
+ - erb
6
+ - textile
7
+ - outline
8
+ content_for_head: |
9
+ <link rel="stylesheet" href="/css/coderay.css" type="text/css" media="screen, projection" />
10
+ <link rel="stylesheet" href="/css/uv/twilight.css" type="text/css" media="screen, projection" />
11
+ ---
12
+ <div class="toc push-1">
13
+
14
+ p(title). Table of Contents
15
+
16
+ <toc toc_range="h2-h6" />
17
+ </div>
18
+
19
+ h1. <%= h(@page.title) %>
20
+
21
+ h3. Resources
22
+
23
+ Resources are the files that are found in the _content_ and _layouts_ folders of a webby site. They come in the following four flavors:
24
+
25
+ * *Pages* -- contain meta-data at the top of the file, are found in the content folder, and are processed by the Webby filter engine
26
+ * *Files* -- are found in the content folder and copied "as is" to the output folder
27
+ * *Partials* -- contain snippets of text that can be used in multiple locations; partial filenames begin with an underscore are are _not_ copied to the output folder
28
+ * *Layouts* -- are found in the layout folder and provide the basic framework of the webpage - the header, the footer, the navigation
29
+
30
+ h3. Attributes
31
+
32
+ Attributes are defined in the meta-data section of pages and layouts.
33
+
34
+ <div class="label">destination</div>
35
+ <div class="desc">
36
+ Defines the path in the output directory where the rendered page should be stored.
37
+ </div>
38
+
39
+ <div class="label">dirty</div>
40
+ <div class="desc">
41
+ The dirty flag is used to determine whether the page should rendered or not. Normally this is automatically determined by the filter engine, but it can be overridden by setting this attribute. If the dirty flag is set to _true_ then the page will always be rendered. If the dirty flag is set to _false_ then the page will never be rendered.
42
+ </div>
43
+
44
+ <div class="label">extension</div>
45
+ <div class="desc">
46
+ Defines the extension that will be appended to the filename of the rendered page in the output folder. The extension is determined by looking at the following:
47
+
48
+ * the meta-data of the current page for an @extension@ attribute
49
+ * the meta-data of layout file of the current page for an @extension@ attribute
50
+ * the extension of this page file in the _content_ folder
51
+
52
+ </div>
53
+
54
+ <div class="label">filter</div>
55
+ <div class="desc">
56
+ Defines the list of filters that will be applied to the contents of this page. If left blank, then the default filter will be applied to the page contents.
57
+ </div>
58
+
59
+ <div class="label">layout</div>
60
+ <div class="desc">
61
+ Defines the layout that the page contents will be rendered into. The default layout will be used if this attribute is not defined. The value of @nil@ should be specified if the page should not be rendered into any layout.
62
+ </div>
63
+
64
+ The following attributes are defined for each page in the content folder. These attributes cannot be changed in the page's meta-data section. However, they are available to the ERB filter when rendering the contents of a page.
65
+
66
+ <div class="label">path</div>
67
+ <div class="desc">
68
+ The full path to the file in the _content_ folder
69
+ </div>
70
+
71
+ <div class="label">dir</div>
72
+ <div class="desc">
73
+ The relative directory in the output folder where the page will be rendered
74
+ </div>
75
+
76
+ <div class="label">filename </div>
77
+ <div class="desc">
78
+ The name of the file in the _content_ folder excluding any path information and extension
79
+ </div>
80
+
81
+ <div class="label">ext</div>
82
+ <div class="desc">
83
+ The extension of the file in the _content_ folder
84
+ </div>
85
+
86
+ <div class="label">mtime</div>
87
+ <div class="desc">
88
+ The modification time of the file in the _content_ folder
89
+ </div>
90
+
91
+ <div class="label">number</div>
92
+ <div class="desc">
93
+ Reserved variable used for multi-page content
94
+ </div>
95
+
96
+ <div class="label">url</div>
97
+ <div class="desc">
98
+ A URL suitable for creating a link to the page
99
+ </div>
100
+
101
+ <div class="label">render</div>
102
+ <div class="desc">
103
+ Returns the contents of the page as rendered by the Webby filter engine
104
+ </div>
105
+
106
+ h3. Filters
107
+
108
+ h3. ERB Variables & Methods
109
+
110
+ h4. coderay
111
+
112
+ The coderay method is used to generate syntax highlighting on a block of code. You will need to have the coderay gem installed on your system, and you will need to include the coderay CSS stylesheet in your pages for the syntax highlighting markup to take effect.
113
+
114
+ The full list of "coderay options":/rdoc/classes/Webby/Helpers/CodeRayHelper.html can be found in the source documentation.
115
+
116
+ <pre>
117
+ <%% coderay :lang => 'ruby', :line_numbers => 'inline' do -%>
118
+ class Object
119
+ def returning( r )
120
+ yield r if block_given?
121
+ r
122
+ end
123
+ end
124
+ <%% end -%>
125
+ </pre>
126
+
127
+ <% coderay :lang => "ruby", :line_numbers => "inline" do -%>
128
+ class Object
129
+ def returning( r )
130
+ yield r if block_given?
131
+ r
132
+ end
133
+ end
134
+ <% end -%>
135
+
136
+
137
+ h4. graphviz
138
+
139
+ The graphviz method is used to convert a DOT script into an image and insert the image into the page. If the DOT script contains URL references, then an image map will also be generated. The resulting image will then have "clickable" regions that link to the URLs specified.
140
+
141
+ "Graphviz":http://www.graphviz.org/ needs to be installed on your system in order to use the graphviz method. The full list of "graphviz options":/rdoc/classes/Webby/Helpers/GraphvizHelper.html can be found in the source documentation.
142
+
143
+ <pre>
144
+ <%% graphviz :path => 'images', :alt => 'hello world graph' do -%>
145
+ digraph hello_world {
146
+ rankdir = LR;
147
+ Hello -> World;
148
+ }
149
+ <%% end -%>
150
+ </pre>
151
+
152
+ <% graphviz :path => "images", :alt => "hello world graph" do -%>
153
+ digraph hello_world {
154
+ rankdir = LR;
155
+ Hello -> World;
156
+ }
157
+ <% end -%>
158
+
159
+
160
+ h4. tex2img
161
+
162
+ The tex2img method is used to convert a LaTeX script into an image and insert the image into the page. "LaTeX":http://www.latex-project.org/ and "ImageMagick":http://www.imagemagick.org/script/index.php need to be instaled on your system in order to use the tex2img maethod.
163
+
164
+ The full list of "tex2img options":/rdoc/classes/Webby/Helpers/TexImgHelper.html can be found in the source documentation.
165
+
166
+ <pre>
167
+ <%% tex2img 'wave_eq', :path => 'images', :alt => 'wave equation' do -%>
168
+ $\psi_{tot}(x,-t_0,r) = \frac{1}{(2\pi)^2} \int\!\!\!\int
169
+ \tilde\Psi_{tot}\left(k_x,\frac{c}{2}\sqrt{k_x^2 + k_r^2},r=0\right)$
170
+ <%% end -%>
171
+ </pre>
172
+
173
+ <% tex2img 'wave_eq', :path => 'images', :alt => 'wave equation' do -%>
174
+ $\psi_{tot}(x,-t_0,r) = \frac{1}{(2\pi)^2} \int\!\!\!\int
175
+ \tilde\Psi_{tot}\left(k_x,\frac{c}{2}\sqrt{k_x^2 + k_r^2},r=0\right)$
176
+ <% end -%>
177
+
178
+
179
+ h4. uv
180
+
181
+ The uv method is used to generate syntax highlighting on a block of code. You will need to have the "Ultraviolet":http://ultraviolet.rubyforge.org/ gem installed on your system, and you will need to include the desired CSS stylesheet in your pages for the syntax highlighting markup to take effect.
182
+
183
+ The full list of "ultraviolet options":/rdoc/classes/Webby/Helpers/UltraVioletHelper.html can be found in the source documentation.
184
+
185
+ <pre>
186
+ <%% uv :lang => "ruby", :line_numbers => true do -%>
187
+ # Initializer for the class.
188
+ def initialize( string )
189
+ @str = string
190
+ end
191
+ <%% end -%>
192
+ </pre>
193
+
194
+ <% uv :lang => "ruby", :line_numbers => true, :theme => 'twilight' do -%>
195
+ # Initializer for the class.
196
+ def initialize( string )
197
+ @str = string
198
+ end
199
+ <% end -%>
200
+
201
+
202
+ h3. Rake Tasks
203
+
204
+ h3. Site Defaults
@@ -0,0 +1,21 @@
1
+ ---
2
+ title: Release Notes
3
+ created_at: 2008-09-10 19:53:33.084767 -06:00
4
+ dirty: true
5
+ filter:
6
+ - erb
7
+ - textile
8
+ ---
9
+ h2. <%= h(@page.title) %>
10
+
11
+ Below are links to the release notes for the various version of Webby that have been officially released. Please note the humorous release names; these were created at great expense by a team of comedy writers hand picked by Stephen Colbert.
12
+
13
+ <% @pages.find(:all,
14
+ :sort_by => 'title',
15
+ :reverse => true,
16
+ :in_directory => @page.directory,
17
+ :recursive => true).each do |page|
18
+ next if page == @page
19
+ -%>
20
+ * *<%= link_to_page page %>* %(quiet)-- <%= h(page.release_name) %>%
21
+ <% end -%>
@@ -0,0 +1,74 @@
1
+ ---
2
+ title: Release 0.9.0
3
+ created_at: 2008-08-18 16:05:25.189950 -06:00
4
+ filter:
5
+ - erb
6
+ - textile
7
+ release_name: Vegan Velociraptor
8
+ ---
9
+ h2. <%= h(@page.title) %>
10
+
11
+ Release 0.9.0 adds new features and fixes some bugs. Most notably is the move away from the rake command line application, and the daily usage of the *webby* command line application to build sites.
12
+
13
+ * 2 major enhancements
14
+ ** The "rake" command line tool has been replaced by the "webby" command line tool for day to day site tasks
15
+ ** Now using the "rdiscount" gem for markdown syntax
16
+ * 4 minor enhancements
17
+ ** Layouts can exist in subdirectories of the layouts folder
18
+ ** Addition of a "tumblog" template
19
+ ** Addition of a sitemap file (Ana Nelson)
20
+ ** Updated to version 6.4.2 of ImageMagick for tex2img conversions
21
+ * 5 bug fixes
22
+ ** Better error message when an unknown filter is given
23
+ ** Table of contents generation bug
24
+ ** Failing to clean out the "content_for" cache when doing a multi-page render
25
+ ** Explicitly loading the RedCloth gem
26
+ ** Handling exceptions from system calls on the Windows platform
27
+
28
+ h3. Steps to Upgrade a Site
29
+
30
+ * rename *Rakefile* to *Sitefile*
31
+ * edit the *Sitefile* and remove the @load tasks/setup.rb@ line
32
+ * remove *setup.rb* from the *tasks* folder
33
+ * remove the following files from the *tasks* folder _unless you have modified them_
34
+ ** build.rake
35
+ ** create.rake
36
+ ** deploy.rake
37
+ ** growl.rake
38
+ ** heel.rake
39
+ ** validate.rake
40
+
41
+ h3. Rationale
42
+
43
+ *webby vs. rake*
44
+
45
+ The most prominent change in this release is the move away from the rake command line application. The webby command line application has taken its place. The impetus for this change is rake's inability to handle command line arguments being passed to individual tasks. Specifically, when creating a new page in a site the filename of the page is passed on the command line. Much "hackery" was taking place behind the scenes in order for this to work with the rake command line app.
46
+
47
+ Since "hackery" is prone to break, the immediate benefit of the webby command line app is future stability in the face of changes to rake. The rake infrastructure is still used under the hood, but the webby command line app now handles parsing of tasks and task arguments. This is a much more graceful solution.
48
+
49
+ *webby-gen*
50
+
51
+ A second command line application has been created -- *webby-gen*. When a new webby site was created with the old webby command line app, it was an "all or nothing" affair. Blueprint style sheets were created alongside S5 presentation templates with a smattering of blog support thrown in for good measure. Each of these can now be created independently of the others. Furthermore, a site template can be instantiated into an already existing site. Support for S5 presentations can be included into a site if it is needed.
52
+
53
+ An attempt was made to roll all this functionality into the webby command line app. However, all the options proved to be cumbersome for one utility. Occam's razor was applied to split the two.
54
+
55
+ *sitefile*
56
+
57
+ Slightly related to the "webby vs. rake" section above, I wanted to make a distinction between the "old way" of doing things and the "new way" of doing things. Of all the choices made in the release this was the most capricious.
58
+
59
+ *tasks*
60
+
61
+ It simply made sense to move the vast majority of the common website tasks into the webby gem itself. I found that these same task files were repeated over and over again in all the sites, and they were not being modified at all. This fact combined with the move to the webby command line app provided for a convenient way to use the tasks from the webby gem.
62
+
63
+ Some of the site templates (blog and tumblog, for example) still create rake tasks in the tasks folder. These are examples of specific behaviors that are good to be able to dissect for inspiration.
64
+
65
+ h3. Thanks
66
+
67
+ Thanks to everyone who has helped make Webby possible!
68
+ If you've made a website with webby, thanks.
69
+ If you've contributed some source code, thanks.
70
+ If you've written up some documentation, thanks.
71
+ If you've told a friend, thanks.
72
+
73
+ Blessings,
74
+ TwP
@@ -0,0 +1,93 @@
1
+ ---
2
+ title: Release 0.9.1
3
+ created_at: 2008-09-10 19:33:47.822421 -06:00
4
+ filter:
5
+ - erb
6
+ - textile
7
+ release_name: Gallus Gallus Toothicus
8
+ ---
9
+ h2. <%= h(@page.title) %>
10
+
11
+ Release 0.9.1 adds one new significant feature and fixes some bugs. The big new feature is the ability to generate multiple output files from a single content page. See below for more information.
12
+
13
+ * 1 major enhancement
14
+ ** Multiple output files can be generated from a single page
15
+ * 2 minor enhancements
16
+ ** Pagination now honors the "page per directory" flag
17
+ ** Simplified the handling of meta-data at the top of files
18
+ * 2 bug fixes
19
+ ** Filename extensions were not being preserved when creating a new page
20
+ ** Webby now works properly with rake 0.8.2
21
+
22
+ h3. Multiple Output Files
23
+
24
+ What's that, you say? Multiple output files, you say?
25
+
26
+ Why, yes!
27
+
28
+ Let's take the example of a photo gallery containing a page of thumbnails that each link to a larger picture with a title and a description. To make such a creation in webby would require each "large picture" page to have it's own file in the content directory, but the only difference between these files would be the _title_ and the _description_.
29
+
30
+ A better way to handle such a beastie would be a single file in the content folder that contains the titles and descriptions of *all* the photos in the meta-data. The content of this page would be filled in differently for each specific photo page generated.
31
+
32
+ This is now possible in webby by specifying the specifics for each photo in separate meta-data blocks at the top of the page. One output file will be generated for each meta-data block.
33
+
34
+ <pre>
35
+ <%= Webby::YAML_SEP %>
36
+ title: First Photo
37
+ created_at: 2008-09-10 19:33:47.822421 -06:00
38
+ filter:
39
+ - erb
40
+ - textile
41
+ filename: photo-1
42
+ photo: IMG001.jpg
43
+ description: This is the first photo
44
+ <%= Webby::YAML_SEP %>
45
+ title: Second Photo
46
+ filename: photo-2
47
+ photo: IMG002.jpg
48
+ description: This is the second photo
49
+ <%= Webby::YAML_SEP %>
50
+ title: Thrid Photo
51
+ filename: photo-3
52
+ photo: IMG003.jpg
53
+ description: This is the thrid photo
54
+ <%= Webby::YAML_SEP %>
55
+ h1. <%%= @page.title %>
56
+
57
+ !<%%= @page.photo %>!
58
+
59
+ p(desc). <%%= description %>
60
+ </pre>
61
+
62
+ The example above will result in three output files being generated. The output destination is generated by combining the @directory@ / @filename@ . @extension@ One of those must be different in each meta-data block, otherwise the resulting output files will overwrite one another. In the example, I have chose to modify the @filename@.
63
+
64
+ The first meta-data block defines the base set of meta-data for the page. Each subsequent meta-data block _modifies_ the meta-data of the first block. So, each resulting output file will be processed by the erb and textile filters (because they appear in the first meta-data block) without having to explicitly specify those filters in each block. Meta-data defined in the second block does not affect the third or subsequent blocks; only the *first* meta-data block defines inheritable parameters.
65
+
66
+ h4. Another Example
67
+
68
+ Let's say you want to generate an HTML file *and* a PDF file for a single page. This is easily done by specifying different filters.
69
+
70
+ <pre>
71
+ <%= Webby::YAML_SEP %>
72
+ title: Downloadable Instructions
73
+ created_at: 2008-09-10 19:33:47.822421 -06:00
74
+ filter:
75
+ - erb
76
+ - textile
77
+ <%= Webby::YAML_SEP %>
78
+ extension: pdf
79
+ layout: none
80
+ filter:
81
+ - erb
82
+ - textile
83
+ - htmldoc
84
+ <%= Webby::YAML_SEP %>
85
+
86
+ content goes here ...
87
+ </pre>
88
+
89
+ In this example, the first meta-data block generates an HTML page in the standard webby fashion -- render the page and insert into the default layout. The second meta-data block adds the "htmldoc" filter<sup><a href="#fn1">1</a></sup> to the end of the filter stack. This uses the "htmldoc":http://www.htmldoc.org program to convert HTML into PDF format.
90
+
91
+ Again, we specify a different output file by changing the extension from the default to "pdf", and we prevent site navigation and headers / footers from appearing in the generated PDF by setting the layout to none. The title is inherited from the first meta-data block.
92
+
93
+ fn1(fn). This filter does not exist, but the "htmldoc":http://www.htmldoc.org program does exist. So the filter is not out of the question, and it most likely will make an appearance in a later release of webby.
@@ -0,0 +1,14 @@
1
+ ---
2
+ title: Release 0.9.2
3
+ created_at: 2008-09-11 19:33:47.822421 -06:00
4
+ filter:
5
+ - erb
6
+ - textile
7
+ release_name: Gallus Gallus Toothicus ++
8
+ ---
9
+ h2. <%= h(@page.title) %>
10
+
11
+ Release 0.9.2 is a bug-fix release. No new features or enhancements.
12
+
13
+ * 1 bug fix
14
+ ** Layouts were not being found if more than one layout was in a directory in the layouts folder
@@ -0,0 +1,47 @@
1
+ ---
2
+ title: Release 0.9.3
3
+ created_at: 2008-10-08 21:22:41.217238 -06:00
4
+ filter:
5
+ - erb
6
+ - textile
7
+ release_name: Bill Gates Alien Love Child
8
+ ---
9
+ h2. <%= h(@page.title) %>
10
+
11
+ Release 0.9.3 adds several new features and fixes a few bugs. The two most significant features are a "wikiwords" filter and a special webby gem for the windows platform. See below for more information.
12
+
13
+ * 4 minor enhancements
14
+ ** Added a "wikiwords" filter to process [[text]] as links to other pages (thanks to Paul)
15
+ ** Added colorization to the output text (facets gem required)
16
+ ** Replaced the Heel webserver with webrick
17
+ ** Special windows version with windows line endings in generated files
18
+ * 2 bug fixes
19
+ ** Fixed a bug on Windows where line endings were messing with meta-data
20
+ ** The paginator was not linking correctly back to the first page from subsequent pages in a list
21
+
22
+ h3. Wiki Words
23
+
24
+ Wiki Words provide a convenient way to link to other pages in a site based on the page titles. Page titles surrounded by double brackets will be converted into a link to that particular page.
25
+
26
+ <pre>
27
+ <%= Webby::YAML_SEP %>
28
+ title: Special Report
29
+ created_at: 2008-10-08 21:22:41.217238 -06:00
30
+ filter:
31
+ - wikiwords
32
+ - textile
33
+ <%= Webby::YAML_SEP %>
34
+ h1. Special Report
35
+
36
+ This page is a special report that links to some [[Other Page]] in the site and
37
+ offers a little more information. You can find out more in the [[Reference]]
38
+ page, too.
39
+ </pre>
40
+
41
+ So, in the example above two links will be generated. One will link to the "Other Page" and the second will link to the "Reference" page.
42
+
43
+ h3. Windows Support
44
+
45
+ This release also fixes a few issues with webby on the windows platform. Both issues concern windows line endings versus UNIX line endings in files. The code that parses meta-data has been updated to be line ending agnostic -- so no need to use UNIX line endings in the windows world.
46
+
47
+ The second issue is a windows specific version of the webby gem. This gem has the template site files converted to the windows line ending style. So when a site is created using the webby-gen command, the resulting files should be in the native windows format.