forked from emilyntest/braze-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.ru
executable file
·22 lines (20 loc) · 912 Bytes
/
config.ru
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'rack/jekyll'
require 'yaml'
require './_build/cachesettings'
require 'rack/deflater'
use CacheSettings, {
/.*\.png/ => {:cache_control => "max-age=31536000, public"},
/.*\.gif/ => {:cache_control => "max-age=31536000, public"},
/.*\.jpg/ => {:cache_control => "max-age=31536000, public"},
/.*\.css/ => {:cache_control => "max-age=31536000, public"},
/.*\.js/ => {:cache_control => "max-age=31536000, public"},
/.*\.woff/ => {:cache_control => "max-age=31536000, public"},
/.*\.woff2/ => {:cache_control => "max-age=31536000, public"},
/.*\.eot/ => {:cache_control => "max-age=31536000, public"},
/.*\.svg/ => {:cache_control => "max-age=31536000, public"},
/.*\.ttf/ => {:cache_control => "max-age=31536000, public"}
}
use Rack::Deflater
FileUtils.touch('/tmp/app-initialized')
system("bundle exec rake docs:build")
run Rack::Jekyll.new