marionettejs.com icon indicating copy to clipboard operation
marionettejs.com copied to clipboard

Add a crawler to make sure all links resolve and do not 404

Open samccone opened this issue 9 years ago • 2 comments

xref https://github.com/marionettejs/backbone.marionette/issues/2211

samccone avatar Mar 10 '15 04:03 samccone

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

jasonLaster avatar Mar 10 '15 16:03 jasonLaster

yep :) I think we can do this statically as a test ... should be quite simple actually

samccone avatar Mar 10 '15 16:03 samccone