2015-10-18 22:35:49 +02:00
|
|
|
# --------------------------------------
|
|
|
|
# Config
|
|
|
|
# --------------------------------------
|
|
|
|
|
|
|
|
# ----- Site ----- #
|
|
|
|
|
2015-12-03 19:19:56 +01:00
|
|
|
activate :i18n, langs: [:en, 'es-ES', 'pt-BR', :ru], :mount_at_root => :en
|
2015-10-18 22:35:49 +02:00
|
|
|
set :gauges_id, ''
|
|
|
|
set :publisher_url, 'https://www.facebook.com/olivier.lacan.5'
|
|
|
|
set :site_url, 'http://keepachangelog.com'
|
|
|
|
|
|
|
|
# ----- Assets ----- #
|
|
|
|
|
|
|
|
set :css_dir, 'assets/stylesheets'
|
|
|
|
set :js_dir, 'assets/javascripts'
|
|
|
|
set :images_dir, 'assets/images'
|
|
|
|
set :fonts_dir, 'assets/fonts'
|
|
|
|
|
|
|
|
# ----- Images ----- #
|
|
|
|
|
|
|
|
activate :automatic_image_sizes
|
|
|
|
|
|
|
|
# ----- Markdown ----- #
|
|
|
|
|
|
|
|
activate :syntax
|
|
|
|
set :markdown_engine, :redcarpet
|
|
|
|
set :markdown, {
|
|
|
|
fenced_code_blocks: true,
|
|
|
|
footnotes: true,
|
|
|
|
smartypants: true,
|
|
|
|
tables: true
|
|
|
|
}
|
|
|
|
|
|
|
|
# --------------------------------------
|
|
|
|
# Helpers
|
|
|
|
# --------------------------------------
|
|
|
|
|
|
|
|
helpers do
|
|
|
|
def path_to_url(path)
|
|
|
|
Addressable::URI.join(site_url, path).normalize.to_s
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# --------------------------------------
|
|
|
|
# Content
|
|
|
|
# --------------------------------------
|
|
|
|
|
|
|
|
# ----- Directories ----- #
|
|
|
|
|
|
|
|
activate :directory_indexes
|
|
|
|
page "/404.html", directory_index: false
|
|
|
|
|
|
|
|
# --------------------------------------
|
|
|
|
# Production
|
|
|
|
# --------------------------------------
|
|
|
|
|
|
|
|
# ----- Optimization ----- #
|
|
|
|
|
|
|
|
configure :build do
|
|
|
|
set :gauges_id, "5389808eeddd5b055a00440d"
|
2015-10-19 20:51:07 +02:00
|
|
|
activate :asset_hash
|
2015-10-18 22:35:49 +02:00
|
|
|
activate :gzip, {exts: %w[
|
|
|
|
.css
|
|
|
|
.eot
|
|
|
|
.htm
|
|
|
|
.html
|
|
|
|
.ico
|
|
|
|
.js
|
|
|
|
.json
|
|
|
|
.svg
|
|
|
|
.ttf
|
|
|
|
.txt
|
|
|
|
.woff
|
|
|
|
]}
|
|
|
|
set :haml, {ugly: true, attr_wrapper: '"'}
|
|
|
|
activate :minify_css
|
|
|
|
activate :minify_html do |html|
|
|
|
|
html.remove_quotes = false
|
|
|
|
end
|
|
|
|
activate :minify_javascript
|
|
|
|
end
|
|
|
|
|
|
|
|
# ----- Prefixing ----- #
|
|
|
|
|
|
|
|
activate :autoprefixer do |config|
|
|
|
|
config.browsers = ['last 2 versions', 'Explorer >= 10']
|
|
|
|
config.cascade = false
|
|
|
|
end
|