mirror of
https://github.com/danog/sass-site.git
synced 2024-11-30 04:29:17 +01:00
52 lines
1.7 KiB
Ruby
52 lines
1.7 KiB
Ruby
require 'middleman-syntax'
|
|
|
|
activate :automatic_image_sizes
|
|
activate :autoprefixer do |config|
|
|
config.browsers = ['last 2 versions']
|
|
# config.ignore = ['hacks.css']
|
|
end
|
|
activate :directory_indexes
|
|
activate :livereload
|
|
activate :syntax
|
|
|
|
set :markdown, :fenced_code_blocks => true,
|
|
:autolink => true,
|
|
:smartypants => true,
|
|
:with_toc_data => true
|
|
set :markdown_engine, :redcarpet
|
|
set :css_dir, 'assets/css'
|
|
set :js_dir, 'assets/js'
|
|
set :images_dir, 'assets/img'
|
|
|
|
page '/*.xml', :layout => false
|
|
page '/*.json', :layout => false
|
|
page '/*.txt', :layout => false
|
|
page '/*.html', :layout => :has_navigation
|
|
page '/community.html', :layout => :has_complementary
|
|
page '/community-guidelines.html', :layout => :has_complementary
|
|
page '/libsass.html', :layout => :has_both_sidebars
|
|
page '/404.html', :layout => :has_no_sidebars
|
|
page '/about.html', :layout => :has_no_sidebars
|
|
page '/implementation.html', :layout => :has_no_sidebars
|
|
page '/install.html', :layout => :has_no_sidebars
|
|
page '/dart-sass.html', :layout => :has_no_sidebars
|
|
page '/ruby-sass.html', :layout => :has_no_sidebars
|
|
page '/styleguide/*', :layout => :section_styleguide
|
|
page '/documentation/*', :layout => :section_reference
|
|
|
|
configure :development do
|
|
config[:host] = 'http://localhost:4567'
|
|
end
|
|
|
|
configure :build do
|
|
config[:host] = data.sitemap.url
|
|
activate :asset_hash
|
|
activate :gzip
|
|
activate :minify_css
|
|
activate :minify_html
|
|
activate :minify_javascript
|
|
activate :relative_assets
|
|
|
|
set :relative_links, true
|
|
end
|