-
Notifications
You must be signed in to change notification settings - Fork 48
/
Rakefile
64 lines (53 loc) · 1.74 KB
/
Rakefile
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
# require 'html-proofer'
# Add environment variables below
envvars = {
CSHPUBSITE_ASSETS_URL: "https://assets.csh.rit.edu/pubsite",
CSHPUBSITE_S3_URL: "https://s3.csh.rit.edu"
}.map { |k,v| ["#{k}=#{v}"]}.join(" ")
$outputDir = "./_site"
$testOpts = {
# An array of Strings containing domains that will be treated as internal urls
:internal_domains => ["pubsite.a.csh.rit.edu"],
# Ignore errors "linking to internal hash # that does not exist"
:url_ignore => ["#"],
# Allow empty alt tags (e.g. alt="") as these represent presentational images
:empty_alt_ignore => true,
# Automatically add extension (e.g. .html) to file paths, to allow extensionless URLs
:assume_extension => true,
# LinkedIn blocks connections from html-proofer, ignore 999 error
:http_status_ignore => [999],
# SSL seems to be broken on TravisCI, so we'll ignore SSL errors.
:typhoeus => {
:ssl_verifypeer => 0,
:ssl_verifyhost => 0,
}
}
task :default => ["serve:development"]
desc "cleans the output directory"
task :clean do
sh "jekyll clean"
end
namespace :build do
desc "build development site"
task :development => [:clean] do
sh "#{envvars} jekyll build --drafts"
end
desc "build production site"
task :production => [:clean] do
sh "#{envvars} JEKYLL_ENV=production jekyll build --config=_config.yml"
end
end
namespace :serve do
desc "serve development site"
task :development => [:clean] do
sh "#{envvars} jekyll serve --drafts"
end
desc "serve production site"
task :production => [:clean] do
sh "#{envvars} JEKYLL_ENV=production jekyll serve --config=_config.yml"
end
end
# desc "test production build"
# task :test => ["build:production"] do
# HTMLProofer.check_directory($outputDir, $testOpts).run
# end