forked from mdrenger/darmstadt.freifunk.net
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Rakefile
41 lines (35 loc) · 1.03 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
require 'html-proofer'
task :build do
sh "jekyll build"
end
task :serve do
sh "jekyll serve"
end
task :htmlproofer do
HTMLProofer.check_directory("./_site",
{:url_ignore => [
/news/,
/http(s?):\/\/127\.0\..*/,
/http(s?):\/\/192\.168\..*/,
/http(s?):\/\/(.*)\.ffdd/,
/http(s?):\/\/(.*)\.freifunk.net/,
/http(s?):\/\/(.*)\.freifunk-dresden.de/,
/kosmonautensofa.de/,
/konglomerat.org/,
/datenkollektiv.net/,
/ccc.de/
]}).run
end
task :trailing_spaces do
output = `find pages _posts _sass -type f -exec egrep -l \" +$\" {} \\;`
if output.strip != "" then
raise "files containing trailing spaces:\n" + output
end
end
task :test => :build do
Rake::Task['trailing_spaces'].invoke
Rake::Task['htmlproofer'].invoke
end
task :clean do
sh "bundle exec rm -R ./_site || true"
end