-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
50 lines (43 loc) · 1.13 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
require 'colorize'
require 'html-proofer'
require 'jekyll'
task :default => :test
desc 'Build the site with Jekyll'
task :build do
Jekyll::Commands::Build.process(profile: true)
end
desc 'Remove generated site'
task :clean do
Jekyll::Commands::Clean.process({})
end
desc 'Validate _site/ with html-proofer'
task :validate do
HTMLProofer.check_directory('./_site', {
:directory_index_file => "index.html",
:internal_domains => ["hemtjan.st"],
:check_html => true,
:assume_extension => true,
:url_swap => { "\/protokoll\/" => "\/" }, # Needed b/c of baseurl
}).run
end
desc 'Check for Jekyll deprecation issues'
task :doctor do
Jekyll::Commands::Doctor.process({})
end
desc 'Build and validate the site'
task :test do
notify 'Building site'
Rake::Task['build'].invoke
notify 'Validating site'
Rake::Task['validate'].invoke
notify 'Checking for deprecation issues'
Rake::Task['doctor'].invoke
end
def notify message
puts
puts '###################################################'.blue
puts "#{message}...".blue
puts '###################################################'.blue
puts
STDOUT.flush
end