aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_plugins/linter.rb15
-rw-r--r--default.nix1
2 files changed, 16 insertions, 0 deletions
diff --git a/_plugins/linter.rb b/_plugins/linter.rb
index 5281985..188aede 100644
--- a/_plugins/linter.rb
+++ b/_plugins/linter.rb
@@ -144,9 +144,24 @@ module Jekyll
end
end
+ def assert_git_annex(site)
+ url = site.config['url']
+ stdout = `git annex find --not --in web`
+ if stdout != '' or not $?.success? then
+ puts 'Files in Git Annex not published to "web" remote:'
+ puts stdout
+ puts 'Add them with:'
+ stdout.strip.split('\n').each do |file|
+ puts " git annex addurl --file #{file} #{url}/#{file}"
+ end
+ raise 'Build again after files above are added'
+ end
+ end
+
def generate(site)
assert_unique_ids(site)
assert_frontmatter(site)
+ assert_git_annex(site)
end
end
end
diff --git a/default.nix b/default.nix
index 90bc009..067f0f1 100644
--- a/default.nix
+++ b/default.nix
@@ -31,6 +31,7 @@ let
graphviz
nixfmt
git
+ gitAndTools.git-annex
shellcheck
jq
niv