Last active
August 29, 2015 14:18
-
-
Save lordhumunguz/96311f6777375946415e to your computer and use it in GitHub Desktop.
Basic middleman configs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'slim' | |
### | |
# Helpers | |
### | |
# Automatic image dimensions on image_tag helper | |
# activate :automatic_image_sizes | |
# Any arbitrary values. You can directly call these in your template | |
set :site_url, 'http://www.neosummon.com' | |
set :site_human_url, 'neosummon.com' | |
set :site_name, 'Summon' | |
# What goes in call to action on index page | |
set :site_description, 'DESC' | |
# What goes in the title tag | |
set :site_title, "Title" | |
# Optional | |
set :site_logo, 'logo-big.png' | |
set :site_image, 'http://123.cloudfront.net/logo-large.png' | |
set :site_twitter_handle, '@me' | |
# Reload the browser automatically whenever files change | |
configure :development do | |
activate :livereload | |
end | |
activate :directory_indexes | |
# Methods defined in the helpers block are available in templates | |
# helpers do | |
# def some_helper | |
# "Helping" | |
# end | |
# end | |
# Add bower's directory to sprockets asset path | |
after_configuration do | |
@bower_config = JSON.parse(IO.read("#{root}/.bowerrc")) | |
sprockets.append_path File.join "#{root}", @bower_config["directory"] | |
end | |
set :css_dir, 'stylesheets' | |
set :js_dir, 'javascripts' | |
set :images_dir, 'images' | |
# Build-specific configuration | |
configure :build do | |
# For example, change the Compass output style for deployment | |
activate :minify_css | |
activate :minify_javascript | |
activate :asset_hash | |
# Use relative URLs | |
# activate :relative_assets | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
doctype 5 | |
html itemscope='' itemtype="http://schema.org/WebPage" | |
head | |
meta charset="utf-8" | |
meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible" | |
title=page_title | |
meta name="description" content=page_description | |
meta name="robots" content="index,follow" | |
meta name="twitter:card" content=page_twitter_card_type | |
meta name="twitter:site" content=site_twitter_handle | |
meta name="twitter:title" content=page_title | |
meta name="twitter:description" content=page_description | |
meta name="twitter:creator" content=site_twitter_handle | |
meta name="twitter:image:src" content=site_image | |
// Open Graph General (Facebook & Pinterest) | |
meta property="og:url" content=page_url | |
meta property="og:title" content=page_title | |
meta property="og:description" content=page_description | |
meta property="og:site_name" content=site_name | |
meta property="og:image" content=site_image | |
meta property="og:app_id" content="952268334783316" | |
meta property="og:type" content="website" | |
// Google Plus | |
meta itemprop="name" content=page_title | |
meta itemprop="description" content=page_description | |
meta itemprop="image" content=site_image | |
// Mobile Specific Metas | |
meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" | |
// FONT | |
link href='http://fonts.googleapis.com/css?family=Lato:300,700,300italic' rel='stylesheet' type='text/css' | |
= stylesheet_link_tag "app" | |
= javascript_include_tag "app" | |
= favicon_tag "images/favicon.ico" | |
= favicon_tag "images/favicon.ico", rel: "apple-touch-icon", type: 'image/png' | |
body class=page_classes | |
= yield |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment