staticmatic 0.9.5 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +6 -0
- data/Manifest.txt +24 -0
- data/README.rdoc +48 -0
- data/Rakefile +22 -27
- data/bin/staticmatic +0 -0
- data/lib/staticmatic.rb +12 -4
- data/lib/staticmatic/base.rb +30 -242
- data/lib/staticmatic/mixins/build.rb +46 -0
- data/lib/staticmatic/mixins/helpers.rb +15 -0
- data/lib/staticmatic/mixins/render.rb +125 -0
- data/lib/staticmatic/mixins/rescue.rb +12 -0
- data/lib/staticmatic/mixins/server.rb +6 -0
- data/lib/staticmatic/mixins/setup.rb +20 -0
- data/lib/staticmatic/template_error.rb +40 -0
- data/lib/staticmatic/templates/{application.haml → default/application.haml} +0 -0
- data/lib/staticmatic/templates/{application.sass → default/application.sass} +0 -0
- data/lib/staticmatic/templates/{index.haml → default/index.haml} +0 -0
- data/lib/staticmatic/templates/rescues/default.haml +7 -0
- data/lib/staticmatic/templates/rescues/template.haml +18 -0
- data/test/test_helper.rb +20 -48
- metadata +55 -124
- data/CHANGELOG +0 -57
- data/LICENSE +0 -21
- data/README +0 -56
- data/example/site/contact.html +0 -17
- data/example/site/index.html +0 -16
- data/example/site/javascripts/application.css +0 -2
- data/example/src/layouts/application.haml +0 -11
- data/example/src/pages/contact.haml +0 -3
- data/example/src/pages/index.haml +0 -3
- data/example/src/pages/test test/blah.haml +0 -1
- data/example/src/stylesheets/application.sass +0 -4
- data/lib/staticmatic/version.rb +0 -34
- data/test/base_test.rb +0 -60
- data/test/helpers_test.rb +0 -296
- data/test/sandbox/test_site/configuration.rb +0 -0
- data/test/sandbox/test_site/site/index.html +0 -10
- data/test/sandbox/test_site/site/stylesheets/application.css +0 -2
- data/test/sandbox/test_site/src/helpers/application_helper.rb +0 -5
- data/test/sandbox/test_site/src/layouts/alternate_layout.haml +0 -3
- data/test/sandbox/test_site/src/layouts/application.haml +0 -7
- data/test/sandbox/test_site/src/layouts/projects.haml +0 -1
- data/test/sandbox/test_site/src/pages/index.haml +0 -5
- data/test/sandbox/test_site/src/pages/layout_test.haml +0 -2
- data/test/sandbox/test_site/src/partials/menu.haml +0 -1
- data/test/sandbox/test_site/src/stylesheets/application.sass +0 -2
- data/test/server_test.rb +0 -12
- data/test/test_helper_test.rb +0 -49
- data/test/version_test.rb +0 -28
- data/website/site/download.html +0 -84
- data/website/site/faq.html +0 -101
- data/website/site/helper_central/index.html +0 -144
- data/website/site/how_to_use.html +0 -307
- data/website/site/images/bycurve21.gif +0 -0
- data/website/site/images/curve21.jpg +0 -0
- data/website/site/images/homepage-build.jpg +0 -0
- data/website/site/images/homepage-previewing.jpg +0 -0
- data/website/site/images/homepage-templating.jpg +0 -0
- data/website/site/index.html +0 -98
- data/website/site/releases/0_8_10.html +0 -106
- data/website/site/releases/0_8_4.html +0 -101
- data/website/site/releases/0_8_8.html +0 -96
- data/website/site/releases/0_9_0.html +0 -124
- data/website/site/stylesheets/application.css +0 -287
- data/website/src/helpers/application_helper.rb +0 -5
- data/website/src/layouts/application.haml +0 -43
- data/website/src/layouts/test.haml +0 -4
- data/website/src/pages/_qa.haml +0 -2
- data/website/src/pages/download.haml +0 -15
- data/website/src/pages/faq.haml +0 -8
- data/website/src/pages/helper_central/_helper.haml +0 -7
- data/website/src/pages/helper_central/index.haml +0 -21
- data/website/src/pages/how_to_use.haml +0 -270
- data/website/src/pages/index.haml +0 -27
- data/website/src/pages/releases/0_8_10.haml +0 -22
- data/website/src/pages/releases/0_8_4.haml +0 -25
- data/website/src/pages/releases/0_8_8.haml +0 -35
- data/website/src/pages/releases/0_9_0.haml +0 -34
- data/website/src/partials/news.haml +0 -10
@@ -1,43 +0,0 @@
|
|
1
|
-
!!!
|
2
|
-
%html{ :xmlns => "http://www.w3.org/1999/xhtml", :lang => "en", 'xml:lang' => "en" }
|
3
|
-
%head
|
4
|
-
%meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}
|
5
|
-
%title StaticMatic
|
6
|
-
= stylesheets
|
7
|
-
= stylesheets :reset, :application, :media => :screen
|
8
|
-
%body
|
9
|
-
#container
|
10
|
-
#header
|
11
|
-
.bycurve21= link(img("bycurve21.gif"), "http://www.curve21.com")
|
12
|
-
.title StaticMatic
|
13
|
-
|
14
|
-
#menu
|
15
|
-
|
16
|
-
%ul
|
17
|
-
%li= link "Home", "/"
|
18
|
-
%li= link "Download"
|
19
|
-
%li= link "How to use"
|
20
|
-
%li= link "FAQ"
|
21
|
-
%li= link "Community", "http://groups.google.co.uk/group/staticmatic"
|
22
|
-
%li= link "Helper Central", "helper_central/"
|
23
|
-
%li= link "Development", "http://rubyforge.org/projects/staticmatic"
|
24
|
-
#content_wrapper
|
25
|
-
#side
|
26
|
-
#news= partial("news")
|
27
|
-
|
28
|
-
#content
|
29
|
-
= yield
|
30
|
-
|
31
|
-
#footer
|
32
|
-
%p
|
33
|
-
Made with StaticMatic
|
34
|
-
= StaticMatic::VERSION::STRING
|
35
|
-
\, Hosted by
|
36
|
-
= link "RubyForge", "http://rubyforge.org"
|
37
|
-
|
38
|
-
%script{:src => "http://www.google-analytics.com/urchin.js", :type => "text/javascript"}
|
39
|
-
_hamlspace = "";
|
40
|
-
%script{:type => "text/javascript"}
|
41
|
-
_uacct = "UA-775359-8";
|
42
|
-
urchinTracker();
|
43
|
-
|
data/website/src/pages/_qa.haml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
%h1 Download
|
2
|
-
|
3
|
-
%p The simplest way to get StaticMatic is via RubyGems:
|
4
|
-
|
5
|
-
.code gem install staticmatic
|
6
|
-
|
7
|
-
%h3 Source Code
|
8
|
-
|
9
|
-
%p
|
10
|
-
You can get the source code from
|
11
|
-
= link "RubyForge", "http://rubyforge.org/projects/staticmatic/"
|
12
|
-
\:
|
13
|
-
|
14
|
-
.code svn checkout svn://rubyforge.org/var/svn/staticmatic/trunk staticmatic
|
15
|
-
|
data/website/src/pages/faq.haml
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
%h1 FAQ
|
2
|
-
|
3
|
-
=partial('qa', :locals => { :question => 'I hate Haml. Can I use a different template language?', :answer => 'No. At least not at the moment. Haml is perfect for our needs so we\'ve had no reason to investigate using other languages. However, StaticMatic is open source so patches are always welcome.' })
|
4
|
-
=partial('qa', :locals => { :question => 'I found a bug. How do I report it?', :answer => 'At the StaticMatic <a href="http://rubyforge.org/tracker/?func=browse&group_id=3712&atid=14306">Bug Tracker</a>.' })
|
5
|
-
=partial('qa', :locals => { :question => 'I\'d like a new feature. How do I request it?', :answer => 'At the StaticMatic <a href="http://rubyforge.org/tracker/?atid=14309&group_id=3712&func=browse">Feature Request Tracker</a>.' })
|
6
|
-
=partial('qa', :locals => { :question => 'I\'ve got a patch for you. How do I submit it?', :answer => 'At the StaticMatic <a href="http://rubyforge.org/tracker/?atid=14308&group_id=3712&func=browse">Patch Tracker</a>.' })
|
7
|
-
=partial('qa', :locals => { :question => 'How do I find neat helpers that other developers have written?', :answer => 'Go to the StaticMatic <a href="helper_central/">Helper Central</a>.' })
|
8
|
-
=partial('qa', :locals => { :question => 'I\'ve got a neat helper to share with the world. How do I do it?', :answer => 'Post on the <a href="http://groups.google.co.uk/group/staticmatic">StaticMatic Google Group</a> requesting it be added to the StaticMatic <a href="helper_central/">Helper Central</a>.' })
|
@@ -1,21 +0,0 @@
|
|
1
|
-
%h1 Helper Central
|
2
|
-
|
3
|
-
%p
|
4
|
-
This is a place where nifty helpers not accepted into core can be found.
|
5
|
-
%span.highlight Use them at your own risk. StaticMatic core developers are not responsible for these helpers or their results.
|
6
|
-
%br
|
7
|
-
%br
|
8
|
-
Helpers are listed in alphabetical order.
|
9
|
-
|
10
|
-
%table{:border => '0'}
|
11
|
-
%tr
|
12
|
-
%th Name
|
13
|
-
%th Description
|
14
|
-
%th Author
|
15
|
-
%th Download
|
16
|
-
=partial('helper', :locals => { :title => 'Blueprint Css', :author => 'Brent Beardsley', :description => 'Easily include blueprint css framework files and plugins', :download_link => 'http://staticmatic.rubyforge.org/svn/trunk/contrib/helpers/blueprintcss_helper.rb', :id => 'blueprintcss_helper' })
|
17
|
-
=partial('helper', :locals => { :title => 'Google Analytics', :author => 'Brent Beardsley', :description => 'Easily include google analytics javascript code using http or https', :download_link => 'http://staticmatic.rubyforge.org/svn/trunk/contrib/helpers/google_analytics_helper.rb', :id => 'google_analytics_helper' })
|
18
|
-
=partial('helper', :locals => { :title => 'Menubar', :author => 'Brent Beardsley', :description => 'Easily create a menubar using an unordered list', :download_link => 'http://staticmatic.rubyforge.org/svn/trunk/contrib/helpers/menubar_helper.rb', :id => 'menubar_helper' })
|
19
|
-
=partial('helper', :locals => { :title => 'Navigation', :author => 'Andrew Neil', :description => 'Easily create breadcrumbs, sitemaps, and menus.', :download_link => 'http://staticmatic.rubyforge.org/svn/trunk/contrib/helpers/navigation_helper.rb', :id => 'navigation_helper' })
|
20
|
-
=partial('helper', :locals => { :title => 'Rss List', :author => 'Brent Beardsley', :description => 'Easily create an unordered list from an rss feed. Special helpers for delicious, flickr, ebay, magnolia, and twitter.', :download_link => 'http://staticmatic.rubyforge.org/svn/trunk/contrib/helpers/rss_list_helper.rb', :id => 'rss_list_helper' })
|
21
|
-
|
@@ -1,270 +0,0 @@
|
|
1
|
-
%h1 How to Use
|
2
|
-
|
3
|
-
%p StaticMatic is very easy to work with. It aims to provide just the tools you need and not get in your way.
|
4
|
-
|
5
|
-
%ul
|
6
|
-
%li= link "Developing a site", "#developing"
|
7
|
-
%li= link "Configuration", "#configuration"
|
8
|
-
%li
|
9
|
-
= link "Templates", "#templates"
|
10
|
-
%ul
|
11
|
-
%li= link "Layouts", "#layouts"
|
12
|
-
%li= link "Helpers", "#helpers"
|
13
|
-
%li= link "Partials", "#partials"
|
14
|
-
|
15
|
-
%h2{:id => 'developing'} Developing a site with StaticMatic
|
16
|
-
|
17
|
-
%h3 Setting up a site
|
18
|
-
|
19
|
-
%p The first thing to do with a StaticMatic site is to set up the folders and files ready for use. A simple command will create everything you need to get started:
|
20
|
-
|
21
|
-
.code staticmatic setup my_site
|
22
|
-
|
23
|
-
%p This will set up a number of directories:
|
24
|
-
|
25
|
-
%ul
|
26
|
-
%li site/ - contains your static site and any assets such as images or javascript files
|
27
|
-
%li
|
28
|
-
src/ - where you'll work on your templates
|
29
|
-
%ul
|
30
|
-
%li
|
31
|
-
helpers/ - contains any helpers you want to use in your website
|
32
|
-
(write your own or grab some from
|
33
|
-
= link_to('Helper Central', '/helper_central/') + ')'
|
34
|
-
%li layouts/ - contains templates that 'wrap' your main content pages
|
35
|
-
%li pages/ - contains the actual pages of content
|
36
|
-
%li partials/ - contains any "partial pages" that can be reused in other pages or layouts
|
37
|
-
%li
|
38
|
-
stylesheets/ - contains any
|
39
|
-
= link 'Sass', 'http://haml.hamptoncatlin.com/docs/sass'
|
40
|
-
stylesheets you want to create
|
41
|
-
|
42
|
-
%h3 Previewing your site
|
43
|
-
|
44
|
-
%p When you're ready to start working on your site, you can fire up the preview server to see your changes:
|
45
|
-
|
46
|
-
.code staticmatic preview my_site
|
47
|
-
|
48
|
-
%p
|
49
|
-
This will start a web server on port 3000. Point your web browser to
|
50
|
-
= link "http://localhost:3000", "http://localhost:3000"
|
51
|
-
to see your site.
|
52
|
-
|
53
|
-
%h3 Building your site
|
54
|
-
|
55
|
-
%p When you're happy with the website, you can tell StaticMatic to generate the HTML pages:
|
56
|
-
|
57
|
-
.code staticmatic build my_site
|
58
|
-
|
59
|
-
%h2{:id => 'configuration'} Configuration
|
60
|
-
|
61
|
-
%p
|
62
|
-
You can put a file called configuration.rb in your staticmatic project's basedir/src directory.
|
63
|
-
In this file, you can set configuration settings or whatever else since it's just a
|
64
|
-
ruby file.
|
65
|
-
|
66
|
-
%h3 configuration.preview_server_port
|
67
|
-
|
68
|
-
%p
|
69
|
-
The default is 3000.
|
70
|
-
|
71
|
-
%h3 configuration.preview_server_host
|
72
|
-
|
73
|
-
%p
|
74
|
-
The default is localhost.
|
75
|
-
|
76
|
-
%h3 configuration.use_extensions_for_page_links
|
77
|
-
|
78
|
-
%p
|
79
|
-
The default is true. When false .html and index.html will be stripped off
|
80
|
-
urls generated by the link tag helper.
|
81
|
-
|
82
|
-
%h3 configuration.sass_options
|
83
|
-
|
84
|
-
%p
|
85
|
-
Default is an empty hash. You can specify any options that
|
86
|
-
= link 'Sass', 'http://haml.hamptoncatlin.com/docs/sass'
|
87
|
-
can take like :style => :compact
|
88
|
-
|
89
|
-
%h2{:id => 'templates'} Templates
|
90
|
-
|
91
|
-
%p
|
92
|
-
%em
|
93
|
-
For information on how to use Haml itself, please check out the
|
94
|
-
= link("Haml website", "http://haml.hamptoncatlin.com/docs/haml") + "."
|
95
|
-
|
96
|
-
%h3{:id => 'layouts'} Layouts
|
97
|
-
|
98
|
-
%p
|
99
|
-
As with web frameworks like
|
100
|
-
= link("Ruby on Rails", "http://www.rubyonrails.com") + ","
|
101
|
-
StaticMatic uses layouts to 'wrap' up the content contained within page templates.
|
102
|
-
|
103
|
-
%p A layout typically contains the header and footer code for a page - code that is common to all pages on the site.
|
104
|
-
|
105
|
-
%p The only thing a layout *must* contain is a line that tells StaticMatic where to put the content:
|
106
|
-
|
107
|
-
.code = yield
|
108
|
-
|
109
|
-
%p By default, StaticMatic will look for a template named 'application.haml'. If you have a page that needs to use a different layout, this can be specified in the page itself:
|
110
|
-
|
111
|
-
%em contact_us.haml:
|
112
|
-
.code - @layout = "contact"
|
113
|
-
|
114
|
-
%p The above code would tell StaticMatic to use the layout called 'contact.haml' when building and previewing the 'contact_us' page.
|
115
|
-
|
116
|
-
|
117
|
-
%h3{:id => 'helpers'} Helpers
|
118
|
-
|
119
|
-
%p StaticMatic provides a number of 'helpers' on top of those in Haml to handle common code and reduce code.
|
120
|
-
%p
|
121
|
-
%em
|
122
|
-
Additionally you can write your own helpers and put them in your
|
123
|
-
staticmatic src/helpers directory. You can checkout the
|
124
|
-
= link_to 'Helper Central', '/helper_central/'
|
125
|
-
for some helpers that have already been written by others that
|
126
|
-
you can drop in your helper directory.
|
127
|
-
|
128
|
-
%h4 Links
|
129
|
-
|
130
|
-
%p
|
131
|
-
'link' ('link_to' works too for you
|
132
|
-
= link_to 'Rails', 'http://www.rubyonrails.com/'
|
133
|
-
types) can automatically set up hyperlinks for you:
|
134
|
-
|
135
|
-
.code = link "Contact Us"
|
136
|
-
|
137
|
-
produces:
|
138
|
-
|
139
|
-
.code <a href="contact_us.html">Contact Us</a>"
|
140
|
-
|
141
|
-
%p It is also possible to specify a relative path in your url:
|
142
|
-
|
143
|
-
.code = link "../Contact Us"
|
144
|
-
|
145
|
-
produces:
|
146
|
-
|
147
|
-
.code <a href="../contact_us.html">Contact Us</a>"
|
148
|
-
|
149
|
-
%p You can also specify a URL:
|
150
|
-
|
151
|
-
.code = link "StaticMatic", "http://staticmatic.rubyforge.org"
|
152
|
-
|
153
|
-
%h4 Images
|
154
|
-
|
155
|
-
.code = img "me.jpg"
|
156
|
-
produces:
|
157
|
-
.code <img src="/images/me.jpg"/>
|
158
|
-
|
159
|
-
%p It is also possible to specify a relative path in your url:
|
160
|
-
|
161
|
-
.code = img "../me.jpg"
|
162
|
-
produces:
|
163
|
-
.code <img src="../me.jpg"/>
|
164
|
-
|
165
|
-
%h4 Stylesheets
|
166
|
-
|
167
|
-
.code = stylesheets
|
168
|
-
|
169
|
-
%p
|
170
|
-
This will automatically insert links to any
|
171
|
-
= link 'Sass', 'http://haml.hamptoncatlin.com/docs/sass'
|
172
|
-
stylesheets in your site source.
|
173
|
-
|
174
|
-
It will also link up any static stylesheets in your site/stylesheets/ directory
|
175
|
-
|
176
|
-
%p
|
177
|
-
You can also specify the files and the order explicitly along with setting attributes:
|
178
|
-
|
179
|
-
.code = stylesheets :reset, :application, :media => :screen
|
180
|
-
|
181
|
-
produces
|
182
|
-
|
183
|
-
.code
|
184
|
-
<link href="stylesheets/reset.css" media="screen" rel="stylesheet"/>
|
185
|
-
%br
|
186
|
-
<link href="stylesheets/application.css" media="screen" rel="stylesheet"/>
|
187
|
-
|
188
|
-
%h4 Javascript
|
189
|
-
|
190
|
-
.code = javascripts('test', :other)
|
191
|
-
produces:
|
192
|
-
.code
|
193
|
-
<script language="javascript" src="/javascripts/test.js" type="text/javascript"></script>
|
194
|
-
%br
|
195
|
-
<script language="javascript" src="/javascripts/other.js" type="text/javascript"></script>
|
196
|
-
|
197
|
-
%h4 Current page
|
198
|
-
|
199
|
-
%p
|
200
|
-
It can be very useful to know what page you're on in your layout and helpers
|
201
|
-
(ie: setting selected style on a menu item).
|
202
|
-
|
203
|
-
For the page src/pages/index.html
|
204
|
-
.code = current_page # => "/index.html"
|
205
|
-
%br
|
206
|
-
For the page src/pages/subdirectory/other.html
|
207
|
-
.code = current_page # => "/subdirectory/other.html"
|
208
|
-
|
209
|
-
%h4 urlify
|
210
|
-
|
211
|
-
%p Will convert a string to be usable in a url
|
212
|
-
|
213
|
-
.code
|
214
|
-
\= urlify("We love Haml") # => "we_love_haml"
|
215
|
-
%br
|
216
|
-
\= urlify("Elf & Ham") # => "elf_and_ham"
|
217
|
-
%br
|
218
|
-
\= urlify("Stephen's gem") # => "stephens_gem"
|
219
|
-
%br
|
220
|
-
\= urlify("Test/Link") # => "testlink"
|
221
|
-
|
222
|
-
%h4 text_area
|
223
|
-
|
224
|
-
%p Generates a text area field
|
225
|
-
|
226
|
-
.code = text_area 'myname', 'myvalue'
|
227
|
-
produces:
|
228
|
-
.code <textarea id="myname" name="myname">myvalue</textarea>
|
229
|
-
|
230
|
-
%h4 text_field
|
231
|
-
|
232
|
-
%p Generates a text input field
|
233
|
-
|
234
|
-
.code = text_field('first_name', 'bob')
|
235
|
-
produces:
|
236
|
-
.code <input name="first_name" type="text" value="bob"/>
|
237
|
-
|
238
|
-
|
239
|
-
%h3{:id => 'partials'} Partials
|
240
|
-
|
241
|
-
%p
|
242
|
-
As with web frameworks like
|
243
|
-
= link("Ruby on Rails", "http://www.rubyonrails.com") + ","
|
244
|
-
StaticMatic uses partials to keep things
|
245
|
-
= link('DRY', 'http://en.wikipedia.org/wiki/DRY') + "."
|
246
|
-
|
247
|
-
.code = partial('mypartial')
|
248
|
-
|
249
|
-
%p
|
250
|
-
This will first look in the current page/partial's directory for a file called _mypartial.haml.
|
251
|
-
If not found there it will look for src/partials/mypartial.haml.
|
252
|
-
|
253
|
-
%h4 Specify the partial's local variables
|
254
|
-
|
255
|
-
.code = partial('mypartial', :locals => { :title => 'My Title' })
|
256
|
-
|
257
|
-
%p
|
258
|
-
This will locate the partial file as in the previous example above but now passes in a local variable called
|
259
|
-
%em title
|
260
|
-
that can be used in the partial like so:
|
261
|
-
|
262
|
-
.code %h1 title
|
263
|
-
|
264
|
-
%h4 Specify the partial's directory
|
265
|
-
|
266
|
-
.code = partial('shared/mypartial')
|
267
|
-
|
268
|
-
%p
|
269
|
-
This will look for the file src/pages/shared/_mypartial.haml first.
|
270
|
-
If not found there it will look for src/partials/mypartial.haml.
|
@@ -1,27 +0,0 @@
|
|
1
|
-
%h1 Static websites, the modern way
|
2
|
-
|
3
|
-
%p
|
4
|
-
Web developers are used to using dynamic and frameworks like
|
5
|
-
= link "Ruby on Rails", "http://www.rubyonrails.com"
|
6
|
-
to develop applications. When it comes to working with static, non-dynamic websites it can seem like stepping back in time.
|
7
|
-
|
8
|
-
%h2 You'd like to
|
9
|
-
|
10
|
-
%ul
|
11
|
-
%li.highlight Replace over-featured, cumbersome Content Management Systems
|
12
|
-
%li.highlight Speed up your prototypes
|
13
|
-
|
14
|
-
%h2 Meet StaticMatic
|
15
|
-
|
16
|
-
.columns
|
17
|
-
.left_column
|
18
|
-
%em Concise and terse Haml Templating
|
19
|
-
= img "homepage-templating.jpg"
|
20
|
-
|
21
|
-
.right_column
|
22
|
-
%em Live preview server for development
|
23
|
-
= img "homepage-previewing.jpg"
|
24
|
-
|
25
|
-
%p
|
26
|
-
%em Output full HTML pages
|
27
|
-
= img "homepage-build.jpg"
|
@@ -1,22 +0,0 @@
|
|
1
|
-
%h1 StaticMatic 0.8.10
|
2
|
-
|
3
|
-
%h2 What's New
|
4
|
-
|
5
|
-
%ul
|
6
|
-
%li [NEW] rails-like partials. Partials can start with an underscore and live in the pages directory tree, old way still works (Brent Beardsley)
|
7
|
-
%li [NEW] added current_page helper for use in other helpers, layouts, or pages (Brent Beardsley)
|
8
|
-
%li [NEW] add src_dir, site_dir, and current_page attr_reader's on staticmatic class (Brent Beardsley)
|
9
|
-
|
10
|
-
%h2 What's Fixed
|
11
|
-
|
12
|
-
%ul
|
13
|
-
%li [FIX] img helper changes and tests (Jason Tennier)
|
14
|
-
%li [FIX] removed dependency on rails needing to be installed (Brent Beardsley)
|
15
|
-
%li [FIX] fixed preview bug where setting a layout in a page would cause it to be used even for pages that did not have a layout specified and should be using the default (Brent Beardsley)
|
16
|
-
%li [FIX] tag helper only outputs the attribute if it has a value (Brent Beardsley)
|
17
|
-
%li [FIX] renamed RakeFile to Rakefile so it'll work on non-windows boxes (Brent Beardsley)
|
18
|
-
%li [FIX] write tag helper attributes out in alphabetical order for consistency (Brent Beardsley)
|
19
|
-
|
20
|
-
%p
|
21
|
-
See what changed in
|
22
|
-
= link('0.8.8', '/releases/0_8_8.html')
|
@@ -1,25 +0,0 @@
|
|
1
|
-
%h1 StaticMatic 0.8.4
|
2
|
-
|
3
|
-
%p Don't be fooled by the small minor increments - there's loads of great stuff in the latest release:
|
4
|
-
|
5
|
-
%h2 Sub-Directory Support
|
6
|
-
%p Thanks to Brent Beardsley, you can now have as many directories as you like. This should be considered 'beta' at the moment as there is likely to be issues with paths in the helpers, but try it out and we'll figure out the best solution.
|
7
|
-
|
8
|
-
%h2 Partials!
|
9
|
-
%p
|
10
|
-
Simply create a 'partials' directory in your src/ and you'll be able to do:
|
11
|
-
.code partial("partial_name")
|
12
|
-
|
13
|
-
%h2 Layouts based on directory
|
14
|
-
%p Along with sub-directory support, you can also create layouts based on the sub-directory a template is in. For example, if you have a 'projects' directory and would like it to render a different template, simply create 'projects.haml' in your layouts directory.
|
15
|
-
|
16
|
-
%h2 Relative Stylesheet Linking
|
17
|
-
%p
|
18
|
-
You can now tell the stylesheet helper to use relative linking:
|
19
|
-
.code = stylesheets :relative => true
|
20
|
-
|
21
|
-
%p
|
22
|
-
%em Note that you may get issues with nested directories and relative stylesheets
|
23
|
-
|
24
|
-
%h2 What's Next?
|
25
|
-
%p The main things on the list are configuration and clearing up any bugs not yet sorted. It'd also be great to start extending the test set more.
|