Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

<p align="center" class="rdoc-logo">
<img src="rdoc-logo.svg" alt="RDoc" width="168" height="198">
</p>
Comment thread
st0012 marked this conversation as resolved.

## 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.
Expand Down
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions lib/rdoc/generator/template/aliki/css/rdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
43 changes: 43 additions & 0 deletions rdoc-logo.svg

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally this should be under doc/. But moving it there would cause file path mismatch in generated doc (copied file is always placed on _site/, so source will still be rdoc-logo.svg) and GH (will use doc/rdoc-logo.svg). So I'll leave that to another discussion/PR.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion rdoc.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand All @@ -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")
Expand Down
Loading