-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.rb
More file actions
66 lines (56 loc) · 1.64 KB
/
config.rb
File metadata and controls
66 lines (56 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# View all configurations: http://localhost:4200/__middleman/config/
# Site
config[:site] = {
name: '笨鸟码书',
url: 'https://flapybooks.com',
email: 'hi@flapybooks.com',
twitter: 'flapybooks',
description: '笨鸟码书引进优秀的外文编程资料,翻译成流畅的中文,助力国内开发者成长。我们遵从精益出版策略,精益求精。我们的作品涵盖电子书和视频课,深受 2500+ 开发者的信赖。',
fastspring_url: 'https://andor.onfastspring.com',
tencent_cloud_public_host: 'https://flapybooks-public-1257356257.file.myqcloud.com',
menu_items: {
index: '首页',
news: '新闻',
contact: '联系',
login: '登录'
}
}
# Per-page layout changes
config[:layout] = 'default'
page '/*.xml', layout: false
page '/*.json', layout: false
page '/*.txt', layout: false
# Assets
config[:css_dir] = 'assets/stylesheets'
config[:fonts_dir] = 'assets/fonts'
config[:images_dir] = 'assets/images'
config[:js_dir] = 'assets/javascripts'
config[:sass_assets_paths] << Bootstrap.stylesheets_path
# Preview server
config[:bind_address] = '127.0.0.1'
config[:port] = '4200'
# Build
set :skip_build_clean do |path|
path =~ /\.nojekyll|\.git/
end
ignore '*.sketch'
configure :build do
activate :minify_css
activate :gzip
activate :asset_hash
end
# Products
activate :blog do |blog|
blog.name = "products"
blog.prefix = "products"
blog.sources = '{title}.html'
blog.permalink = '/{title}'
blog.layout = 'product'
end
# Extensions
activate :directory_indexes
activate :autoprefixer do |prefix|
prefix.browsers = "last 2 versions"
end
# Others
page '404.html', :directory_index => false