-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
42 lines (32 loc) · 810 Bytes
/
Rakefile
File metadata and controls
42 lines (32 loc) · 810 Bytes
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
task :default => :watch
desc 'Cleanup generated files'
task :clean do
sh 'rm -rf _site'
end
desc 'Build the site'
task build: [:clean] do
jekyll :build
end
desc 'Deploy the site to s3'
task deploy: [:build] do
s3 :push
end
desc 'Serve the site locally and watch for changes'
task watch: [:clean] do
jekyll 'serve --watch --drafts'
end
def jekyll(command)
with_bundler "jekyll #{command}"
end
def s3(command, options = '')
with_bundler "s3_website #{command} #{options}"
end
def with_bundler(command)
sh "bundle exec #{command}"
end
require 'html-proofer'
task :test do
sh "bundle exec jekyll build"
options = { :assume_extension => true, :check_opengraph => true, :internal_domains => ['simplicio.com', 'www.simplicio.com']}
HTMLProofer.check_directory("./_site", options).run
end