consul/website/config.rb

35 lines
981 B
Ruby
Raw Normal View History

2014-02-08 00:41:03 +00:00
#-------------------------------------------------------------------------
# Configure Middleman
#-------------------------------------------------------------------------
2014-10-18 23:18:50 +00:00
set :base_url, "https://www.consul.io/"
2014-10-06 23:15:01 +00:00
activate :hashicorp do |h|
2014-10-20 17:42:06 +00:00
h.version = '0.4.1'
2014-10-06 23:15:01 +00:00
h.bintray_repo = 'mitchellh/consul'
h.bintray_user = 'mitchellh'
h.bintray_key = ENV['BINTRAY_API_KEY']
2014-02-08 00:41:03 +00:00
# Do not include the "web" in the default list of packages
2014-10-06 23:15:01 +00:00
h.bintray_exclude_proc = Proc.new do |os, filename|
os == 'web'
end
# Consul packages are not prefixed with consul_ - they should be in the
# future though!
h.bintray_prefixed = false
2014-10-06 23:15:01 +00:00
end
2014-02-08 00:41:03 +00:00
2014-10-06 23:13:22 +00:00
helpers do
# This helps by setting the "active" class for sidebar nav elements
# if the YAML frontmatter matches the expected value.
def sidebar_current(expected)
current = current_page.data.sidebar_current || ""
if current.start_with?(expected)
return " class=\"active\""
else
return ""
end
end
2014-02-08 00:41:03 +00:00
end