From 250aaccf0e6cd27172b68c1c2d6486e8f1d716cc Mon Sep 17 00:00:00 2001 From: Zachary Scott Date: Fri, 29 Mar 2013 11:17:22 -0400 Subject: [PATCH] Add RDoc::Options#template_stylesheets --- lib/rdoc/generator/darkfish.rb | 3 +++ lib/rdoc/generator/template/darkfish/_head.rhtml | 5 +++++ lib/rdoc/options.rb | 14 ++++++++++++++ 3 files changed, 22 insertions(+) diff --git a/lib/rdoc/generator/darkfish.rb b/lib/rdoc/generator/darkfish.rb index 26f545b14b..8b314e0ab3 100644 --- a/lib/rdoc/generator/darkfish.rb +++ b/lib/rdoc/generator/darkfish.rb @@ -196,6 +196,9 @@ def write_style_sheet options = { :verbose => $DEBUG_RDOC, :noop => @dry_run } FileUtils.cp @template_dir + 'rdoc.css', '.', options + @options.template_stylesheets.each do |stylesheet| + FileUtils.cp stylesheet, '.', options + end Dir[(@template_dir + "{js,images}/**/*").to_s].each do |path| next if File.directory? path diff --git a/lib/rdoc/generator/template/darkfish/_head.rhtml b/lib/rdoc/generator/template/darkfish/_head.rhtml index f3d82a37f6..2993f9265a 100644 --- a/lib/rdoc/generator/template/darkfish/_head.rhtml +++ b/lib/rdoc/generator/template/darkfish/_head.rhtml @@ -3,6 +3,11 @@ <%= h @title %> +<% if @options.template_stylesheets.flatten.any? %> + <% @options.template_stylesheets.flatten.each do |stylesheet| %> + + <% end %> +<% end %>