massimo 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +15 -163
- data/VERSION +1 -1
- data/lib/massimo/config.rb +1 -2
- metadata +2 -2
data/README.md
CHANGED
@@ -1,173 +1,25 @@
|
|
1
1
|
# Massimo
|
2
2
|
|
3
|
-
Massimo is a
|
3
|
+
Massimo is a static website builder that allows you to use dynamic technologies such as Haml & Sass for rapid development.
|
4
4
|
|
5
|
-
*
|
6
|
-
* It uses familiar helper methods from [Sinatra::More](http://github.com/nesquena/sinatra_more)
|
7
|
-
* It supports custom helper methods like [Rails](http://rubyonrails.org/) and [Sinatra](http://www.sinatrarb.com/)
|
8
|
-
* It concats javascripts using [Sprockets](http://getsprockets.org/)
|
9
|
-
and then minifies them using [JSMin](http://github.com/rgrove/jsmin)
|
10
|
-
* It renders stylesheets using either [Sass](http://sass-lang.com/) or [Less](http://lesscss.org/)
|
11
|
-
|
12
|
-
|
13
|
-
## Installation
|
14
|
-
|
15
|
-
Massimo is hosted on [Gemcutter](http://gemcutter.org/) at http://gemcutter.org/gems/massimo, so installation is simply:
|
16
|
-
|
17
|
-
sudo gem install massimo
|
18
|
-
|
19
|
-
|
20
|
-
## Basic Usage
|
21
|
-
|
22
|
-
1. Setup the structure of the Site
|
23
|
-
2. Create some pages
|
24
|
-
3. Run you Site locally to see how it looks
|
25
|
-
4. Deploy your Site
|
26
|
-
|
27
|
-
|
28
|
-
## Structure
|
29
|
-
|
30
|
-
A basic Massimo Site looks something like this, though each directory's path can be customized:
|
31
|
-
|
32
|
-
.
|
33
|
-
|-- config.yml
|
34
|
-
|
|
35
|
-
|-- helpers
|
36
|
-
| `-- my_helpers.rb
|
37
|
-
|
|
38
|
-
|-- javascripts
|
39
|
-
| |-- _plugin.js
|
40
|
-
| `-- application.js
|
41
|
-
|
|
42
|
-
|-- lib
|
43
|
-
| `-- post.rb
|
44
|
-
|
|
45
|
-
|-- pages
|
46
|
-
| |-- index.haml
|
47
|
-
| |-- contact.haml
|
48
|
-
| `-- about-us.haml
|
49
|
-
|
|
50
|
-
|-- stylesheets
|
51
|
-
| |-- _base.sass
|
52
|
-
| `-- application.sass
|
53
|
-
|
|
54
|
-
|-- views
|
55
|
-
| |-- partial.haml
|
56
|
-
| `-- layouts
|
57
|
-
| `-- applcation.haml
|
58
|
-
|
|
59
|
-
`-- public
|
60
|
-
|
61
|
-
#### config.yml
|
62
|
-
|
63
|
-
This where you setup the options for the Site.
|
64
|
-
|
65
|
-
#### helpers
|
66
|
-
|
67
|
-
This is where you put helper modules (like Rails). This modules will automatically be available in your pages and views.
|
68
|
-
|
69
|
-
#### javascripts
|
70
|
-
|
71
|
-
This is where you put the working copies of your javascripts. They will be concatenated, minified, and moved to your output directory when the site is processed.
|
72
|
-
|
73
|
-
#### lib
|
74
|
-
|
75
|
-
This is where you put additional libraries. You can customize the default Massimo classes or add your own here. This is where you would add additional Tilt Templates.
|
76
|
-
|
77
|
-
#### pages
|
78
|
-
|
79
|
-
These are the actual pages (content) of your site. Anything here that is registered by a Tilt Template will be transformed into HTML and moved to the appropriate place in the output directory.
|
80
|
-
|
81
|
-
#### stylesheets
|
82
|
-
|
83
|
-
This is where you put the working copies of your stylesheets. If they are Sass or Less documents, they will be transformed into CSS documents then moved to your output directory.
|
84
|
-
|
85
|
-
#### views
|
86
|
-
|
87
|
-
This is where you put partials and layouts (like Rails). You can render partials from your pages by calling `render("partial_name")`.
|
88
|
-
|
89
|
-
|
90
|
-
## Running Massimo
|
5
|
+
*Massimo's code is inspired by other website generators like [Jekyll](http://github.com/mojombo/jekyll) and [Webby](http://webby.rubyforge.org/).*
|
91
6
|
|
92
|
-
|
93
|
-
|
94
|
-
Usually this is done through the massimo executable, which is installed with the gem. In order to get a server up and running with your Massimo site, run `massimo --server` and then browse to http://localhost:1984/. Or you could simply run `massimo --watch` to watch for changes and regenerate the site. For full command line options run `massimo --help`.
|
7
|
+
## Features
|
95
8
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
site = Massimo::Site(:source => "./source", :output => "./output") # Create a site with the given configuration options
|
104
|
-
site.pages # An array of all the pages found in the pages directory
|
105
|
-
site.process! # Processes all the source files and generates the output files.
|
106
|
-
|
107
|
-
|
108
|
-
## YAML Front Matter
|
109
|
-
|
110
|
-
Pages can contain YAML front matter blocks for either predefined configuration options or custom variables. The front matter must be the first thing in the file and takes the form of:
|
111
|
-
|
112
|
-
---
|
113
|
-
title: Using YAML Front Matter
|
114
|
-
layout: false
|
115
|
-
---
|
116
|
-
|
117
|
-
### Options
|
118
|
-
|
119
|
-
The options available are:
|
120
|
-
|
121
|
-
#### title
|
122
|
-
|
123
|
-
This is the title of the Page. By default it will be generated from the basename of the Page file. For Example: `my-first-post.haml` would become `"My First Post"`.
|
124
|
-
|
125
|
-
#### extension
|
126
|
-
|
127
|
-
This would be the extension of the file generated from the Page file. This defaults to `".html"`.
|
128
|
-
|
129
|
-
#### url
|
130
|
-
|
131
|
-
This is the URL that will be used to determine the output file's location and name. This defaults to the same location (relative to the pages directory) of the Page and its filename without the extension (and dasherized). For Example: The Page: `posts/10_best_rubygems.haml` would default to the URL: `"posts/10-best-rubygems/"`.
|
132
|
-
|
133
|
-
#### layout
|
134
|
-
|
135
|
-
This is the name of the layout used for the Page. Settings this value to `false` will process the Page without a layout. This defaults to `"application"`.
|
136
|
-
|
137
|
-
### Custom Variables
|
138
|
-
|
139
|
-
Any other variables will be available as methods in your pages. For instance:
|
9
|
+
* Renders templates and views using [Tilt](http://github.com/rtomayko/tilt)
|
10
|
+
* Uses familiar helper methods from [Sinatra::More](http://github.com/nesquena/sinatra_more)
|
11
|
+
* Supports custom helper methods like [Rails](http://rubyonrails.org/) and [Sinatra](http://www.sinatrarb.com/)
|
12
|
+
* Concats javascripts using [Sprockets](http://getsprockets.org/)
|
13
|
+
and then minifies them using [JSMin](http://github.com/rgrove/jsmin)
|
14
|
+
* Renders stylesheets using either [Sass](http://sass-lang.com/) or [Less](http://lesscss.org/)
|
15
|
+
* Automatically creates pretty URLs
|
140
16
|
|
141
|
-
|
142
|
-
title: It's Christmas!
|
143
|
-
date: 2009-12-25
|
144
|
-
---
|
145
|
-
<h1><%= title %></h1>
|
146
|
-
<p><%= date.strftime("%m, %e, %Y") %></p>
|
17
|
+
## Getting Started
|
147
18
|
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
<title><%= page.title %></title>
|
153
|
-
</head>
|
154
|
-
<body>
|
155
|
-
<%= yield %>
|
156
|
-
</body>
|
157
|
-
</html>
|
158
|
-
|
159
|
-
|
160
|
-
## Note on Patches/Pull Requests
|
161
|
-
|
162
|
-
* Fork the project.
|
163
|
-
* Make your feature addition or bug fix.
|
164
|
-
* Add tests for it. This is important so I don't break it in a
|
165
|
-
future version unintentionally.
|
166
|
-
* Commit, do not mess with Rakefile, VERSION, or history.
|
167
|
-
(if you want to have your own version, that is fine but
|
168
|
-
bump version in a commit by itself I can ignore when I pull)
|
169
|
-
* Send me a pull request. Bonus points for topic branches.
|
170
|
-
|
19
|
+
gem install massimo
|
20
|
+
massimo generate my-site
|
21
|
+
cd my-site
|
22
|
+
massimo build
|
171
23
|
|
172
24
|
## Copyright
|
173
25
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.5
|
data/lib/massimo/config.rb
CHANGED