-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathconfig.rb
executable file
·55 lines (47 loc) · 1.79 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
# encoding: utf-8
page '/index.html'
#
# Use webpack for assets
#
activate :external_pipeline,
name: :webpack,
command: build? ? "yarn run build" : "yarn run start",
source: ".tmp/dist",
latency: 1
# Reload the browser automatically whenever files change
configure :development do
activate :livereload
end
set :css_dir, 'assets/stylesheets'
set :js_dir, 'assets/javascript'
set :images_dir, 'images'
activate :directory_indexes
activate :blog do |blog|
blog.permalink = "/{title}"
blog.sources = "blog/{title}.html"
blog.layout = "blog_layout"
blog.summary_separator = '=========='
end
# Build-specific configuration
configure :build do
# Enable cache buster (except for images)
activate :asset_hash, ignore: [/\.jpg\Z/, /\.png\Z/]
end
activate :s3_sync do |s3_sync|
s3_sync.bucket = 'soliditycookbook.com' # The name of the S3 bucket you are targeting. This is globally unique.
s3_sync.region = 'us-east-1' # The AWS region for your bucket.
s3_sync.aws_access_key_id = ENV['AWS_ACCESS_KEY_ID']
s3_sync.aws_secret_access_key = ENV['AWS_SECRET_ACCESS_KEY']
s3_sync.delete = false # We delete stray files by default.
s3_sync.after_build = false # We do not chain after the build step by default.
s3_sync.prefer_gzip = true
s3_sync.path_style = true
s3_sync.reduced_redundancy_storage = false
s3_sync.acl = 'public-read'
s3_sync.encryption = false
s3_sync.prefix = ''
s3_sync.version_bucket = false
s3_sync.index_document = 'index.html'
s3_sync.error_document = '404.html'
end
default_caching_policy max_age:(60 * 60 * 24 * 365)