Permalink
Browse files

Part 2 - Production config

  • Loading branch information...
michaelrshannon committed Mar 23, 2015
1 parent dc06de7 commit 8ebc7ccfbde33b4fdb7bae8cb9cc89b4265c39d8
Showing with 60 additions and 4 deletions.
  1. +6 −0 Gemfile
  2. +17 −0 Gemfile.lock
  3. +36 −3 config.rb
  4. +1 −1 source/feed.xml.builder
@@ -7,3 +7,9 @@ gem "middleman-blog", "~> 3.5.3"

# For feed.xml.builder
gem "builder", "~> 3.0"

gem 'therubyracer' # faster JS compiles
gem 'oj' # faster JS compiles

gem 'middleman-search_engine_sitemap'
gem 'middleman-minify-html'
@@ -37,9 +37,11 @@ GEM
hitimes (1.2.2)
hooks (0.4.0)
uber (~> 0.0.4)
htmlcompressor (0.1.2)
i18n (0.7.0)
json (1.8.2)
kramdown (1.6.0)
libv8 (3.16.14.7)
listen (2.9.0)
celluloid (>= 0.15.2)
rb-fsevent (>= 0.9.3)
@@ -71,13 +73,20 @@ GEM
rack-test (~> 0.6.2)
thor (>= 0.15.2, < 2.0)
tilt (~> 1.4.1, < 2.0)
middleman-minify-html (3.4.0)
htmlcompressor (~> 0.1.0)
middleman-core (>= 3.2)
middleman-search_engine_sitemap (1.3.0)
builder
middleman-core (~> 3.2)
middleman-sprockets (3.4.2)
middleman-core (>= 3.3)
sprockets (~> 2.12.1)
sprockets-helpers (~> 1.1.0)
sprockets-sass (~> 1.3.0)
minitest (5.5.1)
multi_json (1.11.0)
oj (2.12.1)
padrino-helpers (0.12.5)
i18n (~> 0.6, >= 0.6.7)
padrino-support (= 0.12.5)
@@ -90,6 +99,7 @@ GEM
rb-fsevent (0.9.4)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
ref (1.0.5)
sass (3.4.13)
sprockets (2.12.3)
hike (~> 1.2)
@@ -101,6 +111,9 @@ GEM
sprockets-sass (1.3.1)
sprockets (~> 2.0)
tilt (~> 1.1)
therubyracer (0.12.1)
libv8 (~> 3.16.14.0)
ref
thor (0.19.1)
thread_safe (0.3.5)
tilt (1.4.1)
@@ -120,3 +133,7 @@ DEPENDENCIES
builder (~> 3.0)
middleman (~> 3.3.10)
middleman-blog (~> 3.5.3)
middleman-minify-html
middleman-search_engine_sitemap
oj
therubyracer
@@ -84,20 +84,53 @@

set :images_dir, 'images'

set :url_root, "https://#{ENV['APP_DOMAIN'] ? ENV['APP_DOMAIN'] : 'localhost:4567'}"

activate :search_engine_sitemap,
exclude_if: -> (resource) {
# Exclude all paths from sitemap that are sub-date indexes
resource.path.match(/[0-9]{4}(\/[0-9]{2})*.html/)
},
default_change_frequency: 'weekly'

# Filewatcher ignore list (workaround for search_engine_sitemap on
# Heroku - see https://github.com/Aupajo/middleman-search_engine_sitemap/issues/2)
set :file_watcher_ignore,
[
/^bin(\/|$)/,
/^\.bundle(\/|$)/,
# /^vendor(\/|$)/,
/^node_modules(\/|$)/,
/^\.sass-cache(\/|$)/,
/^\.cache(\/|$)/,
/^\.git(\/|$)/,
/^\.gitignore$/,
/\.DS_Store/,
/^\.rbenv-.*$/,
/^Gemfile$/,
/^Gemfile\.lock$/,
/~$/,
/(^|\/)\.?#/,
/^tmp\//
]

# Build-specific configuration
configure :build do
# For example, change the Compass output style for deployment
# activate :minify_css
activate :minify_css

# Minify Javascript on build
# activate :minify_javascript
activate :minify_javascript

# Enable cache buster
# activate :asset_hash
activate :asset_hash

activate :gzip
# Use relative URLs
# activate :relative_assets

activate :minify_html

# Or use a different image path
# set :http_prefix, "/Content/images/"
end
@@ -1,6 +1,6 @@
xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
site_url = "http://blog.url.com/"
site_url = "https://#{ENV['APP_DOMAIN']}/"
xml.title "Blog Name"
xml.subtitle "Blog subtitle"
xml.id URI.join(site_url, blog.options.prefix.to_s)

0 comments on commit 8ebc7cc

Please sign in to comment.