radiant 0.5.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of radiant might be problematic. Click here for more details.

Files changed (205) hide show
  1. data/CHANGELOG +1 -0
  2. data/CONTRIBUTORS +12 -0
  3. data/LICENSE +9 -0
  4. data/README +91 -0
  5. data/Rakefile +10 -0
  6. data/app/behaviors/archive_behavior.rb +42 -0
  7. data/app/behaviors/archive_day_index_behavior.rb +30 -0
  8. data/app/behaviors/archive_month_index_behavior.rb +30 -0
  9. data/app/behaviors/archive_year_index_behavior.rb +30 -0
  10. data/app/behaviors/env_behavior.rb +18 -0
  11. data/app/behaviors/page_missing_behavior.rb +31 -0
  12. data/app/controllers/admin/export_controller.rb +8 -0
  13. data/app/controllers/admin/layout_controller.rb +23 -0
  14. data/app/controllers/admin/model_controller.rb +119 -0
  15. data/app/controllers/admin/page_controller.rb +119 -0
  16. data/app/controllers/admin/snippet_controller.rb +6 -0
  17. data/app/controllers/admin/user_controller.rb +45 -0
  18. data/app/controllers/admin/welcome_controller.rb +39 -0
  19. data/app/controllers/application.rb +32 -0
  20. data/app/controllers/site_controller.rb +54 -0
  21. data/app/filters/markdown_filter.rb +9 -0
  22. data/app/filters/textile_filter.rb +9 -0
  23. data/app/helpers/admin/export_helper.rb +2 -0
  24. data/app/helpers/admin/layout_helper.rb +2 -0
  25. data/app/helpers/admin/page_helper.rb +10 -0
  26. data/app/helpers/admin/snippet_helper.rb +2 -0
  27. data/app/helpers/admin/user_helper.rb +2 -0
  28. data/app/helpers/admin/welcome_helper.rb +2 -0
  29. data/app/helpers/application_helper.rb +141 -0
  30. data/app/helpers/site_helper.rb +2 -0
  31. data/app/models/archive_finder.rb +66 -0
  32. data/app/models/behavior.rb +194 -0
  33. data/app/models/layout.rb +13 -0
  34. data/app/models/page.rb +91 -0
  35. data/app/models/page_context.rb +526 -0
  36. data/app/models/page_part.rb +13 -0
  37. data/app/models/radiant/config.rb +53 -0
  38. data/app/models/radiant/exporter.rb +11 -0
  39. data/app/models/response_cache.rb +112 -0
  40. data/app/models/snippet.rb +16 -0
  41. data/app/models/status.rb +31 -0
  42. data/app/models/text_filter.rb +11 -0
  43. data/app/models/user.rb +70 -0
  44. data/app/models/user_action_observer.rb +13 -0
  45. data/app/views/admin/layout/index.rhtml +38 -0
  46. data/app/views/admin/layout/new.rhtml +37 -0
  47. data/app/views/admin/layout/remove.rhtml +17 -0
  48. data/app/views/admin/page/_node.rhtml +51 -0
  49. data/app/views/admin/page/_part.rhtml +17 -0
  50. data/app/views/admin/page/children.rhtml +4 -0
  51. data/app/views/admin/page/index.rhtml +172 -0
  52. data/app/views/admin/page/new.rhtml +164 -0
  53. data/app/views/admin/page/remove.rhtml +14 -0
  54. data/app/views/admin/snippet/index.rhtml +36 -0
  55. data/app/views/admin/snippet/new.rhtml +28 -0
  56. data/app/views/admin/snippet/remove.rhtml +16 -0
  57. data/app/views/admin/user/index.rhtml +43 -0
  58. data/app/views/admin/user/new.rhtml +48 -0
  59. data/app/views/admin/user/preferences.rhtml +29 -0
  60. data/app/views/admin/user/remove.rhtml +16 -0
  61. data/app/views/admin/welcome/login.rhtml +51 -0
  62. data/app/views/layouts/application.rhtml +75 -0
  63. data/app/views/site/not_found.rhtml +3 -0
  64. data/bin/radiant +305 -0
  65. data/config/boot.rb +80 -0
  66. data/config/database.mysql.yml +20 -0
  67. data/config/database.postgresql.yml +20 -0
  68. data/config/database.sqlite.yml +20 -0
  69. data/config/environment.rb +76 -0
  70. data/config/environments/development.rb +20 -0
  71. data/config/environments/production.rb +22 -0
  72. data/config/environments/test.rb +20 -0
  73. data/config/locomotive.yml +6 -0
  74. data/config/routes.rb +64 -0
  75. data/db/development_structure.sql +80 -0
  76. data/db/migrate/001_create_radiant_tables.rb +73 -0
  77. data/db/migrate/002_insert_initial_data.rb +45 -0
  78. data/db/migrate/003_rename_behavior_column.rb +9 -0
  79. data/db/migrate/004_rename_filter_column.rb +11 -0
  80. data/db/migrate/005_add_virtual_column_to_page.rb +9 -0
  81. data/db/migrate/006_integer_columns_to_boolean.rb +11 -0
  82. data/db/migrate/007_remove_virtual_column_from_page.rb +9 -0
  83. data/db/migrate/008_add_virtual_column_to_page_again.rb +9 -0
  84. data/db/migrate/009_add_content_type_field_to_layout.rb +9 -0
  85. data/db/schema.rb +74 -0
  86. data/db/templates/empty.yml +2 -0
  87. data/db/templates/simple-blog.yml +197 -0
  88. data/db/templates/styled-blog.yml +472 -0
  89. data/lib/advanced_delegation.rb +21 -0
  90. data/lib/archive_index_behavior_tags_and_methods.rb +48 -0
  91. data/lib/generators/behavior/USAGE +16 -0
  92. data/lib/generators/behavior/behavior_generator.rb +22 -0
  93. data/lib/generators/behavior/templates/model.rb.template +9 -0
  94. data/lib/generators/behavior/templates/unit_test.rb.template +16 -0
  95. data/lib/generators/filter/USAGE +16 -0
  96. data/lib/generators/filter/filter_generator.rb +22 -0
  97. data/lib/generators/filter/templates/model.rb.template +8 -0
  98. data/lib/generators/filter/templates/unit_test.rb.template +7 -0
  99. data/lib/inheritable_class_attributes.rb +65 -0
  100. data/lib/login_system.rb +80 -0
  101. data/lib/plugins/index_quoting_fix/init.rb +32 -0
  102. data/lib/plugins/string_io/init.rb +2 -0
  103. data/lib/radiant.rb +5 -0
  104. data/lib/registerable.rb +70 -0
  105. data/lib/tasks/release.rake +84 -0
  106. data/public/404.html +8 -0
  107. data/public/500.html +8 -0
  108. data/public/dispatch.cgi +10 -0
  109. data/public/dispatch.fcgi +24 -0
  110. data/public/dispatch.rb +10 -0
  111. data/public/favicon.ico +0 -0
  112. data/public/images/add-child.png +0 -0
  113. data/public/images/brown-bottom-line.gif +0 -0
  114. data/public/images/clear-page-cache.png +0 -0
  115. data/public/images/collapse.png +0 -0
  116. data/public/images/expand.png +0 -0
  117. data/public/images/minus.png +0 -0
  118. data/public/images/new-homepage.png +0 -0
  119. data/public/images/new-layout.png +0 -0
  120. data/public/images/new-snippet.png +0 -0
  121. data/public/images/new-user.png +0 -0
  122. data/public/images/page.png +0 -0
  123. data/public/images/plus.png +0 -0
  124. data/public/images/remove-disabled.png +0 -0
  125. data/public/images/remove.png +0 -0
  126. data/public/images/snippet.png +0 -0
  127. data/public/images/spinner.gif +0 -0
  128. data/public/images/view-site.gif +0 -0
  129. data/public/images/virtual-page.png +0 -0
  130. data/public/javascripts/application.js +2 -0
  131. data/public/javascripts/controls.js +815 -0
  132. data/public/javascripts/dragdrop.js +913 -0
  133. data/public/javascripts/effects.js +958 -0
  134. data/public/javascripts/pngfix.js +78 -0
  135. data/public/javascripts/prototype.js +2006 -0
  136. data/public/javascripts/ruledtable.js +28 -0
  137. data/public/javascripts/string.js +23 -0
  138. data/public/javascripts/tabcontrol.js +140 -0
  139. data/public/robots.txt +1 -0
  140. data/public/stylesheets/admin.css +464 -0
  141. data/script/about +3 -0
  142. data/script/breakpointer +3 -0
  143. data/script/console +3 -0
  144. data/script/destroy +3 -0
  145. data/script/generate +3 -0
  146. data/script/performance/benchmarker +3 -0
  147. data/script/performance/profiler +3 -0
  148. data/script/plugin +3 -0
  149. data/script/process/reaper +3 -0
  150. data/script/process/spawner +3 -0
  151. data/script/process/spinner +3 -0
  152. data/script/runner +3 -0
  153. data/script/server +3 -0
  154. data/script/setup_database +297 -0
  155. data/test/fixtures/layouts.yml +26 -0
  156. data/test/fixtures/page_parts.yml +99 -0
  157. data/test/fixtures/pages.yml +359 -0
  158. data/test/fixtures/pages.yml.rej +28 -0
  159. data/test/fixtures/snippets.yml +18 -0
  160. data/test/fixtures/users.yml +30 -0
  161. data/test/functional/admin/export_controller_test.rb +22 -0
  162. data/test/functional/admin/layout_controller_test.rb +40 -0
  163. data/test/functional/admin/model_controller_test.rb +152 -0
  164. data/test/functional/admin/page_controller_test.rb +179 -0
  165. data/test/functional/admin/snippet_controller_test.rb +11 -0
  166. data/test/functional/admin/user_controller_test.rb +71 -0
  167. data/test/functional/admin/welcome_controller_test.rb +48 -0
  168. data/test/functional/application_controller_test.rb +44 -0
  169. data/test/functional/login_system_test.rb +155 -0
  170. data/test/functional/site_controller_test.rb +172 -0
  171. data/test/helpers/archive_index_test_helper.rb +35 -0
  172. data/test/helpers/behavior_render_test_helper.rb +34 -0
  173. data/test/helpers/behavior_test_helper.rb +47 -0
  174. data/test/helpers/caching_test_helper.rb +41 -0
  175. data/test/helpers/layout_test_helper.rb +35 -0
  176. data/test/helpers/page_part_test_helper.rb +49 -0
  177. data/test/helpers/page_test_helper.rb +36 -0
  178. data/test/helpers/snippet_test_helper.rb +32 -0
  179. data/test/helpers/user_test_helper.rb +34 -0
  180. data/test/helpers/validation_test_helper.rb +42 -0
  181. data/test/test_helper.rb +54 -0
  182. data/test/unit/behavior_test.rb +196 -0
  183. data/test/unit/behaviors/archive_behavior_test.rb +33 -0
  184. data/test/unit/behaviors/archive_day_index_behavior_test.rb +21 -0
  185. data/test/unit/behaviors/archive_month_index_behavior_test.rb +21 -0
  186. data/test/unit/behaviors/archive_year_index_behavior_test.rb +21 -0
  187. data/test/unit/behaviors/page_missing_behavior_test.rb +27 -0
  188. data/test/unit/filters/markdown_filter_test.rb +14 -0
  189. data/test/unit/filters/textile_filter_test.rb +14 -0
  190. data/test/unit/inheritable_class_attributes_test.rb +47 -0
  191. data/test/unit/layout_test.rb +29 -0
  192. data/test/unit/page_context_test.rb +375 -0
  193. data/test/unit/page_context_test.rb.rej +26 -0
  194. data/test/unit/page_part_test.rb +44 -0
  195. data/test/unit/page_test.rb +224 -0
  196. data/test/unit/radiant/config_test.rb +46 -0
  197. data/test/unit/radiant/exporter_test.rb +26 -0
  198. data/test/unit/registerable_test.rb +68 -0
  199. data/test/unit/response_cache_test.rb +133 -0
  200. data/test/unit/snippet_test.rb +47 -0
  201. data/test/unit/status_test.rb +43 -0
  202. data/test/unit/text_filter_test.rb +14 -0
  203. data/test/unit/user_action_observer_test.rb +40 -0
  204. data/test/unit/user_test.rb +138 -0
  205. metadata +355 -0
@@ -0,0 +1,45 @@
1
+ class InsertInitialData < ActiveRecord::Migration
2
+ def self.up
3
+ now = Time.now
4
+
5
+ puts "Creating the user 'admin' with the password 'radiant'..."
6
+ admin = User.create :name => 'Administrator', :login => 'admin', :password => 'radiant', :password_confirmation => 'radiant', :admin => true, :created_at => now, :updated_at => now
7
+ admin.created_by = admin
8
+ admin.updated_by = admin
9
+ admin.save
10
+
11
+ puts "Initializing configuration..."
12
+ Radiant::Config['admin.title' ] = 'Radiant CMS'
13
+ Radiant::Config['admin.subtitle'] = 'Publishing for Small Teams'
14
+ Radiant::Config['default.parts' ] = 'body, extended'
15
+
16
+ puts "Create initial layout..."
17
+ layout = Layout.create :name => 'Normal', :content => <<-HTML, :created_at => now, :created_by => admin, :updated_at => now, :updated_by => admin
18
+ <html>
19
+ <head><title><r:title /></title></head>
20
+ <body>
21
+ <r:snippet name="header" />
22
+ <r:content />
23
+ <r:content part="extended" />
24
+ <r:snippet name="footer" />
25
+ </body>
26
+ </html>
27
+ HTML
28
+
29
+ puts "Creating home page..."
30
+ home_page = Page.create :title => 'Home Page', :slug => '/', :breadcrumb => 'Home', :status_id => 100, :parent_id => nil, :layout_id => layout, :created_at => now, :created_by => admin, :updated_at => now, :updated_by => admin
31
+ PagePart.create :name => 'body', :content => 'This is body content for your home page.', :page => home_page
32
+
33
+ puts "Creating snippets..."
34
+ Snippet.create :name => 'header', :content => <<-HTML
35
+ <h1><r:title /></h1>
36
+ HTML
37
+ Snippet.create :name => 'footer', :content => <<-HTML
38
+ <hr />
39
+ <p>Powered by <a href="http://radiantcms.org/">Radiant CMS</a></p>
40
+ HTML
41
+ end
42
+
43
+ def self.down
44
+ end
45
+ end
@@ -0,0 +1,9 @@
1
+ class RenameBehaviorColumn < ActiveRecord::Migration
2
+ def self.up
3
+ rename_column :pages, :behavior, :behavior_id
4
+ end
5
+
6
+ def self.down
7
+ rename_column :pages, :behavior_id, :behavior
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ class RenameFilterColumn < ActiveRecord::Migration
2
+ def self.up
3
+ rename_column :page_parts, :filter, :filter_id
4
+ rename_column :snippets, :filter, :filter_id
5
+ end
6
+
7
+ def self.down
8
+ rename_column :page_parts, :filter_id, :filter
9
+ rename_column :snippets, :filter_id, :filter
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ class AddVirtualColumnToPage < ActiveRecord::Migration
2
+ def self.up
3
+ add_column "pages", "virtual", :boolean, :null => false, :default => false
4
+ end
5
+
6
+ def self.down
7
+ remove_column "pages", "virtual"
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ class IntegerColumnsToBoolean < ActiveRecord::Migration
2
+ def self.up
3
+ change_column "users", "admin", :boolean, :default => false, :null => false
4
+ change_column "users", "developer", :boolean, :default => false, :null => false
5
+ end
6
+
7
+ def self.down
8
+ change_column "users", "admin", :integer, :limit => 1, :default => 0, :null => false
9
+ change_column "users", "developer", :integer, :limit => 1, :default => 0, :null => false
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ class RemoveVirtualColumnFromPage < ActiveRecord::Migration
2
+ def self.up
3
+ remove_column "pages", "virtual"
4
+ end
5
+
6
+ def self.down
7
+ add_column "pages", "virtual", :boolean, :null => false, :default => false
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class AddVirtualColumnToPageAgain < ActiveRecord::Migration
2
+ def self.up
3
+ add_column "pages", "virtual", :boolean, :null => false, :default => false
4
+ end
5
+
6
+ def self.down
7
+ remove_column "pages", "virtual"
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class AddContentTypeFieldToLayout < ActiveRecord::Migration
2
+ def self.up
3
+ add_column "layouts", "content_type", :string, :limit => 40
4
+ end
5
+
6
+ def self.down
7
+ remove_column "layouts", "content_type"
8
+ end
9
+ end
@@ -0,0 +1,74 @@
1
+ # This file is autogenerated. Instead of editing this file, please use the
2
+ # migrations feature of ActiveRecord to incrementally modify your database, and
3
+ # then regenerate this schema definition.
4
+
5
+ ActiveRecord::Schema.define(:version => 9) do
6
+
7
+ create_table "config", :force => true do |t|
8
+ t.column "key", :string, :limit => 40, :default => "", :null => false
9
+ t.column "value", :string, :default => ""
10
+ end
11
+
12
+ add_index "config", ["key"], :name => "key", :unique => true
13
+
14
+ create_table "layouts", :force => true do |t|
15
+ t.column "name", :string, :limit => 100
16
+ t.column "content", :text
17
+ t.column "content_type", :string, :limit => 40
18
+ t.column "created_at", :datetime
19
+ t.column "updated_at", :datetime
20
+ t.column "created_by", :integer
21
+ t.column "updated_by", :integer
22
+ end
23
+
24
+ create_table "page_parts", :force => true do |t|
25
+ t.column "name", :string, :limit => 100
26
+ t.column "filter_id", :string, :limit => 25
27
+ t.column "content", :text
28
+ t.column "page_id", :integer
29
+ end
30
+
31
+ create_table "pages", :force => true do |t|
32
+ t.column "title", :string
33
+ t.column "slug", :string, :limit => 100
34
+ t.column "breadcrumb", :string, :limit => 160
35
+ t.column "parent_id", :integer
36
+ t.column "layout_id", :integer
37
+ t.column "behavior_id", :string, :limit => 25
38
+ t.column "status_id", :integer, :default => 1, :null => false
39
+ t.column "created_at", :datetime
40
+ t.column "updated_at", :datetime
41
+ t.column "published_at", :datetime
42
+ t.column "created_by", :integer
43
+ t.column "updated_by", :integer
44
+ t.column "virtual", :boolean, :default => false, :null => false
45
+ end
46
+
47
+ create_table "snippets", :force => true do |t|
48
+ t.column "name", :string, :limit => 100, :default => "", :null => false
49
+ t.column "filter_id", :string, :limit => 25
50
+ t.column "content", :text
51
+ t.column "created_at", :datetime
52
+ t.column "updated_at", :datetime
53
+ t.column "created_by", :integer
54
+ t.column "updated_by", :integer
55
+ end
56
+
57
+ add_index "snippets", ["name"], :name => "name", :unique => true
58
+
59
+ create_table "users", :force => true do |t|
60
+ t.column "name", :string, :limit => 100
61
+ t.column "email", :string
62
+ t.column "login", :string, :limit => 40, :default => "", :null => false
63
+ t.column "password", :string, :limit => 40
64
+ t.column "admin", :boolean, :default => false, :null => false
65
+ t.column "developer", :boolean, :default => false, :null => false
66
+ t.column "created_at", :datetime
67
+ t.column "updated_at", :datetime
68
+ t.column "created_by", :integer
69
+ t.column "updated_by", :integer
70
+ end
71
+
72
+ add_index "users", ["login"], :name => "login", :unique => true
73
+
74
+ end
@@ -0,0 +1,2 @@
1
+ name: Empty
2
+ description: Don't create any pages, layouts, or snippets.
@@ -0,0 +1,197 @@
1
+ name: Simple Blog
2
+ description: Setup Radiant as a simple weblog.
3
+ records:
4
+ Layouts:
5
+ main:
6
+ id: 1
7
+ name: Normal
8
+ content: |
9
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
10
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
11
+ <html>
12
+ <head>
13
+ <title><r:title /></title>
14
+ <link href="/rss/" rel="alternate" title="RSS" type="application/rss+xml" />
15
+ <link rel="stylesheet" type="text/css" href="/styles.css" />
16
+ </head>
17
+ <body>
18
+ <r:snippet name="header" />
19
+ <div id="content">
20
+ <r:content />
21
+ <div id="extended">
22
+ <r:content part="extended" />
23
+ </div>
24
+ </div>
25
+ <r:snippet name="footer" />
26
+ </body>
27
+ </html>
28
+ css:
29
+ id: 2
30
+ name: Stylesheet
31
+ content_type: text/css
32
+ content: |
33
+ <r:content />
34
+ xml_feed:
35
+ id: 3
36
+ name: XML Feed
37
+ content_type: text/xml
38
+ content: |
39
+ <r:content />
40
+ Snippets:
41
+ header:
42
+ id: 1
43
+ name: header
44
+ content: |
45
+ <div id="header">
46
+ <h1><r:title /></h1>
47
+ </div>
48
+ <hr />
49
+ footer:
50
+ id: 2
51
+ name: footer
52
+ content: |
53
+ <hr />
54
+ <div id="footer">
55
+ <p>Powered by <a href="http://radiantcms.org/">Radiant CMS</a></p>
56
+ </div>
57
+ Pages:
58
+ home_page:
59
+ id: 1
60
+ title: Home Page
61
+ breadcrumb: Home
62
+ slug: /
63
+ layout_id: 1
64
+ status_id: 100
65
+ file_not_found:
66
+ id: 2
67
+ title: File Not Found
68
+ breadcrumb: File Not Found
69
+ slug: file-not-found
70
+ behavior_id: Page Missing
71
+ parent_id: 1
72
+ status_id: 100
73
+ rss_feed:
74
+ id: 3
75
+ title: RSS Feed
76
+ breadcrumb: RSS Feed
77
+ slug: rss
78
+ layout_id: 3
79
+ parent_id: 1
80
+ status_id: 100
81
+ articles:
82
+ id: 4
83
+ title: Articles
84
+ breadcrumb: Articles
85
+ slug: articles
86
+ behavior_id: Archive
87
+ parent_id: 1
88
+ status_id: 100
89
+ first_post:
90
+ id: 5
91
+ title: First Post
92
+ breadcrumb: First Post
93
+ slug: first-post
94
+ parent_id: 4
95
+ status_id: 100
96
+ second_post:
97
+ id: 6
98
+ title: Second Post
99
+ breadcrumb: Second Post
100
+ slug: second-post
101
+ parent_id: 4
102
+ status_id: 100
103
+ styles:
104
+ id: 7
105
+ title: Styles
106
+ breadcrumb: Styles
107
+ slug: styles.css
108
+ parent_id: 1
109
+ layout_id: 2
110
+ status_id: 100
111
+ PageParts:
112
+ home_page:
113
+ id: 1
114
+ name: body
115
+ page_id: 1
116
+ content: |
117
+ <r:find url="/articles/">
118
+ <r:children:each limit="5" order="desc">
119
+ <div class="entry">
120
+ <h3><r:link /> <small><r:author /></small></h3>
121
+ <r:content />
122
+ <r:if_content part="extended"><r:link anchor="extended">Continue Reading&#8230;</r:link></r:if_content>
123
+ </div>
124
+ </r:children:each>
125
+ </r:find>
126
+ file_not_found:
127
+ id: 2
128
+ name: body
129
+ page_id: 2
130
+ filter_id: Textile
131
+ content: |
132
+ The file you were looking for could not be found.
133
+
134
+ Attempted URL: @<r:attempted_url />@
135
+
136
+ It is possible that you typed the URL incorrectly or that you clicked on a bad link.
137
+
138
+ "<< Back to Home Page":/
139
+ rss_feed:
140
+ id: 3
141
+ name: body
142
+ page_id: 3
143
+ content: |
144
+ <?xml version="1.0" encoding="UTF-8"?>
145
+ <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
146
+ <channel>
147
+ <title>Article RSS Feed</title>
148
+ <link>http://your-web-site.com<r:url /></link>
149
+ <language>en-us</language>
150
+ <ttl>40</ttl>
151
+ <description>The main blog feed for my Web site.</description>
152
+ <r:find url="/articles/">
153
+ <r:children:each limit="10">
154
+ <item>
155
+ <title><r:title /></title>
156
+ <description><r:escape_html><r:content /></r:escape_html></description>
157
+ <pubDate><r:rfc1123_date /></pubDate>
158
+ <guid>http://your-web-site.com<r:url /></guid>
159
+ <link>http://your-web-site.com<r:url /></link>
160
+ </item>
161
+ </r:children:each>
162
+ </r:find>
163
+ </channel>
164
+ </rss>
165
+ articles:
166
+ id: 4
167
+ name: body
168
+ page_id: 4
169
+ content: |
170
+ <ul>
171
+ <r:children:each order="desc">
172
+ <li><r:link /></li>
173
+ </r:children:each>
174
+ </ul>
175
+ first_post:
176
+ id: 5
177
+ name: body
178
+ page_id: 5
179
+ filter_id: Textile
180
+ content: |
181
+ This post uses "textile":http://www.textism.com/tools/textile/.
182
+ second_post:
183
+ id: 6
184
+ name: body
185
+ page_id: 6
186
+ filter_id: Markdown
187
+ content: |
188
+ This post uses **Markdown**.
189
+ styles:
190
+ id: 7
191
+ name: body
192
+ page_id: 7
193
+ content: |
194
+ body {
195
+ font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
196
+ font-size: 80%;
197
+ }
@@ -0,0 +1,472 @@
1
+ name: Styled Blog
2
+ description: Setup Radiant as a fully styled weblog.
3
+ records:
4
+ Layouts:
5
+ 1:
6
+ name: Normal
7
+ id: 1
8
+ content: |
9
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
10
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
11
+ <html>
12
+ <head>
13
+ <title><r:title /></title>
14
+ <link href="/rss/" rel="alternate" title="RSS" type="application/rss+xml" />
15
+ <link rel="stylesheet" type="text/css" href="/styles.css" />
16
+ </head>
17
+ <body>
18
+ <div id="page">
19
+ <r:snippet name="header" />
20
+ <div id="main">
21
+ <div id="content-wrapper">
22
+ <div id="content">
23
+ <r:unless_url matches="^/$"><h1><r:title /></h1></r:unless_url>
24
+ <r:content />
25
+ <r:if_content part="extended">
26
+ <div id="extended">
27
+ <r:content part="extended" />
28
+ </div>
29
+ </r:if_content>
30
+ <r:if_url matches="^/articles/\d{4}/\d{2}/\d{2}/.+"><r:unless_url matches="-archives/$"><p class="info">Posted by <r:author /> on <r:date /></p></r:unless_url></r:if_url>
31
+ </div>
32
+ </div>
33
+ <div id="sidebar-wrapper">
34
+ <div id="sidebar">
35
+ <r:content part="sidebar" inherit="true" />
36
+ </div>
37
+ </div>
38
+ </div>
39
+ <r:snippet name="footer" />
40
+ </div>
41
+ </body>
42
+ </html>
43
+ 2:
44
+ name: Stylesheet
45
+ content_type: text/css
46
+ id: 2
47
+ content: |
48
+ <r:content />
49
+ 3:
50
+ name: XML Feed
51
+ content_type: text/xml
52
+ id: 3
53
+ content: |
54
+ <r:content />
55
+ Snippets:
56
+ 1:
57
+ name: header
58
+ id: 1
59
+ content: |
60
+ <div id="header">
61
+ <div id="site-title"><r:if_url matches="^/$">Your Blog Name</r:if_url><r:unless_url matches="^/$"><a href="/">Your Blog Name</a></r:unless_url></div>
62
+ <div id="site-subtitle">a really amusing tag-line here</div>
63
+ </div>
64
+ <hr class="hidden" />
65
+ 2:
66
+ name: footer
67
+ id: 2
68
+ content: |
69
+ <hr class="hidden" />
70
+ <div id="footer">
71
+ <p>Copyright &copy; <r:date format="%Y" />, Your Name Here. All rights reserved.<br />
72
+ This site is powered by <a href="http://radiantcms.org/">Radiant CMS</a>.</p>
73
+ </div>
74
+ Pages:
75
+ 1:
76
+ slug: /
77
+ title: Home Page
78
+ breadcrumb: Home
79
+ id: 1
80
+ status_id: 100
81
+ layout_id: 1
82
+ 2:
83
+ virtual: true
84
+ slug: file-not-found
85
+ behavior_id: Page Missing
86
+ title: File Not Found
87
+ breadcrumb: File Not Found
88
+ id: 2
89
+ status_id: 100
90
+ parent_id: 1
91
+ 3:
92
+ slug: rss
93
+ title: RSS Feed
94
+ breadcrumb: RSS Feed
95
+ id: 3
96
+ status_id: 100
97
+ parent_id: 1
98
+ layout_id: 3
99
+ 4:
100
+ slug: articles
101
+ behavior_id: Archive
102
+ title: Articles
103
+ breadcrumb: Articles
104
+ id: 4
105
+ status_id: 100
106
+ parent_id: 1
107
+ 5:
108
+ slug: first-post
109
+ title: First Post
110
+ breadcrumb: First Post
111
+ id: 5
112
+ status_id: 100
113
+ parent_id: 4
114
+ published_at: 06/09/2006
115
+ 6:
116
+ slug: second-post
117
+ title: Second Post
118
+ breadcrumb: Second Post
119
+ id: 6
120
+ status_id: 100
121
+ parent_id: 4
122
+ published_at: 06/10/2006
123
+ 7:
124
+ slug: styles.css
125
+ title: Styles
126
+ breadcrumb: Styles
127
+ id: 7
128
+ status_id: 100
129
+ parent_id: 1
130
+ layout_id: 2
131
+ 8:
132
+ slug: third-post
133
+ title: Third Post
134
+ breadcrumb: Third Post
135
+ id: 8
136
+ status_id: 100
137
+ parent_id: 4
138
+ 9:
139
+ slug: about
140
+ title: About
141
+ breadcrumb: About
142
+ id: 9
143
+ status_id: 100
144
+ parent_id: 1
145
+ 10:
146
+ virtual: true
147
+ slug: monthly-archives
148
+ behavior_id: Archive Month Index
149
+ title: "%B %Y Archives"
150
+ breadcrumb: Monthly Archives
151
+ id: 10
152
+ status_id: 100
153
+ parent_id: 4
154
+ PageParts:
155
+ 1:
156
+ name: body
157
+ page_id: 1
158
+ id: 1
159
+ content: |
160
+ <r:find url="/articles/">
161
+
162
+ <r:children:each limit="1" order="desc">
163
+ <div class="first entry">
164
+ <h3><r:link /></h3>
165
+ <r:content />
166
+ <r:if_content part="extended"><r:link anchor="extended">Continue Reading&#8230;</r:link></r:if_content>
167
+ <p class="info">Posted by <r:author /> on <r:date format="%b %d, %Y" /></p>
168
+ </div>
169
+ </r:children:each>
170
+
171
+ <r:children:each limit="4" offset="1" order="desc">
172
+ <div class="entry">
173
+ <h3><r:link /></h3>
174
+ <r:content />
175
+ <r:if_content part="extended"><r:link anchor="extended">Continue Reading&#8230;</r:link></r:if_content>
176
+ <p class="info">Posted by <r:author /> on <r:date format="%b %d, %Y" /></p>
177
+ </div>
178
+ </r:children:each>
179
+
180
+ </r:find>
181
+ 2:
182
+ name: body
183
+ filter_id: Textile
184
+ page_id: 2
185
+ id: 2
186
+ content: |
187
+ The file you were looking for could not be found.
188
+
189
+ Attempted URL: @<r:attempted_url />@
190
+
191
+ It is possible that you typed the URL incorrectly or that you clicked on a bad link.
192
+
193
+ "<< Back to Home Page":/
194
+ 3:
195
+ name: body
196
+ page_id: 3
197
+ id: 3
198
+ content: |
199
+ <?xml version="1.0" encoding="UTF-8"?>
200
+ <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
201
+ <channel>
202
+ <title>Article RSS Feed</title>
203
+ <link>http://your-web-site.com<r:url /></link>
204
+ <language>en-us</language>
205
+ <ttl>40</ttl>
206
+ <description>The main blog feed for my Web site.</description>
207
+ <r:find url="/articles/">
208
+ <r:children:each limit="10" order="desc">
209
+ <item>
210
+ <title><r:title /></title>
211
+ <description><r:escape_html><r:content /></r:escape_html></description>
212
+ <pubDate><r:rfc1123_date /></pubDate>
213
+ <guid>http://your-web-site.com<r:url /></guid>
214
+ <link>http://your-web-site.com<r:url /></link>
215
+ </item>
216
+ </r:children:each>
217
+ </r:find>
218
+ </channel>
219
+ </rss>
220
+ 4:
221
+ name: body
222
+ page_id: 4
223
+ id: 4
224
+ content: |-
225
+ <r:children:each limit="5" order="desc">
226
+ <div class="entry">
227
+ <h3><r:link /></h3>
228
+ <r:content />
229
+ <r:if_content part="extended"><r:link anchor="extended">Continue Reading&#8230;</r:link></r:if_content>
230
+ <p class="info">Posted by <r:author /> on <r:date format="%b %d, %Y" /></p>
231
+ </div>
232
+ </r:children:each>
233
+ 5:
234
+ name: body
235
+ filter_id: Textile
236
+ page_id: 5
237
+ id: 5
238
+ content: |
239
+ This post uses "textile":http://www.textism.com/tools/textile/.
240
+ 6:
241
+ name: body
242
+ filter_id: Markdown
243
+ page_id: 6
244
+ id: 6
245
+ content: |
246
+ This post uses **Markdown**.
247
+ 7:
248
+ name: body
249
+ page_id: 7
250
+ id: 7
251
+ content: |-
252
+ a {
253
+ color: #3256B6;
254
+ }
255
+ a:visited {
256
+ color: #cc9;
257
+ }
258
+ a:hover, a:visited:hover {
259
+ color: #e00;
260
+ text-decoration: none;
261
+ }
262
+ body {
263
+ background-color: #041a61;
264
+ font-family: Verdana, Arial, Helvetica, sans-serif;
265
+ font-size: 80%;
266
+ padding: 0;
267
+ margin: 0;
268
+ text-align: center;
269
+ }
270
+ h1 {
271
+ font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
272
+ font-size: 250%;
273
+ font-weight: normal;
274
+ }
275
+ h3 {
276
+ color: #999;
277
+ font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
278
+ font-size: 180%;
279
+ font-weight: normal;
280
+ margin-top: 1.5em;
281
+ margin-bottom: .5em;
282
+ }
283
+ .hidden {
284
+ display: none;
285
+ }
286
+ .clear {
287
+ clear: both;
288
+ }
289
+ #page {
290
+ margin-left: auto;
291
+ margin-right: auto;
292
+ width: 730px;
293
+ text-align: left;
294
+ }
295
+ #header {
296
+ background-color: #4f57c5;
297
+ border-bottom: 4px solid #fc0;
298
+ color: white;
299
+ font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
300
+ padding: 0;
301
+ padding-top: 30px;
302
+ padding-bottom: 30px;
303
+ text-align: center;
304
+ }
305
+ #site-title {
306
+ color: white;
307
+ font-size: 325%;
308
+ }
309
+ #site-title a, #site-title a:visited {
310
+ color: white;
311
+ text-decoration: none;
312
+ }
313
+ #site-title a:hover, #site-title a:hover {
314
+ color: white;
315
+ text-decoration: underline;
316
+ }
317
+ #site-subtitle {
318
+ font-style: italic;
319
+ letter-spacing: 2px;
320
+ text-transform: lowercase;
321
+ }
322
+ #main {
323
+ background-color: white;
324
+ border-bottom: 4px solid #fc0;
325
+ float: left;
326
+ width: 100%;
327
+ }
328
+ #content-wrapper {
329
+ float: left;
330
+ width: 500px;
331
+ }
332
+ #content {
333
+ padding: 25px;
334
+ border-right: 1px dotted #a3a39c;
335
+ }
336
+ #content h1 {
337
+ margin-top: 0;
338
+ }
339
+ #content h3 a {
340
+ border-bottom: 1px dotted #a3a39c;
341
+ display: block;
342
+ padding-bottom: 2px;
343
+ text-decoration: none;
344
+ }
345
+ #content p {
346
+ line-height: 160%;
347
+ }
348
+ #content .info {
349
+ color: #b0af99;
350
+ font-size: 80%;
351
+ margin-top: 1.5em;
352
+ }
353
+ #content .entry .info {
354
+ margin-top: 1em;
355
+ }
356
+ #content .first.entry {
357
+ background-color: #f7f3e8;
358
+ margin: -25px;
359
+ margin-bottom: 0;
360
+ padding: 25px;
361
+ }
362
+ #content .first.entry h3 {
363
+ margin-top: 0.25em;
364
+ }
365
+ #sidebar-wrapper {
366
+ float: right;
367
+ width: 225px;
368
+ }
369
+ #sidebar {
370
+ font-size: 90%;
371
+ padding: 15px;
372
+ padding-top: 0px;
373
+ }
374
+ #sidebar h3 {
375
+ font-size: 160%;
376
+ }
377
+ #sidebar p {
378
+ line-height: 140%;
379
+ }
380
+ #sidebar ul {
381
+ margin-left: 1.5em;
382
+ padding: 0;
383
+ }
384
+ #sidebar li {
385
+ margin-bottom: .25em;
386
+ }
387
+ #footer {
388
+ color: #818cb0;
389
+ float: left;
390
+ font-size: 90%;
391
+ padding-top: 1px;
392
+ padding-bottom: 20px;
393
+ width: 100%;
394
+ }
395
+ 8:
396
+ name: sidebar
397
+ filter_id: Textile
398
+ page_id: 1
399
+ id: 8
400
+ content: |-
401
+ h3. About Me
402
+
403
+ I'm just a demonstration of how easy it is to use Radiant to power a blog. "More...":/about/
404
+
405
+ h3. Favorite Sites
406
+
407
+ * "Radiant CMS":http://radiantcms.org
408
+ * "Wiseheart Design":http://wiseheartdesign.com
409
+ * "Redhanded":http://redhanded.hobix.com
410
+ * "Ruby-Lang":http://ruby-lang.org
411
+
412
+ h3. Recent Entries
413
+ <r:if_url matches="^/$">
414
+ <r:find url="/articles/"><r:children:each limit="10" offset="5" order="desc">
415
+ * <r:link /></r:children:each></r:find>
416
+ </r:if_url>
417
+ <r:unless_url matches="^/$">
418
+ <r:find url="/articles/"><r:children:each limit="10" order="desc">
419
+ * <r:link /></r:children:each></r:find>
420
+ </r:unless_url>
421
+
422
+ "Archives...":/articles/
423
+
424
+ h3. Syndicate
425
+
426
+ "Articles RSS Feed":/rss/
427
+ 9:
428
+ name: body
429
+ page_id: 8
430
+ id: 9
431
+ content: This is the third post.
432
+ 10:
433
+ name: body
434
+ filter_id: Textile
435
+ page_id: 9
436
+ id: 10
437
+ content: This is just an example of how Radiant can be used to power a Weblog.
438
+ 11:
439
+ name: sidebar
440
+ filter_id: Textile
441
+ page_id: 9
442
+ id: 11
443
+ content: |-
444
+ h3. Contact Me
445
+
446
+ List your contact information here.
447
+ 12:
448
+ name: sidebar
449
+ page_id: 4
450
+ id: 12
451
+ content: |-
452
+ <h3>Archives By Month</h3>
453
+ <ul>
454
+ <r:find url="/articles/">
455
+ <r:children:each order="desc">
456
+ <r:header><li><a href="<r:date format="/articles/%Y/%m/" />"><r:date format="%B %Y" /></a></li></r:header>
457
+ </r:children:each>
458
+ </r:find>
459
+ </ul>
460
+ 13:
461
+ name: body
462
+ page_id: 10
463
+ id: 13
464
+ content: |-
465
+ <r:archive:children:each order="desc">
466
+ <div class="entry">
467
+ <h3><r:link /></h3>
468
+ <r:content />
469
+ <r:if_content part="extended"><r:link anchor="extended">Continue Reading&#8230;</r:link></r:if_content>
470
+ <p class="info">Posted by <r:author /> on <r:date format="%b %d, %Y" /></p>
471
+ </div>
472
+ </r:archive:children:each>