This repository has been archived by the owner on Apr 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
config.rb
77 lines (54 loc) · 1.44 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
###
# Site settings
###
# Look in data/site.yml for general site configuration
Time.zone = data.site.timezone || "UTC"
# Automatic image dimensions on image_tag helper
activate :automatic_image_sizes
# Make URLs relative
set :relative_links, true
# Set Markdown features for Kramdown
# (So our version of Markdown resembles GitHub's w/ other nice stuff)
set :markdown,
transliterated_header_ids: true,
parse_block_html: true,
parse_span_html: true,
tables: true,
hard_wrap: false,
input: 'GFM' # add in some GitHub-flavor (``` for fenced code blocks)
set :markdown_engine, :kramdown
# Set directories
set :css_dir, 'stylesheets'
set :fonts_dir, 'stylesheets/fonts'
set :js_dir, 'javascripts'
set :images_dir, 'images'
set :partials_dir, 'layouts'
# Make pretty URLs
activate :directory_indexes
###
# Page options, layouts, aliases and proxies
###
# Don't have a layout for XML
page "*.xml", :layout => false
ready do
# Add yearly calendar pages
data.events.each do |year, data|
next unless year.match(/[0-9]{4}/)
proxy "/events/#{year}.html", "events/index.html", locals: {year: year}
end
end
###
# Helpers
###
require 'lib/site_helpers.rb'
activate :site_helpers
require 'lib/confcal.rb'
activate :confcal
# Build-specific configuration
configure :build do
puts "\nUpdating git submodules..."
puts `git submodule init`
puts `git submodule foreach "git pull -qf origin master"`
puts "\n"
ignore 'events-yaml*'
end