marionettejs.com
marionettejs.com copied to clipboard
Add a crawler to make sure all links resolve and do not 404
xref https://github.com/marionettejs/backbone.marionette/issues/2211
this is what I have in mind:
docs = File.read('docs/*.md');
links = docs.map do |doc|
return doc.scan(/\[.*\]'(\S+\)/)
end
links.each do |link|
resp = url.get(link)
if !resp
puts "bad link"
end
end
apologize for the ruby
yep :) I think we can do this statically as a test ... should be quite simple actually