diff --git a/README.md b/README.md index 3f3e4519a1..9bc854a2ce 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,10 @@ - GitHub: [https://github.com/ruby/rdoc](https://github.com/ruby/rdoc) - Issues: [https://github.com/ruby/rdoc/issues](https://github.com/ruby/rdoc/issues) + + ## Description RDoc produces HTML and command-line documentation for Ruby projects. RDoc includes the `rdoc` and `ri` tools for generating and displaying documentation from the command-line. diff --git a/Rakefile b/Rakefile index cd8f2d9788..988c01b80f 100644 --- a/Rakefile +++ b/Rakefile @@ -29,6 +29,7 @@ task rdoc: :generate RDoc::Task.new do |doc| # RDoc task defaults to /html and overrides the op_dir option in .rdoc_options doc.rdoc_dir = "_site" # for GitHub Pages + doc.options << "--copy-files" << "rdoc-logo.svg" end task "coverage" do diff --git a/lib/rdoc/generator/template/aliki/css/rdoc.css b/lib/rdoc/generator/template/aliki/css/rdoc.css index a0bbae2d7b..9c9b8bb340 100644 --- a/lib/rdoc/generator/template/aliki/css/rdoc.css +++ b/lib/rdoc/generator/template/aliki/css/rdoc.css @@ -1107,6 +1107,22 @@ main p { margin-bottom: var(--space-4); } +main .rdoc-logo { + margin: var(--space-6) 0 var(--space-8); + text-align: center; +} + +main .rdoc-logo img { + display: inline-block; + width: clamp(120px, 14vw, 168px); + height: auto; + filter: drop-shadow(0 8px 18px rgb(230 41 35 / 8%)); +} + +[data-theme="dark"] main .rdoc-logo img { + filter: saturate(0.58) brightness(1.4) drop-shadow(0 8px 22px rgb(235 84 79 / 16%)); +} + /* Preformatted Text */ main pre { margin: 1.2em 0.5em; diff --git a/rdoc-logo.svg b/rdoc-logo.svg new file mode 100644 index 0000000000..d7c69391c4 --- /dev/null +++ b/rdoc-logo.svg @@ -0,0 +1,43 @@ + + RDoc + A red document outline with a folded corner and a Ruby gem. + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rdoc.gemspec b/rdoc.gemspec index e41d8dd41f..b38fbecc7a 100644 --- a/rdoc.gemspec +++ b/rdoc.gemspec @@ -51,6 +51,7 @@ RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentat "exe/rdoc", "exe/ri", "man/ri.1", + "rdoc-logo.svg", "rdoc.gemspec", ] base = __dir__ @@ -60,7 +61,7 @@ RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentat s.files = (non_lib_files + template_files + lib_files).uniq - s.rdoc_options = ["--main", "README.md"] + s.rdoc_options = ["--main", "README.md", "--copy-files", "rdoc-logo.svg"] s.extra_rdoc_files += s.files.grep(%r[\A[^\/]+\.(?:rdoc|md)\z]) s.required_ruby_version = Gem::Requirement.new(">= 3.2.0")