Skip to content

Instantly share code, notes, and snippets.

@christoshrousis
Created May 12, 2014 00:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christoshrousis/2c2e8ac20330cdacab77 to your computer and use it in GitHub Desktop.
Save christoshrousis/2c2e8ac20330cdacab77 to your computer and use it in GitHub Desktop.
This is the layout.haml file I use when I want to start with a HTML5 Boilerplate using Middleman. In addition to some basic layout, it includes a CDN version of Bootstrap and jQuery. I have removed the Normalize.css as it is included with Bootstrap and there is no need to re-include it.
!!! 5
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
%head
%meta{:charset => 'utf-8'}
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
%title
= current_page.data.title || "The Middleman"
%meta{:content => '', :name => 'description'}
%meta{:content => '', :name => 'author'}
%meta{:name => "viewport", :content => "width=device-width, initial-scale=1"}
%link{:rel => 'stylesheet', :href => '//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css'}
= stylesheet_link_tag "all"
<!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]-->
%body{class: page_classes}
.main-content= yield
%script{:src => "//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"}
%script{:src => "//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"}
= javascript_include_tag "all"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment