-
Notifications
You must be signed in to change notification settings - Fork 18
/
config.rb
57 lines (46 loc) · 1.51 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
# frozen_string_literal: true
require "debug"
require "lib/i18n_helpers"
require "lib/i18n_title_helpers"
require "lib/data_helpers"
require "lib/format_helpers"
require "lib/icon_helpers"
require "lib/page_helpers"
helpers I18nHelpers
helpers I18nTitleHelpers
helpers DataHelpers
helpers FormatHelpers
helpers IconHelpers
helpers PageHelpers
# Activate multi-language
activate :i18n, mount_at_root: :en, langs: [:en, :es, :ca, :cs, :fr, :de, :ja, :"pt-BR", :ro, :fi]
activate :directory_indexes
# Reload the browser automatically whenever files change
configure :development do
activate :livereload
end
activate :external_pipeline,
name: :tailwindcss,
command: "./node_modules/tailwindcss/lib/cli.js --postcss -i ./source/stylesheets/site.css -o ./source/stylesheets/tailwind.css #{build? ? "--minify" : "--watch"}",
source: "source/stylesheets",
latency: 1
# Per-page layout changes
page "/*.xml", layout: false
page "/*.json", layout: false
page "/*.txt", layout: false
# Blog
activate :blog do |blog|
blog.paginate = false
blog.layout = "blog_layout"
blog.permalink = "blog/{year}-{month}-{day}-{title}.html"
blog.sources = "blog/en/{year}-{month}-{day}-{title}.html"
blog.default_extension = ".md"
blog.tag_template = "blog/tag.html"
blog.calendar_template = "blog/calendar.html"
end
configure :build do
activate :images
end
# Copy Netlify's configurations file on build
proxy "_redirects", "netlify-redirects", ignore: true
proxy "_headers", "netlify-headers", ignore: true