aboutsummaryrefslogtreecommitdiff
path: root/_plugins/linter.rb
diff options
context:
space:
mode:
Diffstat (limited to '_plugins/linter.rb')
-rw-r--r--_plugins/linter.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/_plugins/linter.rb b/_plugins/linter.rb
index 919a8bb..8078dae 100644
--- a/_plugins/linter.rb
+++ b/_plugins/linter.rb
@@ -192,11 +192,29 @@ module Jekyll
end
end
+ def assert_lilypond(site)
+ site.config['musics'].each do |music|
+ assert music['title'], "Missing 'title' in #{music}"
+ assert music['composer'], "Missing 'composer' in #{music}"
+ ref = assert music['ref'], "Missing 'ref' in #{music}"
+ ly = "music/#{ref}.ly"
+ unless File.exist? ly then
+ raise "Missing '#{ly}' file present in _config.yml."
+ end
+
+ point_and_click_off = open(ly) { |f| f.include? "\\pointAndClickOff\n" }
+ unless point_and_click_off then
+ raise "Missing '\\pointAndClickOff' in '#{ly}'"
+ end
+ end
+ end
+
def generate(site)
assert_unique_ids(site)
assert_frontmatter(site)
assert_media_metadata(site)
assert_git_annex(site)
+ assert_lilypond(site)
end
def all_documents(site)