-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.rb
138 lines (112 loc) · 3.94 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
require 'slim'
# General configuration --------------------------------------------------------
# We use single quotes for HTML attributes so that viewloader can be parsed.
Slim::Engine.set_options attr_quote: "'"
activate :dotenv
# Set Markdown engine to use redcarpet
set :markdown_engine, :redcarpet
set :markdown, fenced_code_blocks: true,
autolink: true,
smartypants: true,
hard_wrap: true,
smart: true,
superscript: true,
no_intra_emphasis: true,
lax_spacing: true,
with_toc_data: true
# Set asset directories to nothing
config[:js_dir] = ''
config[:css_dir] = ''
config[:images_dir] = ''
# Helpers ----------------------------------------------------------------------
require "lib/typography_helpers"
helpers TypographyHelpers
require "lib/asset_helpers"
helpers AssetHelpers
# Methods defined in the helpers block are available in templates
# Add custom ones below
#
# helpers do
# def some_helper
# "Helping"
# end
# end
# Page options -----------------------------------------------------------------
# Page rules are matched in order from top to bottom.
#
# Example configuration options:
# With no layout:
#
# page "/path/to/file.html", layout: false
#
# With alternative layout:
#
# page "/path/to/file.html", layout: :other_layout
#
# A path which all have the same layout:
#
# with_layout :admin do
# page "/admin/*"
# end
# Proxy (fake) files:
# page "/this-page-has-no-template.html", proxy: "/template-file.html" do
# @which_fake_page = "Rendering a fake page with a variable"
# end
# Pages without layout
page "*.xml", layout: false
page "*.json", layout: false
page "*.txt", layout: false
# Catch-all for other routes
page "*", layout: "layouts/base"
# Proxy pages (http://middlemanapp.com/basics/dynamic-pages/)
# proxy "/this-page-has-no-template.html", "/template-file.html", locals: {
# which_fake_page: "Rendering a fake page with a local variable" }
# Webpack configuration --------------------------------------------------------
activate :external_pipeline,
name: "icelab-assets",
command: build? ? "yarn run build" : "yarn run start",
source: ".tmp/dist",
latency: 1
# General configuration --------------------------------------------------------
activate :directory_indexes
activate :asset_hash
# Reload the browser automatically whenever files change
configure :development do
activate :livereload
end
# Build-specific configuration -------------------------------------------------
ignore "assets/**/*.css"
ignore "assets/**/*.js"
configure :build do
end
# Deployment configuration -----------------------------------------------------
# Deploy to GitHub Pages
#
# activate :deploy do |config|
# config.deploy_method = :git
# config.branch = "gh-pages"
# config.build_before = true
# end
# Deploy to S3
#
# You’ll need to fill in the credentials in your `.env`. Check the documentation
# for the middleman-s3_sync gem for more details <https://github.com/fredjean
# /middleman-s3_sync>
#
# activate :s3_sync do |s3_sync|
# s3_sync.bucket = ENV["AWS_BUCKET"]
# s3_sync.region = ENV["AWS_REGION"]
# 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
# s3_sync.after_build = false
# 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