mirror of
https://github.com/inspec/inspec
synced 2024-11-30 16:39:20 +00:00
1750139dbb
Signed-off-by: Ryan Davis <zenspider@chef.io>
59 lines
1.4 KiB
Ruby
59 lines
1.4 KiB
Ruby
require "slim"
|
|
|
|
###
|
|
# Page options, layouts, aliases and proxies
|
|
###
|
|
|
|
# Per-page layout changes:
|
|
#
|
|
# With no layout
|
|
page "/*.xml", layout: false
|
|
page "/*.json", layout: false
|
|
page "/*.txt", layout: false
|
|
|
|
# With alternative layout: we send the sidebar request to the default layout
|
|
page "docs/*", layout: :docs, locals: { sidebar_layout: "docs" }
|
|
|
|
# Proxy pages (http://middlemanapp.com/basics/dynamic-pages/)
|
|
# proxy '/this-page-has-no-template.html', '/template-file.html', locals: {
|
|
# which_fake_page: 'Rendering a fake page with a local variable' }
|
|
|
|
###
|
|
# Helpers
|
|
###
|
|
|
|
# Reload the browser automatically whenever files change
|
|
configure :development do
|
|
activate :livereload
|
|
end
|
|
|
|
class Middleman::Cli::Build < Thor::Group
|
|
protected
|
|
|
|
def on_event(event_type, target, extra = nil)
|
|
# no logging
|
|
end
|
|
end
|
|
|
|
# Methods defined in the helpers block are available in templates
|
|
require "lib/sidebar_helpers"
|
|
helpers SidebarHelpers
|
|
|
|
# Build-specific configuration
|
|
configure :build do
|
|
# Minify CSS on build
|
|
activate :minify_css
|
|
|
|
# Minify Javascript on build
|
|
activate :minify_javascript
|
|
end
|
|
|
|
activate :sprockets
|
|
activate :autoprefixer
|
|
activate :directory_indexes
|
|
activate :syntax
|
|
set :url_root, "https://inspec.io"
|
|
activate :search_engine_sitemap
|
|
set :trailing_slash, false
|
|
set :markdown_engine, :redcarpet
|
|
set :markdown, fenced_code_blocks: true, smartypants: true, coderay_line_numbers: :table, tables: true, with_toc_data: true
|