Browse files

Merge pull request #48 from utensil/master

Three improvements on Middleman Guide, regarding 'middleman server', 'blog' and 'layout engine'
  • Loading branch information...
tdreyno committed Mar 11, 2012
2 parents eb51659 + 4068f83 commit f15e348c40cce71b76d9a318bafdc9cdcc89cb43
@@ -9,6 +9,11 @@ Middleman 2.1 ships with an official extension to support blogging, articles and
gem install middleman-blog
+Or if you are using Bundler, you should specify it in your `Gemfile`:
+ :::ruby
+ gem "middleman-blog"
Then activate the extension in your `config.rb`:
@@ -117,6 +117,15 @@ Running `middleman` without any commands is the same as starting a server.
This will do exactly the same thing as `middleman server`.
+### When something goes wrong
+Under some circumstances(one known case is under Windows, see [here](, `middleman` might not work as expected, try using a full command instead:
+ :::bash
+ middleman server -p 4567 -e deveplopment
+Under some circumstances(say if your config file has gone wild), middleman server might not be able to boot itself, and no error output can be seen on the console, don't panic, just try `middleman build` to see the full trace of the problem and fix it.
## Exporting the Static Site (middleman build)
Finally, when you are ready to deliver static code or, in the case of "blog mode", host a static blog, you will need to build the site. Using the command-line, from the project folder, run `middleman build`:
@@ -157,6 +157,13 @@ In your `config.rb` file, you can tell Middleman to use a specific templating la
set :markdown, :layout_engine => :erb
+Notice that if you are using `.md` as the extension of your markdown template file instead of `.markdown`, and using `.rhtml` as the extension of your ERB layout file instead of `.erb`, the config above should be changed to the following:
+ :::ruby
+ set :md, :layout_engine => :rhtml
+That is to say, these two symbols are literally the file extensions, not template engine names.
### Disabling Layouts Entirely
In some cases, you may not want to use a layout at all. This can be accomplished by setting the default layout to false in your `config.rb`:

0 comments on commit f15e348

Please sign in to comment.