bonsai 1.1.6 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,10 @@
1
+ = 1.2.0 (13/03/2010)
2
+
3
+ * Updates to default templates
4
+ - Now includes an image which is dynamically mapped to the filesystem
5
+ This shows the "magic" variable feature of Bonsai in action.
6
+ - Thanks to Philip Harrison
7
+
1
8
  = 1.1.6 (27/02/2010)
2
9
 
3
10
  * Updates to default templates
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.6
1
+ 1.2.0
data/bonsai.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{bonsai}
8
- s.version = "1.1.6"
8
+ s.version = "1.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ben Schwarz"]
12
- s.date = %q{2010-02-27}
12
+ s.date = %q{2010-03-13}
13
13
  s.default_executable = %q{bonsai}
14
14
  s.description = %q{A static site generator that uses the best toolset available}
15
15
  s.email = %q{ben.schwarz@gmail.com}
@@ -41,18 +41,18 @@ Gem::Specification.new do |s|
41
41
  "lib/bonsai/template.rb",
42
42
  "lib/bonsai/templates/content/1.varieties/1.fig/default.yml",
43
43
  "lib/bonsai/templates/content/1.varieties/2.maple/default.yml",
44
+ "lib/bonsai/templates/content/1.varieties/3.magic/images/magic.jpg",
45
+ "lib/bonsai/templates/content/1.varieties/3.magic/magic.yml",
44
46
  "lib/bonsai/templates/content/1.varieties/products.yml",
45
47
  "lib/bonsai/templates/content/2.cultivation/default.yml",
46
48
  "lib/bonsai/templates/content/3.history/default.yml",
47
49
  "lib/bonsai/templates/content/index/default.yml",
48
- "lib/bonsai/templates/output/.htaccess",
49
- "lib/bonsai/templates/output/docs/css/base.css",
50
- "lib/bonsai/templates/output/robots.txt",
51
50
  "lib/bonsai/templates/public/.htaccess",
52
51
  "lib/bonsai/templates/public/css/base.less",
53
52
  "lib/bonsai/templates/public/robots.txt",
54
53
  "lib/bonsai/templates/site.yml",
55
54
  "lib/bonsai/templates/templates/default.mustache",
55
+ "lib/bonsai/templates/templates/magic.mustache",
56
56
  "lib/bonsai/templates/templates/products.mustache",
57
57
  "lib/bonsai/templates/templates/shared/analytics.mustache",
58
58
  "lib/bonsai/templates/templates/shared/breadcrumbs.mustache",
@@ -127,7 +127,7 @@ Gem::Specification.new do |s|
127
127
  }
128
128
  s.rdoc_options = ["--charset=UTF-8"]
129
129
  s.require_paths = ["lib"]
130
- s.rubygems_version = %q{1.3.5}
130
+ s.rubygems_version = %q{1.3.6}
131
131
  s.summary = %q{A static site generator that uses the best toolset available}
132
132
  s.test_files = [
133
133
  "spec/bonsai/console_spec.rb",
@@ -0,0 +1,11 @@
1
+ :headline: Magic fruit
2
+ :body: |
3
+ Donec gravida posuere arcu. Nulla facilisi. Phasellus imperdiet. Vestibulum at metus. Integer euismod. Nullam placerat rhoncus sapien. Ut euismod. Praesent libero. Morbi pellentesque libero sit amet ante. Maecenas tellus. Maecenas erat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
4
+ ### This is magic
5
+ [More about variables][1]
6
+
7
+ [1]: http://tinytree.info/managing-pages/
8
+
9
+ :aside: |
10
+ #### Aside
11
+ Donec gravida posuere arcu. Nulla facilisi. Phasellus imperdiet. Vestibulum at metus. Integer euismod. Nullam placerat rhoncus sapien.
@@ -1,5 +1,5 @@
1
1
  /* HTML resets */
2
- h1, h2, h3, h4, h5, h6, p, ol, ul, li div, body, html, img, form, fieldset, input, textarea, p{ margin: 0; padding: 0; font-weight: normal; font-size: 100%; outline: none; border: none;}
2
+ body, html, div, p, img, h1, h2, h3, h4, h5, h6, ol, ul, li { margin: 0; padding: 0; font-weight: normal; font-size: 100%; outline: none; border: none;}
3
3
 
4
4
  /* HTML5 block elements */
5
5
  header, section, article, footer, aside, nav { display: block; }
@@ -10,34 +10,62 @@ header, section, article, footer, aside, nav { display: block; }
10
10
  body { font-family: "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif; }
11
11
 
12
12
  header {
13
- position: relative; margin-top: 5em;
13
+ margin-top: 5em;
14
14
 
15
15
  #logo {
16
- text-align: center; width: 145px; height: 145px; -moz-border-radius: 72px; -webkit-border-radius: 72px; background-color: black; color: white; margin: 0 auto;
17
- a { font-weight: 100; color: white; text-transform: lowercase; text-decoration: none; position: absolute; margin: 1em 0 0em 1.5em; }
18
- }
19
-
20
- #navigation {
21
- margin: 5em 0; text-transform: lowercase; text-align: center; font-style: italic; font-size: 0.8em;
16
+ width: 145px;
17
+ height: 145px;
18
+ margin: 0 auto;
19
+ -moz-border-radius: 72px;
20
+ -webkit-border-radius: 72px;
21
+ background-color: black;
22
22
 
23
+ a {
24
+ position: absolute;
25
+ margin: 1em 0 0em 1.5em;
26
+ color: white;
27
+ text-align: center;
28
+ text-transform: lowercase;
29
+ text-decoration: none;
30
+ font-weight: 100;
31
+ }
32
+
33
+ }
34
+
35
+ #navigation {
36
+ margin: 5em 0;
37
+ text-transform: lowercase;
38
+ text-align: center;
39
+ font-style: italic;
40
+ font-size: 0.8em;
23
41
  li:not(:last-child):after { content: " /"; }
42
+
24
43
  a { color: black; text-decoration: none; }
25
44
  a:hover { text-decoration: underline; }
45
+
26
46
  }
27
47
  }
28
48
 
49
+
29
50
  nav li { display: inline; list-style-type: none; }
30
51
 
31
- #breadcrumbs, footer { color: #666; font-size: 0.7em; }
52
+ #breadcrumbs, footer { color: gray; font-size: 0.7em; }
32
53
 
33
54
  #breadcrumbs {
34
- margin: 3em 0 0 0;
35
- li:not(:last-child):after { content: " →"; }
55
+ li:not(:last-child):after { content: " ➔";}
56
+ border-top: 1px solid lightgray;
57
+ padding-top:5px;
36
58
  a { color: inherit; }
37
59
  }
38
60
 
61
+ #sub-navigation{
62
+ font-size: 0.8em;
63
+ li { display: block; margin-bottom: 5px; }
64
+ }
65
+
39
66
  nav, footer { margin: 1em 0; }
40
67
 
68
+ /* Typesetting */
41
69
  h1, h2, h3, h4, h5, h6 { margin: 1.25em 0; }
42
70
 
43
71
  h1 { font-size: 2em; }
@@ -47,4 +75,19 @@ h4 { font-size: 1.2em; }
47
75
  h5 { font-size: 1em; }
48
76
  h6 { font-size: 0.9em; }
49
77
 
50
- p { font-size: 0.8em; line-height: 140%; margin-bottom: 10px; }
78
+ a { color: #256ec4; }
79
+ p { font-size: 0.8em; line-height: 140%; margin-bottom: 10px; color: #333;}
80
+
81
+ /* Floating the Magic template */
82
+ .magic article {
83
+ width: 450px;
84
+ float: left;
85
+ border-right: 1px solid lightgray;
86
+ margin-right: 14px;
87
+ padding-right: 15px;
88
+ }
89
+ .magic aside {
90
+ width: 180px;
91
+ float: left
92
+ }
93
+ .clear{ clear: both; }
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ {{> shared/head}}
4
+ <body id="{{slug}}">
5
+ <section id="wrapper" class="magic">
6
+ {{> shared/header}}
7
+
8
+ <article>
9
+ <h2>{{headline}}</h2>
10
+ {{{body}}}
11
+ <figure>
12
+ {{#images}} {{! renders files located in a "images" folder within you page content }}
13
+ <img src="{{path}}" alt="{{name}}" />
14
+ {{/images}}
15
+ </figure>
16
+ </article>
17
+ <aside>
18
+ {{{aside}}}
19
+ </aside>
20
+ <div class="clear"></div>
21
+ {{> shared/footer}}
22
+ </section>
23
+ {{> shared/analytics }}
24
+ </body>
25
+ </html>
@@ -1,5 +1,6 @@
1
1
  <nav id="navigation">
2
2
  <ol>
3
+ <li><a href="/">Home</a></li>
3
4
  {{# navigation}}
4
5
  <li><a href="{{permalink}}">{{name}}</a></li>
5
6
  {{/ navigation}}
@@ -41,8 +41,8 @@ describe Bonsai::Generate do
41
41
  Dir.glob("#{@path}/**/*", File::FNM_DOTMATCH).select{|f| File.file?(f) }.size.should == 21
42
42
  end
43
43
 
44
- it "should generate 15 directories" do
45
- Dir.glob("#{@path}/**/*").select{|f| File.directory?(f) }.size.should == 15
44
+ it "should generate 14 directories" do
45
+ Dir.glob("#{@path}/**/*").select{|f| File.directory?(f) }.size.should == 14
46
46
  end
47
47
  end
48
48
  end
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bonsai
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 2
8
+ - 0
9
+ version: 1.2.0
5
10
  platform: ruby
6
11
  authors:
7
12
  - Ben Schwarz
@@ -9,119 +14,160 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-02-27 00:00:00 +11:00
17
+ date: 2010-03-13 00:00:00 +11:00
13
18
  default_executable: bonsai
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: rspec
17
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - ">="
22
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 1
29
+ - 3
30
+ - 0
23
31
  version: 1.3.0
24
- version:
32
+ type: :development
33
+ version_requirements: *id001
25
34
  - !ruby/object:Gem::Dependency
26
35
  name: yard
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
30
38
  requirements:
31
39
  - - ">="
32
40
  - !ruby/object:Gem::Version
41
+ segments:
42
+ - 0
33
43
  version: "0"
34
- version:
44
+ type: :development
45
+ version_requirements: *id002
35
46
  - !ruby/object:Gem::Dependency
36
47
  name: tilt
37
- type: :runtime
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
48
+ prerelease: false
49
+ requirement: &id003 !ruby/object:Gem::Requirement
40
50
  requirements:
41
51
  - - ">="
42
52
  - !ruby/object:Gem::Version
53
+ segments:
54
+ - 0
55
+ - 5
43
56
  version: "0.5"
44
- version:
57
+ type: :runtime
58
+ version_requirements: *id003
45
59
  - !ruby/object:Gem::Dependency
46
60
  name: mustache
47
- type: :runtime
48
- version_requirement:
49
- version_requirements: !ruby/object:Gem::Requirement
61
+ prerelease: false
62
+ requirement: &id004 !ruby/object:Gem::Requirement
50
63
  requirements:
51
64
  - - ">="
52
65
  - !ruby/object:Gem::Version
66
+ segments:
67
+ - 0
68
+ - 5
69
+ - 0
53
70
  version: 0.5.0
54
- version:
71
+ type: :runtime
72
+ version_requirements: *id004
55
73
  - !ruby/object:Gem::Dependency
56
74
  name: builder
57
- type: :runtime
58
- version_requirement:
59
- version_requirements: !ruby/object:Gem::Requirement
75
+ prerelease: false
76
+ requirement: &id005 !ruby/object:Gem::Requirement
60
77
  requirements:
61
78
  - - ">="
62
79
  - !ruby/object:Gem::Version
80
+ segments:
81
+ - 2
82
+ - 1
83
+ - 2
63
84
  version: 2.1.2
64
- version:
85
+ type: :runtime
86
+ version_requirements: *id005
65
87
  - !ruby/object:Gem::Dependency
66
88
  name: watch
67
- type: :runtime
68
- version_requirement:
69
- version_requirements: !ruby/object:Gem::Requirement
89
+ prerelease: false
90
+ requirement: &id006 !ruby/object:Gem::Requirement
70
91
  requirements:
71
92
  - - ">="
72
93
  - !ruby/object:Gem::Version
94
+ segments:
95
+ - 0
96
+ - 1
97
+ - 0
73
98
  version: 0.1.0
74
- version:
99
+ type: :runtime
100
+ version_requirements: *id006
75
101
  - !ruby/object:Gem::Dependency
76
102
  name: sinatra
77
- type: :runtime
78
- version_requirement:
79
- version_requirements: !ruby/object:Gem::Requirement
103
+ prerelease: false
104
+ requirement: &id007 !ruby/object:Gem::Requirement
80
105
  requirements:
81
106
  - - ">="
82
107
  - !ruby/object:Gem::Version
108
+ segments:
109
+ - 0
110
+ - 9
111
+ - 4
83
112
  version: 0.9.4
84
- version:
113
+ type: :runtime
114
+ version_requirements: *id007
85
115
  - !ruby/object:Gem::Dependency
86
116
  name: maruku
87
- type: :runtime
88
- version_requirement:
89
- version_requirements: !ruby/object:Gem::Requirement
117
+ prerelease: false
118
+ requirement: &id008 !ruby/object:Gem::Requirement
90
119
  requirements:
91
120
  - - ">="
92
121
  - !ruby/object:Gem::Version
122
+ segments:
123
+ - 0
124
+ - 6
125
+ - 0
93
126
  version: 0.6.0
94
- version:
127
+ type: :runtime
128
+ version_requirements: *id008
95
129
  - !ruby/object:Gem::Dependency
96
130
  name: less
97
- type: :runtime
98
- version_requirement:
99
- version_requirements: !ruby/object:Gem::Requirement
131
+ prerelease: false
132
+ requirement: &id009 !ruby/object:Gem::Requirement
100
133
  requirements:
101
134
  - - ">="
102
135
  - !ruby/object:Gem::Version
136
+ segments:
137
+ - 1
138
+ - 2
139
+ - 17
103
140
  version: 1.2.17
104
- version:
141
+ type: :runtime
142
+ version_requirements: *id009
105
143
  - !ruby/object:Gem::Dependency
106
144
  name: rack
107
- type: :runtime
108
- version_requirement:
109
- version_requirements: !ruby/object:Gem::Requirement
145
+ prerelease: false
146
+ requirement: &id010 !ruby/object:Gem::Requirement
110
147
  requirements:
111
148
  - - ">="
112
149
  - !ruby/object:Gem::Version
150
+ segments:
151
+ - 1
152
+ - 1
153
+ - 0
113
154
  version: 1.1.0
114
- version:
155
+ type: :runtime
156
+ version_requirements: *id010
115
157
  - !ruby/object:Gem::Dependency
116
158
  name: launchy
117
- type: :runtime
118
- version_requirement:
119
- version_requirements: !ruby/object:Gem::Requirement
159
+ prerelease: false
160
+ requirement: &id011 !ruby/object:Gem::Requirement
120
161
  requirements:
121
162
  - - ">="
122
163
  - !ruby/object:Gem::Version
164
+ segments:
165
+ - 0
166
+ - 3
167
+ - 3
123
168
  version: 0.3.3
124
- version:
169
+ type: :runtime
170
+ version_requirements: *id011
125
171
  description: A static site generator that uses the best toolset available
126
172
  email: ben.schwarz@gmail.com
127
173
  executables:
@@ -154,18 +200,18 @@ files:
154
200
  - lib/bonsai/template.rb
155
201
  - lib/bonsai/templates/content/1.varieties/1.fig/default.yml
156
202
  - lib/bonsai/templates/content/1.varieties/2.maple/default.yml
203
+ - lib/bonsai/templates/content/1.varieties/3.magic/images/magic.jpg
204
+ - lib/bonsai/templates/content/1.varieties/3.magic/magic.yml
157
205
  - lib/bonsai/templates/content/1.varieties/products.yml
158
206
  - lib/bonsai/templates/content/2.cultivation/default.yml
159
207
  - lib/bonsai/templates/content/3.history/default.yml
160
208
  - lib/bonsai/templates/content/index/default.yml
161
- - lib/bonsai/templates/output/.htaccess
162
- - lib/bonsai/templates/output/docs/css/base.css
163
- - lib/bonsai/templates/output/robots.txt
164
209
  - lib/bonsai/templates/public/.htaccess
165
210
  - lib/bonsai/templates/public/css/base.less
166
211
  - lib/bonsai/templates/public/robots.txt
167
212
  - lib/bonsai/templates/site.yml
168
213
  - lib/bonsai/templates/templates/default.mustache
214
+ - lib/bonsai/templates/templates/magic.mustache
169
215
  - lib/bonsai/templates/templates/products.mustache
170
216
  - lib/bonsai/templates/templates/shared/analytics.mustache
171
217
  - lib/bonsai/templates/templates/shared/breadcrumbs.mustache
@@ -239,18 +285,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
239
285
  requirements:
240
286
  - - ">="
241
287
  - !ruby/object:Gem::Version
288
+ segments:
289
+ - 0
242
290
  version: "0"
243
- version:
244
291
  required_rubygems_version: !ruby/object:Gem::Requirement
245
292
  requirements:
246
293
  - - ">="
247
294
  - !ruby/object:Gem::Version
295
+ segments:
296
+ - 0
248
297
  version: "0"
249
- version:
250
298
  requirements: []
251
299
 
252
300
  rubyforge_project:
253
- rubygems_version: 1.3.5
301
+ rubygems_version: 1.3.6
254
302
  signing_key:
255
303
  specification_version: 3
256
304
  summary: A static site generator that uses the best toolset available
@@ -1,28 +0,0 @@
1
- DirectoryIndex index.html
2
- FileETag All
3
-
4
- # Compress all static assets
5
- <IfModule mod_deflate.c>
6
- # compress content with type html, text, and css
7
- AddOutputFilterByType DEFLATE text/css text/html text/javascript application/javascript application/x-javascript text/js text/plain text/xml
8
-
9
- <IfModule mod_headers.c>
10
- # properly handle requests coming from behind proxies
11
- Header append Vary User-Agent
12
- </IfModule>
13
- </IfModule>
14
-
15
- # Cache, aggressively
16
- <IfModule mod_expires.c>
17
- ExpiresActive On
18
- ExpiresDefault "access plus 10 days"
19
-
20
- <FilesMatch "\.(eot|ttf|otf)$">
21
- ExpiresDefault "access plus 10 years"
22
- </filesMatch>
23
- </IfModule>
24
-
25
- # Mime-types
26
- AddType application/vnd.ms-fontobject .eot
27
- AddType font/ttf .ttf
28
- AddType font/otf .otf
@@ -1,60 +0,0 @@
1
- h1, h2, h3, h4, h5, h6, p, ol, ul {
2
- margin: 0;
3
- padding: 0;
4
- font-weight: normal;
5
- }
6
- header, section, article, footer, aside, nav { display: block; }
7
- #wrapper {
8
- margin: 0 auto;
9
- width: 660px;
10
- }
11
- header {
12
- position: relative;
13
- margin-top: 5em;
14
- }
15
- header span { display: block; }
16
- header #logo {
17
- width: 145px;
18
- height: 145px;
19
- -moz-border-radius: 72px;
20
- -webkit-border-radius: 72px;
21
- border-radius: 72px;
22
- background-color: black;
23
- color: white;
24
- position: relative;
25
- margin: 0 auto;
26
- }
27
- header #logo a {
28
- color: white;
29
- text-decoration: none;
30
- position: absolute;
31
- margin: 1em 0 0 1.5em;
32
- text-align: center;
33
- text-transform: lowercase;
34
- }
35
- header #navigation {
36
- margin: 5em 0;
37
- text-transform: lowercase;
38
- text-align: center;
39
- font-style: italic;
40
- font-size: 0.8em;
41
- }
42
- header #navigation li:not(:last-child):after { content: " /"; }
43
- header #navigation a {
44
- color: black;
45
- text-decoration: none;
46
- }
47
- header #navigation a:hover { text-decoration: underline; }
48
- nav li {
49
- display: inline;
50
- list-style-type: none;
51
- }
52
- #breadcrumbs, footer {
53
- color: #666666;
54
- font-size: 0.7em;
55
- }
56
- #breadcrumbs { margin: 3em 0 0 0; }
57
- #breadcrumbs li:not(:last-child):after { content: " →"; }
58
- #breadcrumbs a { color: inherit; }
59
- nav, footer { margin: 1em 0; }
60
- h1, h2, h3, h4, h5, h6 { margin: 1.25em 0; }
@@ -1,2 +0,0 @@
1
- User-agent: *
2
- Allow: /