# Define a filter for adding the Dokieli UI Nanoc::Filter.define(:scholar_dokieli_ui) do |content| content = content.dup # Add Dokieli scripts at the end of the content.gsub! %r{\<\/head\>} do |match| <<-HTML HTML end content end