lib/showoff.rb in showoff-0.3.1 vs lib/showoff.rb in showoff-0.3.2
- old
+ new
@@ -267,11 +267,17 @@
html = Nokogiri::XML.parse("<slides>" + slides + "</slides>")
html.css('img').each do |link|
href = clean_link(link['src'])
assets << href if href
end
+
+ css = Dir.glob("#{options.public}/**/*.css").map { |path| path.gsub(options.public + '/', '') }
+ assets << css
- assets.join("\n")
+ js = Dir.glob("#{options.public}/**/*.js").map { |path| path.gsub(options.public + '/', '') }
+ assets << js
+
+ assets.uniq.join("\n")
end
def slides(static=false)
get_slides_html(static)
end