Created
September 12, 2013 08:52
-
-
Save markoa/6534662 to your computer and use it in GitHub Desktop.
Current Middleman configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# Blog settings | |
### | |
# Time.zone = "UTC" | |
activate :blog do |blog| | |
blog.prefix = "blog" | |
blog.permalink = ":year/:month/:day/:title.html" | |
blog.sources = "posts/:year-:month-:day-:title.html" | |
blog.taglink = "tags/:tag.html" | |
blog.layout = "layout" | |
# blog.summary_separator = /(READMORE)/ | |
blog.summary_length = 130 | |
blog.year_link = ":year.html" | |
blog.month_link = ":year/:month.html" | |
# blog.day_link = ":year/:month/:day.html" | |
blog.default_extension = ".md" | |
blog.tag_template = "blog/tag.html" | |
blog.calendar_template = "blog/calendar.html" | |
blog.paginate = true | |
blog.per_page = 5 | |
blog.page_link = "page/:num" | |
end | |
set :markdown_engine, :redcarpet | |
set :markdown, :fenced_code_blocks => true, :smartypants => true | |
activate :syntax #https://github.com/middleman/middleman-syntax | |
set :css_dir, 'assets/css' | |
set :js_dir, 'assets/js' | |
set :images_dir, 'assets/images' | |
# Used for generating absolute URLs: | |
helpers do | |
def host_with_port | |
[host, optional_port].compact.join(':') | |
end | |
def optional_port | |
port unless port.to_i == 80 | |
end | |
def image_url(source) | |
protocol + host_with_port + image_path(source) | |
end | |
end | |
configure :development do | |
set :protocol, "http://" | |
set :host, Middleman::PreviewServer.host | |
set :port, Middleman::PreviewServer.port | |
end | |
configure :build do | |
set :protocol, "https://" | |
set :host, "domain.com" | |
set :port, 80 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment