diff --git a/Rakefile b/Rakefile index 6832f8a0..8d7ea037 100644 --- a/Rakefile +++ b/Rakefile @@ -25,10 +25,6 @@ begin gem.add_development_dependency("sdoc") end - Jeweler::RubyforgeTasks.new do |rubyforge| - rubyforge.doc_task = "rdoc" - end - Jeweler::GemcutterTasks.new rescue LoadError puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler" diff --git a/lib/middleman/base.rb b/lib/middleman/base.rb index a9416a9f..97495dcd 100644 --- a/lib/middleman/base.rb +++ b/lib/middleman/base.rb @@ -70,6 +70,8 @@ module Middleman path << options.index_file if path.match(%r{/$}) path.gsub!(%r{^/}, '') + # layout(:"layout.html") # Insert the .html into the layout name like the rest of the templates + # If the enabled renderers succeed, return the content, mime-type and an HTTP 200 if content = render_path(path) content_type media_type(File.extname(path)), :charset => 'utf-8' diff --git a/lib/middleman/template/views/index.html.haml b/lib/middleman/template/views/index.html.haml index 7b2bc807..8e4326e8 100644 --- a/lib/middleman/template/views/index.html.haml +++ b/lib/middleman/template/views/index.html.haml @@ -1,4 +1,4 @@ - content_for :head do - %title Custom head title + %title The Middleman! %h1 The Middleman is watching. \ No newline at end of file diff --git a/lib/middleman/template/views/layout.haml b/lib/middleman/template/views/layout.haml index f53be024..e3e66aca 100644 --- a/lib/middleman/template/views/layout.haml +++ b/lib/middleman/template/views/layout.haml @@ -1,7 +1,9 @@ %html %head - %title The Middleman! + // Comment in layout + = stylesheet_link_tag "site.css" = yield_content :head %body - = yield \ No newline at end of file + #frame + = yield \ No newline at end of file diff --git a/lib/middleman/template/views/stylesheets/site.css.sass b/lib/middleman/template/views/stylesheets/site.css.sass index 7afde1f8..527df14b 100644 --- a/lib/middleman/template/views/stylesheets/site.css.sass +++ b/lib/middleman/template/views/stylesheets/site.css.sass @@ -1 +1,11 @@ -@import compass/reset.sass \ No newline at end of file +@import compass.sass +@import blueprint/modules/grid.sass +@import blueprint/modules/typography.sass + ++global-reset ++blueprint-typography + +#frame + padding: 50px + text-align: center + +container \ No newline at end of file diff --git a/spec/generator_spec.rb b/spec/generator_spec.rb index 2070c43e..e31431f5 100644 --- a/spec/generator_spec.rb +++ b/spec/generator_spec.rb @@ -18,6 +18,13 @@ describe "Generator" do FileUtils.rm_rf(@root_dir) end + it "should use layout file" do + build_cmd = project_file("bin", "mm-build") + `cd #{@root_dir} && #{build_cmd}` + File.exists?("#{@root_dir}/build/index.html").should be_true + File.read("#{@root_dir}/build/index.html").should include("Comment in layout") + end + it "should copy template files" do template_dir = project_file("lib", "template", "**/*") Dir[template_dir].each do |f|