This repository has been archived by the owner on Jul 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.rb
193 lines (156 loc) · 4.22 KB
/
config.rb
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
########################
#
# Site setting
#
########################
Time.zone = "Tokyo"
set :encoding, 'utf-8'
set :site_url, 'http://example.com'
set :site_name, 'Example Site Name'
set :site_title, 'Example Site'
set :site_subtitle, 'Example Site Sub Title'
set :site_description, 'Example Site Description.'
set :site_keywords, 'site keywords, hogehoge, fugafuga'
set :site_author, 'Author Name'
########################
#
# Path setting
#
########################
set :http_prefix, '/'
set :relative_links, false
set :strip_index_file, true
set :trailing_slash, true
########################
#
# Directory setting
#
########################
set :source, 'source'
set :build_dir, 'build'
set :data_dir, 'data'
set :layouts_dir, 'layouts'
set :partials_dir, 'partials'
set :helpers_dir, 'helpers'
# assets helper
set :css_dir, 'assets/css'
set :js_dir, 'assets/js'
set :fonts_dir, 'assets/fonts'
set :images_dir, 'assets/images'
# etc
set :index_file, 'index.html'
set :layout, 'layout'
########################
#
# Markdown setting
#
########################
set :markdown_engine, :kramdown
########################
#
# Sass/SCSS setting
#
########################
configure :development do
set :sass, {
:style => :nested
}
set :sass_assets_paths, []
end
configure :build do
set :sass, {
:style => :compressed
}
set :sass_assets_paths, []
end
########################
#
# Blog setting
#
########################
activate :blog do |config|
# This will add a prefix to all links, template references and source paths
config.name = "cats"
config.prefix = "cats"
# Matcher for blog source files
config.sources = "articles/{year}-{month}-{day}-{title}.html"
# Dist articles
# config.permalink = "{year}/{month}/{day}/{title}.html"
# config.summary_separator = /(READMORE)/
# config.summary_length = 250
# config.taglink = "tags/{tag}.html"
# config.year_link = "{year}.html"
# config.month_link = "{year}/{month}.html"
# config.day_link = "{year}/{month}/{day}.html"
# config.default_extension = ".markdown"
# Layout and Template
config.layout = "post"
config.tag_template = config.prefix + "/tag.html"
config.calendar_template = config.prefix + "/calendar.html"
# Enable pagination
config.paginate = true
# config.per_page = 3
# config.page_link = "page/{num}"
end
activate :blog do |config|
# This will add a prefix to all links, template references and source paths
config.name = "dogs"
config.prefix = "dogs"
# Matcher for blog source files
config.sources = "articles/{year}-{month}-{day}-{title}.html"
# Dist articles
# config.permalink = "{year}/{month}/{day}/{title}.html"
# config.summary_separator = /(READMORE)/
# config.summary_length = 250
# config.taglink = "tags/{tag}.html"
# config.year_link = "{year}.html"
# config.month_link = "{year}/{month}.html"
# config.day_link = "{year}/{month}/{day}.html"
# config.default_extension = ".markdown"
# Layout and Template
config.layout = "post"
config.tag_template = config.prefix + "/tag.html"
config.calendar_template = config.prefix + "/calendar.html"
# Enable pagination
config.paginate = true
# config.per_page = 3
# config.page_link = "page/{num}"
end
page "/feed.xml", layout: false
########################
#
# Live Reload setting
#
########################
configure :development do
activate :livereload
end
########################
#
# Helper
#
########################
# 自動でimgタグのwidthやheightを指定する
# activate :automatic_image_sizes
# Methods defined in the helpers block are available in templates
# helpers do
# def some_helper
# "Helping"
# end
# end
########################
#
# Activate plugins
#
########################
configure :build do
# activate :minify_css
# activate :minify_javascript
# activate :minify_html
# Enable cache buster
# activate :asset_hash do |options|
# options.ignore = [/^assets\/images\/teaser\/eyecatch\.jpg/, /^assets\/images\/eyecatch\.jpg/]
# end
# Use relative URLs
# activate :relative_assets
end