giraffesoft-webby 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (233) hide show
  1. data/History.txt +218 -0
  2. data/README.rdoc +92 -0
  3. data/Rakefile +62 -0
  4. data/bin/webby +41 -0
  5. data/bin/webby-gen +41 -0
  6. data/examples/blog/Sitefile +7 -0
  7. data/examples/blog/tasks/blog.rake +72 -0
  8. data/examples/blog/templates/atom_feed.erb +40 -0
  9. data/examples/blog/templates/blog/month.erb +22 -0
  10. data/examples/blog/templates/blog/post.erb +16 -0
  11. data/examples/blog/templates/blog/year.erb +22 -0
  12. data/examples/presentation/Sitefile +10 -0
  13. data/examples/presentation/content/css/uv/twilight.css +137 -0
  14. data/examples/presentation/content/presentation/_sample_code.txt +10 -0
  15. data/examples/presentation/content/presentation/index.txt +63 -0
  16. data/examples/presentation/content/presentation/s5/blank.gif +0 -0
  17. data/examples/presentation/content/presentation/s5/bodybg.gif +0 -0
  18. data/examples/presentation/content/presentation/s5/framing.css +23 -0
  19. data/examples/presentation/content/presentation/s5/iepngfix.htc +42 -0
  20. data/examples/presentation/content/presentation/s5/opera.css +7 -0
  21. data/examples/presentation/content/presentation/s5/outline.css +15 -0
  22. data/examples/presentation/content/presentation/s5/pretty.css +86 -0
  23. data/examples/presentation/content/presentation/s5/print.css +25 -0
  24. data/examples/presentation/content/presentation/s5/s5-core.css +9 -0
  25. data/examples/presentation/content/presentation/s5/slides.css +3 -0
  26. data/examples/presentation/content/presentation/s5/slides.js +553 -0
  27. data/examples/presentation/layouts/presentation.txt +43 -0
  28. data/examples/presentation/templates/_code_partial.erb +13 -0
  29. data/examples/presentation/templates/presentation.erb +40 -0
  30. data/examples/tumblog/Sitefile +9 -0
  31. data/examples/tumblog/content/css/tumblog.css +308 -0
  32. data/examples/tumblog/content/images/tumblog/permalink.gif +0 -0
  33. data/examples/tumblog/content/images/tumblog/rss.gif +0 -0
  34. data/examples/tumblog/content/tumblog/200806/the-noble-chicken/index.txt +12 -0
  35. data/examples/tumblog/content/tumblog/200807/historical-perspectives-on-the-classic-chicken-joke/index.txt +12 -0
  36. data/examples/tumblog/content/tumblog/200807/mad-city-chickens/index.txt +10 -0
  37. data/examples/tumblog/content/tumblog/200807/the-wisdom-of-the-dutch/index.txt +11 -0
  38. data/examples/tumblog/content/tumblog/200807/up-a-tree/index.txt +13 -0
  39. data/examples/tumblog/content/tumblog/index.txt +37 -0
  40. data/examples/tumblog/content/tumblog/rss.txt +37 -0
  41. data/examples/tumblog/layouts/tumblog/default.txt +44 -0
  42. data/examples/tumblog/layouts/tumblog/post.txt +15 -0
  43. data/examples/tumblog/lib/tumblog_helper.rb +32 -0
  44. data/examples/tumblog/tasks/tumblog.rake +30 -0
  45. data/examples/tumblog/templates/atom_feed.erb +40 -0
  46. data/examples/tumblog/templates/tumblog/conversation.erb +12 -0
  47. data/examples/tumblog/templates/tumblog/link.erb +10 -0
  48. data/examples/tumblog/templates/tumblog/photo.erb +13 -0
  49. data/examples/tumblog/templates/tumblog/post.erb +12 -0
  50. data/examples/tumblog/templates/tumblog/quote.erb +11 -0
  51. data/examples/webby/Sitefile +19 -0
  52. data/examples/webby/content/communicate/index.txt +28 -0
  53. data/examples/webby/content/css/background.gif +0 -0
  54. data/examples/webby/content/css/blueprint/print.css +76 -0
  55. data/examples/webby/content/css/blueprint/screen.css +696 -0
  56. data/examples/webby/content/css/coderay.css +96 -0
  57. data/examples/webby/content/css/site.css +196 -0
  58. data/examples/webby/content/css/uv/twilight.css +137 -0
  59. data/examples/webby/content/index.txt +37 -0
  60. data/examples/webby/content/learn/index.txt +28 -0
  61. data/examples/webby/content/reference/index.txt +204 -0
  62. data/examples/webby/content/release-notes/index.txt +21 -0
  63. data/examples/webby/content/release-notes/rel-0-9-0/index.txt +74 -0
  64. data/examples/webby/content/release-notes/rel-0-9-1/index.txt +93 -0
  65. data/examples/webby/content/release-notes/rel-0-9-2/index.txt +14 -0
  66. data/examples/webby/content/release-notes/rel-0-9-3/index.txt +47 -0
  67. data/examples/webby/content/robots.txt +6 -0
  68. data/examples/webby/content/script/jquery.corner.js +152 -0
  69. data/examples/webby/content/script/jquery.js +31 -0
  70. data/examples/webby/content/sitemap.txt +31 -0
  71. data/examples/webby/content/tips_and_tricks/index.txt +97 -0
  72. data/examples/webby/content/tutorial/index.txt +135 -0
  73. data/examples/webby/content/user-manual/index.txt +419 -0
  74. data/examples/webby/layouts/default.txt +49 -0
  75. data/examples/webby/templates/page.erb +10 -0
  76. data/examples/website/Sitefile +7 -0
  77. data/examples/website/content/css/blueprint/ie.css +26 -0
  78. data/examples/website/content/css/blueprint/plugins/buttons/icons/cross.png +0 -0
  79. data/examples/website/content/css/blueprint/plugins/buttons/icons/key.png +0 -0
  80. data/examples/website/content/css/blueprint/plugins/buttons/icons/tick.png +0 -0
  81. data/examples/website/content/css/blueprint/plugins/buttons/readme.txt +32 -0
  82. data/examples/website/content/css/blueprint/plugins/buttons/screen.css +97 -0
  83. data/examples/website/content/css/blueprint/plugins/fancy-type/readme.txt +14 -0
  84. data/examples/website/content/css/blueprint/plugins/fancy-type/screen.css +71 -0
  85. data/examples/website/content/css/blueprint/plugins/link-icons/icons/doc.png +0 -0
  86. data/examples/website/content/css/blueprint/plugins/link-icons/icons/email.png +0 -0
  87. data/examples/website/content/css/blueprint/plugins/link-icons/icons/external.png +0 -0
  88. data/examples/website/content/css/blueprint/plugins/link-icons/icons/feed.png +0 -0
  89. data/examples/website/content/css/blueprint/plugins/link-icons/icons/im.png +0 -0
  90. data/examples/website/content/css/blueprint/plugins/link-icons/icons/pdf.png +0 -0
  91. data/examples/website/content/css/blueprint/plugins/link-icons/icons/visited.png +0 -0
  92. data/examples/website/content/css/blueprint/plugins/link-icons/icons/xls.png +0 -0
  93. data/examples/website/content/css/blueprint/plugins/link-icons/readme.txt +18 -0
  94. data/examples/website/content/css/blueprint/plugins/link-icons/screen.css +40 -0
  95. data/examples/website/content/css/blueprint/plugins/rtl/readme.txt +10 -0
  96. data/examples/website/content/css/blueprint/plugins/rtl/screen.css +109 -0
  97. data/examples/website/content/css/blueprint/print.css +30 -0
  98. data/examples/website/content/css/blueprint/screen.css +251 -0
  99. data/examples/website/content/css/blueprint/src/forms.css +49 -0
  100. data/examples/website/content/css/blueprint/src/grid.css +212 -0
  101. data/examples/website/content/css/blueprint/src/grid.png +0 -0
  102. data/examples/website/content/css/blueprint/src/ie.css +59 -0
  103. data/examples/website/content/css/blueprint/src/print.css +85 -0
  104. data/examples/website/content/css/blueprint/src/reset.css +38 -0
  105. data/examples/website/content/css/blueprint/src/typography.css +105 -0
  106. data/examples/website/content/css/coderay.css +111 -0
  107. data/examples/website/content/css/site.css +67 -0
  108. data/examples/website/content/index.txt +19 -0
  109. data/examples/website/layouts/default.txt +61 -0
  110. data/examples/website/lib/breadcrumbs.rb +28 -0
  111. data/examples/website/templates/_partial.erb +10 -0
  112. data/examples/website/templates/page.erb +18 -0
  113. data/lib/webby.rb +233 -0
  114. data/lib/webby/apps.rb +12 -0
  115. data/lib/webby/apps/generator.rb +276 -0
  116. data/lib/webby/apps/main.rb +258 -0
  117. data/lib/webby/auto_builder.rb +157 -0
  118. data/lib/webby/builder.rb +172 -0
  119. data/lib/webby/core_ext/enumerable.rb +11 -0
  120. data/lib/webby/core_ext/hash.rb +28 -0
  121. data/lib/webby/core_ext/kernel.rb +26 -0
  122. data/lib/webby/core_ext/string.rb +163 -0
  123. data/lib/webby/core_ext/time.rb +9 -0
  124. data/lib/webby/filters.rb +85 -0
  125. data/lib/webby/filters/basepath.rb +97 -0
  126. data/lib/webby/filters/erb.rb +9 -0
  127. data/lib/webby/filters/haml.rb +18 -0
  128. data/lib/webby/filters/markdown.rb +16 -0
  129. data/lib/webby/filters/maruku.rb +16 -0
  130. data/lib/webby/filters/outline.rb +309 -0
  131. data/lib/webby/filters/sass.rb +17 -0
  132. data/lib/webby/filters/slides.rb +56 -0
  133. data/lib/webby/filters/textile.rb +16 -0
  134. data/lib/webby/filters/tidy.rb +76 -0
  135. data/lib/webby/filters/wiki_words.rb +14 -0
  136. data/lib/webby/helpers.rb +30 -0
  137. data/lib/webby/helpers/capture_helper.rb +141 -0
  138. data/lib/webby/helpers/coderay_helper.rb +69 -0
  139. data/lib/webby/helpers/graphviz_helper.rb +136 -0
  140. data/lib/webby/helpers/tag_helper.rb +65 -0
  141. data/lib/webby/helpers/tex_img_helper.rb +133 -0
  142. data/lib/webby/helpers/ultraviolet_helper.rb +63 -0
  143. data/lib/webby/helpers/url_helper.rb +241 -0
  144. data/lib/webby/journal.rb +126 -0
  145. data/lib/webby/link_validator.rb +160 -0
  146. data/lib/webby/renderer.rb +389 -0
  147. data/lib/webby/resources.rb +137 -0
  148. data/lib/webby/resources/db.rb +251 -0
  149. data/lib/webby/resources/layout.rb +54 -0
  150. data/lib/webby/resources/meta_file.rb +211 -0
  151. data/lib/webby/resources/page.rb +81 -0
  152. data/lib/webby/resources/partial.rb +85 -0
  153. data/lib/webby/resources/resource.rb +201 -0
  154. data/lib/webby/resources/static.rb +36 -0
  155. data/lib/webby/stelan/mktemp.rb +135 -0
  156. data/lib/webby/stelan/paginator.rb +165 -0
  157. data/lib/webby/tasks/build.rake +27 -0
  158. data/lib/webby/tasks/create.rake +25 -0
  159. data/lib/webby/tasks/deploy.rake +22 -0
  160. data/lib/webby/tasks/growl.rake +16 -0
  161. data/lib/webby/tasks/validate.rake +19 -0
  162. data/spec/core_ext/hash_spec.rb +47 -0
  163. data/spec/core_ext/string_spec.rb +110 -0
  164. data/spec/core_ext/time_spec.rb +19 -0
  165. data/spec/data/hooligans/bad_meta_data_1.txt +34 -0
  166. data/spec/data/hooligans/bad_meta_data_2.txt +34 -0
  167. data/spec/data/html/anchor.html +11 -0
  168. data/spec/data/html/external.html +10 -0
  169. data/spec/data/html/invalid-relative.html +10 -0
  170. data/spec/data/html/relative-anchor.html +10 -0
  171. data/spec/data/html/relative-invalid-anchor.html +10 -0
  172. data/spec/data/html/relative.html +10 -0
  173. data/spec/data/outline/basic.out +81 -0
  174. data/spec/data/outline/basic.txt +25 -0
  175. data/spec/data/outline/no_clobber.out +86 -0
  176. data/spec/data/outline/numbering.out +81 -0
  177. data/spec/data/outline/numbering_only.out +21 -0
  178. data/spec/data/outline/toc_range_1.out +66 -0
  179. data/spec/data/outline/toc_range_2.out +55 -0
  180. data/spec/data/outline/toc_style.out +81 -0
  181. data/spec/data/site/Sitefile +9 -0
  182. data/spec/data/site/content/_partial.txt +10 -0
  183. data/spec/data/site/content/css/coderay.css +111 -0
  184. data/spec/data/site/content/css/site.css +67 -0
  185. data/spec/data/site/content/css/tumblog.css +308 -0
  186. data/spec/data/site/content/images/tumblog/permalink.gif +0 -0
  187. data/spec/data/site/content/images/tumblog/rss.gif +0 -0
  188. data/spec/data/site/content/index.txt +19 -0
  189. data/spec/data/site/content/photos.txt +21 -0
  190. data/spec/data/site/content/tumblog/200806/the-noble-chicken/index.txt +12 -0
  191. data/spec/data/site/content/tumblog/200807/historical-perspectives-on-the-classic-chicken-joke/index.txt +12 -0
  192. data/spec/data/site/content/tumblog/200807/mad-city-chickens/index.txt +10 -0
  193. data/spec/data/site/content/tumblog/200807/the-wisdom-of-the-dutch/index.txt +11 -0
  194. data/spec/data/site/content/tumblog/200807/up-a-tree/index.txt +13 -0
  195. data/spec/data/site/content/tumblog/index.txt +37 -0
  196. data/spec/data/site/content/tumblog/rss.txt +37 -0
  197. data/spec/data/site/layouts/default.txt +58 -0
  198. data/spec/data/site/layouts/tumblog/default.txt +44 -0
  199. data/spec/data/site/layouts/tumblog/post.txt +15 -0
  200. data/spec/data/site/lib/breadcrumbs.rb +28 -0
  201. data/spec/data/site/lib/tumblog_helper.rb +32 -0
  202. data/spec/data/site/tasks/tumblog.rake +30 -0
  203. data/spec/data/site/templates/_partial.erb +10 -0
  204. data/spec/data/site/templates/atom_feed.erb +40 -0
  205. data/spec/data/site/templates/page.erb +18 -0
  206. data/spec/data/site/templates/presentation.erb +40 -0
  207. data/spec/data/site/templates/tumblog/conversation.erb +12 -0
  208. data/spec/data/site/templates/tumblog/link.erb +10 -0
  209. data/spec/data/site/templates/tumblog/photo.erb +13 -0
  210. data/spec/data/site/templates/tumblog/post.erb +12 -0
  211. data/spec/data/site/templates/tumblog/quote.erb +11 -0
  212. data/spec/spec.opts +1 -0
  213. data/spec/spec_helper.rb +58 -0
  214. data/spec/webby/apps/generator_spec.rb +117 -0
  215. data/spec/webby/apps/main_spec.rb +88 -0
  216. data/spec/webby/filters/basepath_spec.rb +167 -0
  217. data/spec/webby/filters/maruku_spec.rb +31 -0
  218. data/spec/webby/filters/outline_spec.rb +92 -0
  219. data/spec/webby/filters/textile_spec.rb +31 -0
  220. data/spec/webby/helpers/capture_helper_spec.rb +56 -0
  221. data/spec/webby/link_validator_spec.rb +154 -0
  222. data/spec/webby/renderer_spec.rb +139 -0
  223. data/spec/webby/resources/db_spec.rb +250 -0
  224. data/spec/webby/resources/layout_spec.rb +83 -0
  225. data/spec/webby/resources/meta_file_spec.rb +171 -0
  226. data/spec/webby/resources/page_spec.rb +111 -0
  227. data/spec/webby/resources/partial_spec.rb +58 -0
  228. data/spec/webby/resources/resource_spec.rb +219 -0
  229. data/spec/webby/resources/static_spec.rb +49 -0
  230. data/spec/webby/resources_spec.rb +69 -0
  231. data/tasks/mswin32.rake +38 -0
  232. data/tasks/website.rake +37 -0
  233. metadata +372 -0
@@ -0,0 +1,10 @@
1
+ ---
2
+ title: Mad City Chickens
3
+ created_at: 2008-07-26 16:11:09.306365 -06:00
4
+ author: Tim Pease
5
+ filter:
6
+ - textile
7
+ layout: tumblog/post
8
+ tumblog_type: link
9
+ ---
10
+ "(link)Raising chickens in Madison, WI":http://www.madcitychickens.com/
@@ -0,0 +1,11 @@
1
+ ---
2
+ title: The Wisdom of the Dutch
3
+ created_at: 2008-07-26 16:11:39.658919 -06:00
4
+ author: Tim Pease
5
+ filter:
6
+ - textile
7
+ layout: tumblog/post
8
+ tumblog_type: quote
9
+ ---
10
+ <big>&#147;</big> You can't hatch chickens from fried eggs.
11
+ %(source)Dutch Proverb%
@@ -0,0 +1,13 @@
1
+ ---
2
+ title: Up a Tree
3
+ created_at: 2008-07-06 16:09:49.530410 -06:00
4
+ author: Tim Pease
5
+ filter:
6
+ - erb
7
+ - textile
8
+ layout: tumblog/post
9
+ tumblog_type: photo
10
+ ---
11
+ !http://www.madcitychickens.com/images/bttrcups_tree.jpg(<%= h(@page.title) %>)!
12
+
13
+ p(caption). via "Mad City Chickens":http://www.madcitychickens.com/
@@ -0,0 +1,37 @@
1
+ ---
2
+ title: A Mother Clucker
3
+ author: Tim Pease
4
+ layout: tumblog/default
5
+ filter: erb
6
+ dirty: true
7
+ ---
8
+ <% prev = nil
9
+ posts = @pages.find(
10
+ :all,
11
+ :layout => 'tumblog/post',
12
+ :sort_by => :created_at,
13
+ :reverse => true
14
+ )
15
+ paginate(posts, 4) do |p| -%>
16
+ <div class="post">
17
+ <% if prev != p.created_at.strftime('%Y%m%d') -%>
18
+ <%= tumblog_date(p.created_at) %>
19
+ <% prev = p.created_at.strftime('%Y%m%d')
20
+ end -%>
21
+ <a href="<%= p.url %>">
22
+ <img src="/images/tumblog/permalink.gif" class="permalink" alt="permalink" />
23
+ </a>
24
+
25
+ <div class="<%= p.tumblog_type %>">
26
+ <% if p.title -%>
27
+ <h2><%= link_to_page(p) %></h2>
28
+ <% end -%>
29
+ <%= render(p) %>
30
+ </div>
31
+ </div>
32
+ <% end -%>
33
+
34
+ <% content_for :footer do -%>
35
+ <%= link_to("&#171; Prev", @pager.prev) if @pager.prev? %>
36
+ <%= link_to("Next &#187;", @pager.next) if @pager.next? %>
37
+ <% end -%>
@@ -0,0 +1,37 @@
1
+ ---
2
+ title: A Mother Clucker
3
+ subtitle: raising chickens in the city
4
+ site: example.com
5
+ author: Tim Pease
6
+ email: author@example.com
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 %>/tumblog/" 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
+ :layout => 'tumblog/post',
27
+ :sort_by => 'created_at',
28
+ :reverse => true).each do |article| %>
29
+ <entry>
30
+ <title><%= h(article.title) %></title>
31
+ <link href="<%= article.url %>" />
32
+ <id>tag:<%= @page.site %>,<%= article.created_at.strftime('%Y-%m-%d') %>:<%= article.created_at.to_i %></id>
33
+ <updated><%= article.created_at.xmlschema %></updated>
34
+ <content type="html"><%= h(render(article)) %></content>
35
+ </entry>
36
+ <% end %>
37
+ </feed>
@@ -0,0 +1,44 @@
1
+ ---
2
+ extension: html
3
+ filter: erb
4
+ ---
5
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
6
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
7
+
8
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
9
+ <head>
10
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
11
+ <title><%= h(@page.title) %></title>
12
+ <meta name="author" content="<%= h(@page.author) %>" />
13
+ <link rel="alternate" type="application/atom+xml" title="RSS" href="/tumblog/rss.xml"/>
14
+
15
+
16
+ <link rel="stylesheet" href="/css/tumblog.css" type="text/css" media="screen, projection" />
17
+ </head>
18
+ <body>
19
+
20
+ <h1>
21
+ <a href="/">Fowl Friends</a>
22
+ <a href="/tumblog/rss.xml"><img src="/images/tumblog/rss.gif" id="rss" alt="RSS" /></a>
23
+ </h1>
24
+
25
+ <div id="content">
26
+ <div id="description">
27
+ <div>
28
+ <p><a href="/tumblog/archive">Archive</a></p>
29
+ </div>
30
+ </div>
31
+
32
+ <%= @content %>
33
+
34
+ <div id="footer">
35
+ <%= content_for :footer %>
36
+
37
+ <div id="credit">
38
+ Powered by <a href="http://webby.rubyforge.org/">Webby</a>
39
+ </div>
40
+ </div>
41
+
42
+ </div>
43
+ </body>
44
+ </html>
@@ -0,0 +1,15 @@
1
+ ---
2
+ filter: erb
3
+ layout: tumblog/default
4
+ ---
5
+ <div class="post">
6
+ <%= tumblog_date(@page.created_at) %>
7
+ <a href="<%= @page.url %>">
8
+ <img src="/images/tumblog/permalink.gif" class="permalink" alt="permalink" />
9
+ </a>
10
+
11
+ <div class="<%= @page.tumblog_type %>">
12
+ <h2><%= link_to_page(@page) %></h2>
13
+ <%= @content %>
14
+ </div>
15
+ </div>
@@ -0,0 +1,32 @@
1
+
2
+ require 'time'
3
+
4
+ module TumblogHelper
5
+
6
+ DAYS = {}
7
+ (1..31).each {|day| DAYS[day] = "%dth" % day}
8
+ DAYS[1] = "1st"
9
+ DAYS[2] = "2nd"
10
+ DAYS[3] = "3rd"
11
+ DAYS[21] = "21st"
12
+ DAYS[22] = "22nd"
13
+ DAYS[23] = "23rd"
14
+ DAYS[31] = "31st"
15
+
16
+ def tumblog_date( time )
17
+ <<-HTML
18
+ <div class="date">
19
+ <div class="date_brick">
20
+ #{Time::RFC2822_MONTH_NAME.at(time.month-1)}<br />
21
+ #{TumblogHelper::DAYS[time.day]}
22
+ </div>
23
+ #{Time::RFC2822_DAY_NAME.at(time.wday)}
24
+ </div>
25
+ HTML
26
+ end
27
+
28
+ end # module TumblogHelper
29
+
30
+ Webby::Helpers.register(TumblogHelper)
31
+
32
+ # EOF
@@ -0,0 +1,30 @@
1
+
2
+ namespace :tumblog do
3
+
4
+ # iterate over all the files in the "templates/tumblog" folder and create a
5
+ # rake task corresponding to each file found
6
+ FileList["#{Webby.site.template_dir}/tumblog/*"].each do |template|
7
+ next unless test(?f, template)
8
+ name = template.pathmap('%n')
9
+
10
+ desc "Create a new tumblog #{name}"
11
+ task name do |t|
12
+ page = Webby.site.args.page
13
+ title = Webby.site.args.title
14
+ dir = Webby.site.args.dir
15
+
16
+ # if no directory was given use the default tumblog directory (underneath
17
+ # the content directory)
18
+ dir = Webby.site.tumblog_dir if dir.empty?
19
+ dir = File.join(dir, Time.now.strftime('%Y%m'))
20
+
21
+ page = File.join(dir, File.basename(page))
22
+ page = Webby::Builder.create(page, :from => template,
23
+ :locals => {:title => title, :directory => dir})
24
+ exec(::Webby.editor, page) unless ::Webby.editor.nil?
25
+ end
26
+ end # each
27
+
28
+ end # namespace :tumblog
29
+
30
+ # 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,12 @@
1
+ ---
2
+ title: <%= title %>
3
+ created_at: <%= Time.now.to_y %>
4
+ author: Your Name
5
+ filter:
6
+ - textile
7
+ layout: tumblog/post
8
+ tumblog_type: conversation
9
+ ---
10
+ * %(label)me :% Why did the chicken cross the road?
11
+ * %(label)Buddha :% If you ask this question, you deny your own chicken nature.
12
+ * %(label)Darwin :% Chickens, over great periods of time, have been naturally selected in such a way that they are now genetically predisposed to cross roads.
@@ -0,0 +1,10 @@
1
+ ---
2
+ title: <%= title %>
3
+ created_at: <%= Time.now.to_y %>
4
+ author: Your Name
5
+ filter:
6
+ - textile
7
+ layout: tumblog/post
8
+ tumblog_type: link
9
+ ---
10
+ "(link)Raising chickens in Madison, WI":http://www.madcitychickens.com/
@@ -0,0 +1,13 @@
1
+ ---
2
+ title: <%= title %>
3
+ created_at: <%= Time.now.to_y %>
4
+ author: Your Name
5
+ filter:
6
+ - erb
7
+ - textile
8
+ layout: tumblog/post
9
+ tumblog_type: photo
10
+ ---
11
+ !http://www.madcitychickens.com/images/bttrcups_tree.jpg(<%%= h(@page.title) %>)!
12
+
13
+ p(caption). via "Mad City Chickens":http://www.madcitychickens.com/
@@ -0,0 +1,12 @@
1
+ ---
2
+ title: <%= title %>
3
+ created_at: <%= Time.now.to_y %>
4
+ author: Your Name
5
+ filter:
6
+ - textile
7
+ layout: tumblog/post
8
+ tumblog_type: regular
9
+ ---
10
+ The *chicken* (_Gallus gallus_, sometimes _G. gallus domesticus_) is a domesticated fowl likely descended from the wild Indian and southeast Asian Red Junglefowl (_Gallus gallus_) and the related Grey Junglefowl (_G. sonneratii_). Traditionally it has been widely accepted that the chicken was descended solely from the former, as hybrids of both wild types tended toward sterility; but recent genetic work has revealed that the genotype for yellow skin present in the domestic fowl is not present in what is otherwise its closest kin, the Red Junglefowl. It is deemed most likely, then, that the yellow skin trait in domestic birds originated in the Grey Junglefowl.
11
+
12
+ The chicken is one of the most common and widespread domestic animals. With a population of more than 24 billion in 2003, there are more chickens in the world than any other bird. Humans keep chickens primarily as a source of food, with both their meat and their eggs consumed.
@@ -0,0 +1,11 @@
1
+ ---
2
+ title: <%= title %>
3
+ created_at: <%= Time.now.to_y %>
4
+ author: Your Name
5
+ filter:
6
+ - textile
7
+ layout: tumblog/post
8
+ tumblog_type: quote
9
+ ---
10
+ <big>&#147;</big> You can't hatch chickens from fried eggs.
11
+ %(source)Dutch Proverb%
@@ -0,0 +1,19 @@
1
+
2
+ task :default => :build
3
+
4
+ desc 'deploy the website to Rubyforge'
5
+ task :deploy => [:build, 'deploy:rsync']
6
+
7
+ SITE.user = 'tim_pease'
8
+ SITE.host = 'rubyforge.org'
9
+ SITE.remote_dir = '/var/www/gforge-projects/webby/'
10
+ SITE.create_mode = 'directory'
11
+
12
+ SITE.uv[:theme] = 'twilight'
13
+ SITE.uv[:line_numbers] = true
14
+
15
+ task :autobuild => :growl
16
+
17
+ SITE.site_root = "http://webby.rubyforge.org"
18
+
19
+ # EOF
@@ -0,0 +1,28 @@
1
+ ---
2
+ title: Communicate
3
+ created_at: 2008-08-24 15:37:45.654428 -06:00
4
+ filter:
5
+ - erb
6
+ - textile
7
+ ---
8
+ h1. <%= h(@page.title) %>
9
+
10
+ There is a community of people using Webby right now to make real web pages and publish them on the internet. They have walked down this path, and some have chosen to share their knowledge %(quiet)&#40;aren't they a nice bunch!)%. The Webby developer is also known to frequent the list -- your questions will most definitely find an answer ... or they might have been answered already.
11
+
12
+ p(pull). *<%= link_to('Forum', 'http://groups.google.com/group/webby-forum') %>*
13
+
14
+ p(pulltext). The Google group dedicated to Webby and _ASCII Alchemy_.
15
+
16
+ p(pull). *<%= link_to('Reporting Bugs', 'http://webby.lighthouseapp.com') %>*
17
+
18
+ p(pulltext). The occasional bug does rear its ugly head from time to time. If this happens please report it using the Lighthouse bug tracker.
19
+
20
+ h2. Elsewhere
21
+
22
+ A few kind souls have written up their experiences with Webby along with some of their tips and tricks.
23
+
24
+ * <%= link_to('Building Static Websites with Webby', 'http://clarkware.com/cgi/blosxom/2008/08/06#Webby') %> -- Mike Clark
25
+
26
+ h2. Errata
27
+
28
+ If you're interested in the development of Webby, you can follow along at home by watching the <%= link_to('github repository', 'http://github.com/TwP/webby/tree/master') %>.
@@ -0,0 +1,76 @@
1
+ body {
2
+ line-height:1.5;
3
+ font-family:"Helvetica Neue", "Lucida Grande", Arial, Verdana, sans-serif;
4
+ color:#000;
5
+ background:none;
6
+ font-size:10pt;
7
+ }
8
+
9
+ .container {
10
+ background:none;
11
+ }
12
+
13
+ h1,h2,h3,h4,h5,h6 {
14
+ font-family:"Helvetica Neue", Arial, "Lucida Grande", sans-serif;
15
+ }
16
+
17
+ code {
18
+ font:.9em "Courier New", Monaco, Courier, monospace;
19
+ }
20
+
21
+ img {
22
+ float:left;
23
+ margin:1.5em 1.5em 1.5em 0;
24
+ }
25
+
26
+ a img {
27
+ border:none;
28
+ }
29
+
30
+ p img.top {
31
+ margin-top:0;
32
+ }
33
+
34
+ hr {
35
+ background:#ccc;
36
+ color:#ccc;
37
+ width:100%;
38
+ height:2px;
39
+ border:none;
40
+ margin:2em 0;
41
+ padding:0;
42
+ }
43
+
44
+ blockquote {
45
+ font-style:italic;
46
+ font-size:.9em;
47
+ margin:1.5em;
48
+ padding:1em;
49
+ }
50
+
51
+ .small {
52
+ font-size:.9em;
53
+ }
54
+
55
+ .large {
56
+ font-size:1.1em;
57
+ }
58
+
59
+ .quiet {
60
+ color:#999;
61
+ }
62
+
63
+ .hide {
64
+ display:none;
65
+ }
66
+
67
+ a:link,a:visited {
68
+ background:transparent;
69
+ font-weight:700;
70
+ text-decoration:underline;
71
+ }
72
+
73
+ a:link:after,a:visited:after {
74
+ content:" (" attr(href) ") ";
75
+ font-size:90%;
76
+ }