Find unused and invalid Radiant Snippets

Posted on 29 January 2013 by Johannes Fahrenkrug. Tags: Programming Ruby rails

When using the Ruby on Rails based Radiant CMS system, you might find yourself wondering which snippets are unused or which non-existent snippets are referenced in a page, a layout or another snippet. I've created a small script that finds both unused as well as invalid snippets:

Just run it like so:

bundle exec ./script/runner dead_snippets.rb

Enjoy!


Comments

Please keep it clean, everybody. Comments with profanity will be deleted.

blog comments powered by Disqus