-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.rb
84 lines (71 loc) · 2.04 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
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib")
require "custom_helpers"
helpers CustomHelpers
require 'tzinfo'
Time.zone = 'US/Eastern'
activate :livereload
activate :autoprefixer
set :markdown_engine,
:redcarpet
set :markdown,
:smartypants => true,
:footnotes => true,
:strikethrough => true,
:with_toc_data => true
activate :external_pipeline,
name: :webpack,
command: build? ? './node_modules/webpack/bin/webpack.js --bail' : './node_modules/webpack/bin/webpack.js --watch -d',
source: ".tmp/dist",
latency: 1
# Set custom asset directories.
set :css_dir, "assets/css"
set :js_dir, "assets/js"
set :images_dir, "assets/images"
set :fonts_dir, "assets/fonts"
# Activate Blog
activate :blog do |b|
b.sources = "entries/{year}-{month}-{day}-{title}.html"
b.default_extension = ".md.erb"
b.taglink = "concepts/{tag}.html"
b.tag_template = "concept.html"
b.permalink = "entries/{title}"
b.name = @app.data.site.title
b.layout = "post"
end
# Activate directory indexes for clean URLs
activate :directory_indexes
# Layouts
page '/*.xml', layout: false
page '/*.json', layout: false
page '/*.txt', layout: false
page '/', layout: 'default_layout', title: "test"
page '/posts/*', layout: 'post'
config[:sass_source_maps] = true
# Configure asset builds
configure :build do
# "Ignore" JS so webpack has full control.
ignore { |path| path =~ /\/(.*)\.js$/ && $1 != 'site' }
# activate :minify_css
activate :minify_javascript
activate :asset_hash, :exts => %w(.css)
end
helpers do
def nav_link(link, path, opts={})
if current_page.url == path
opts[:class] = "menu-link active"
else
opts[:class] = "menu-link"
end
link_to(link, path, opts)
end
end
# Deploy settings
activate :deploy do |deploy|
deploy.deploy_method = :rsync
deploy.host = '162.243.103.246'
deploy.user = 'root'
deploy.path = '/var/www/infinitecaesura.com/public_html'
# Set deploy.port to define a port for the deploy server. Defaults to 22.
deploy.flags = '--omit-dir-times -davz'
deploy.build_before = true
end