https://github.com/ruby/rdoc
RDoc produces HTML and online documentation for Ruby projects.
https://github.com/ruby/rdoc
Keywords
documentation-tool hacktoberfest ruby
Keywords from Contributors
rubygems activerecord activejob mvc rack json-parser repl rubocop debugger ruby-gem
Last synced: about 13 hours ago
JSON representation
Repository metadata
RDoc produces HTML and online documentation for Ruby projects.
- Host: GitHub
- URL: https://github.com/ruby/rdoc
- Owner: ruby
- License: other
- Created: 2010-12-23T19:32:54.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2026-04-21T07:40:18.000Z (9 days ago)
- Last Synced: 2026-04-23T09:02:19.013Z (7 days ago)
- Topics: documentation-tool, hacktoberfest, ruby
- Language: Ruby
- Homepage: https://ruby.github.io/rdoc/
- Size: 8.91 MB
- Stars: 909
- Watchers: 58
- Forks: 455
- Open Issues: 161
- Releases: 110
-
Metadata Files:
- Readme: README.md
- Changelog: History.rdoc
- Contributing: CONTRIBUTING.md
- License: LICENSE.rdoc
- Agents: AGENTS.md
README.md
RDoc - Ruby Documentation System
- GitHub: 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.
Generating Documentation
Once installed, you can create documentation using the rdoc command
rdoc [options] [names...]
For an up-to-date option summary, type
rdoc --help
A typical use might be to generate documentation for a package of Ruby source (such as RDoc itself).
rdoc
This command generates documentation for all the Ruby and C source files in and below the current directory. These will be stored in a documentation tree starting in the subdirectory doc.
You can make this slightly more useful for your readers by having the index page contain the documentation for the primary file. In our case, we could type
rdoc --main README.md
You'll find information on the various formatting tricks you can use in comment blocks in the documentation this generates.
RDoc uses file extensions to determine how to process each file. File names ending .rb and .rbw are assumed to be Ruby source. Files ending .c are parsed as C files. All other files are assumed to contain just Markup-style markup (with or without leading # comment markers). If directory names are passed to RDoc, they are scanned recursively for C and Ruby source files only.
To generate documentation using rake see RDoc::Task.
To generate documentation programmatically:
require 'rdoc/rdoc'
options = RDoc::Options.new
options.files = ['a.rb', 'b.rb']
options.setup_generator 'aliki'
# see RDoc::Options
rdoc = RDoc::RDoc.new
rdoc.document options
# see RDoc::RDoc
You can specify the target files for document generation with .document file in the project root directory. .document file contains a list of file and directory names including comment lines starting with #. See https://github.com/ruby/rdoc/blob/master/.document as an example.
Writing Documentation
To write documentation for RDoc, place a comment above the class, module, method, constant, or attribute you want documented:
##
# This class represents an arbitrary shape by a series of points.
class Shape
##
# Creates a new shape described by a +polyline+.
#
# If the +polyline+ does not end at the same point it started at the
# first pointed is copied and placed at the end of the line.
#
# An ArgumentError is raised if the line crosses itself, but shapes may
# be concave.
def initialize polyline
# ...
end
end
Markup Formats
RDoc supports multiple markup formats:
| Format | File Extensions | Default For |
|---|---|---|
| RDoc | .rdoc |
.rb, .c files |
| Markdown | .md |
None |
| RD | .rd |
None |
| TomDoc | N/A | None |
RDoc markup is currently the default format for Ruby and C files. However, we plan to retire it in favor of Markdown in the future.
Markdown support is actively being improved. Once it reaches feature parity with RDoc markup, it will become the default format.
For standalone documentation files, we recommend writing .md files instead of .rdoc files.
RD and TomDoc are legacy formats. We highly discourage their use in new projects.
Specifying Markup Format
Per-file: Add a :markup: directive at the top of a Ruby file:
# :markup: markdown
# This class uses **Markdown** for documentation.
class MyClass
end
Per-project: Create a .rdoc_options file in your project root:
markup: markdown
Command line:
rdoc --markup markdown
Feature Differences
| Feature | RDoc Markup | Markdown |
|---|---|---|
| Headings | = Heading |
# Heading |
| Bold | *word* |
**word** |
| Italic | _word_ |
*word* |
| Monospace | +word+ |
`word` |
| Links | {text}[url] |
[text](url) |
| Code blocks | Indent 2 spaces | Fenced with ``` |
| Cross-references | Automatic | Automatic |
Directives (:nodoc:, etc.) |
Supported | Supported |
| Tables | Not supported | Supported |
| Strikethrough | <del>text</del> |
~~text~~ |
| Footnotes | Not supported | Supported |
For complete syntax documentation, see:
Directives
Comments can contain directives that tell RDoc information that it cannot otherwise discover through parsing. See RDoc::Markup@Directives to control what is or is not documented, to define method arguments or to break up methods in a class by topic. See RDoc::Parser::Ruby for directives used to teach RDoc about metaprogrammed methods.
See RDoc::Parser::C for documenting C extensions with RDoc.
Documentation Coverage
To determine how well your project is documented run rdoc -C lib to get a documentation coverage report. rdoc -C1 lib includes parameter names in the documentation coverage report.
Theme Options
RDoc ships with two built-in themes:
- Aliki (default) - A modern, clean theme with improved navigation and search
- Darkfish (deprecated) - The classic theme, will be removed in v8.0
To use the Darkfish theme instead of the default Aliki theme:
rdoc --format darkfish
Or in your .rdoc_options file:
generator_name: darkfish
There are also a few community-maintained themes for RDoc:
- rorvswild-theme-rdoc
- hanna (a fork maintained by Jeremy Evans)
Please follow the theme's README for usage instructions.
Live Preview Server
RDoc includes a built-in server for previewing documentation while you edit source files. It parses your code once on startup, then watches for changes and auto-refreshes the browser.
rdoc --server
This starts a server at http://localhost:4000. You can specify a different port:
rdoc --server=8080
Or use the Rake task:
rake rdoc:server
How It Works
- Parses all source files on startup and serves pages from memory using the Aliki theme
- A background thread polls file mtimes every second
- When a file changes, only that file is re-parsed — the browser refreshes automatically
- New files are detected and added; deleted files are removed
No external dependencies. The server uses Ruby's built-in TCPServer (socket stdlib) — no WEBrick or other gems required.
Limitations
- Reopened classes and file deletion. If a class is defined across multiple files (e.g.
Fooin botha.rbandb.rb), deleting one file removes the entire class from the store, including parts from the other file. Saving the remaining file triggers a re-parse that restores it. - Full cache invalidation. Any file change clears all cached pages. This is simple and correct — rendering is fast (~ms per page), parsing is the expensive part and is done incrementally.
- No HTTPS or HTTP/2. The server is intended for local development preview only.
Bugs
See CONTRIBUTING.md for information on filing a bug report. It's OK to file a bug report for anything you're having a problem with. If you can't figure out how to make RDoc produce the output you like that is probably a documentation bug.
License
RDoc is Copyright (c) 2001-2003 Dave Thomas, The Pragmatic Programmers. Portions (c) 2007-2011 Eric Hodel. Portions copyright others, see individual files and LEGAL.rdoc for details.
RDoc is free software, and may be redistributed under the terms specified in LICENSE.rdoc.
Warranty
This software is provided "as is" and without any express or implied warranties, including, without limitation, the implied warranties of merchantability and fitness for a particular purpose.
Owner metadata
- Name: The Ruby Programming Language
- Login: ruby
- Email: info@ruby-lang.org
- Kind: organization
- Description: Repositories related to the Ruby Programming language
- Website: https://www.ruby-lang.org/
- Location: Matsue, Japan
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/210414?v=4
- Repositories: 171
- Last ynced at: 2023-04-09T03:40:20.875Z
- Profile URL: https://github.com/ruby
GitHub Events
Total
- Release event: 13
- Delete event: 140
- Member event: 3
- Pull request event: 430
- Fork event: 21
- Issues event: 107
- Watch event: 49
- Issue comment event: 412
- Push event: 499
- Pull request review comment event: 378
- Pull request review event: 504
- Create event: 168
Last Year
- Release event: 4
- Delete event: 80
- Member event: 1
- Pull request event: 220
- Fork event: 13
- Issues event: 58
- Watch event: 28
- Issue comment event: 205
- Push event: 299
- Pull request review event: 211
- Pull request review comment event: 155
- Create event: 98
Committers metadata
Last synced: 1 day ago
Total Commits: 3,570
Total Committers: 140
Avg Commits per committer: 25.5
Development Distribution Score (DDS): 0.533
Commits in past year: 242
Committers in past year: 19
Avg Commits per committer in past year: 12.737
Development Distribution Score (DDS) in past year: 0.57
| Name | Commits | |
|---|---|---|
| Eric Hodel | d****n@s****t | 1667 |
| Code Ass | a****a@g****m | 474 |
| SHIBATA Hiroshi | h****t@r****g | 256 |
| Nobuyoshi Nakada | n****u@r****g | 246 |
| Stan Lo | s****2@g****m | 170 |
| dependabot[bot] | 4****] | 126 |
| Designing Patterns | t****s@d****m | 62 |
| Zachary Scott | e@z****o | 49 |
| tomoya ishida | t****n@g****m | 46 |
| Zachary Scott | z****y@z****t | 27 |
| Burdette Lamar | B****r@Y****m | 26 |
| Tom Copeland | t****m@i****m | 25 |
| Kouhei Sutou | k****u@c****m | 19 |
| Yusuke Endoh | m****e@r****g | 18 |
| Vinicius Stock | v****k | 15 |
| Kazuhiro NISHIYAMA | zn@m****m | 15 |
| Phil Hagelberg | p****l@h****g | 13 |
| Mike Dalessio | m****o@g****m | 12 |
| Erik Hollensbe | e****b@h****g | 11 |
| Jeremy Evans | c****e@j****t | 11 |
| Benoit Daloze | e****p@g****m | 10 |
| Masafumi Koba | 4****s | 10 |
| Earlopain | 1****n | 9 |
| Yusuke Nakamura | y****5@g****m | 8 |
| Ryan Davis | r****y@z****m | 8 |
| Petrik | p****k@d****t | 8 |
| Marcus Stollsteimer | s****r@w****e | 7 |
| Amauri Bizerra | 1****c | 7 |
| toshimaru | me@t****t | 6 |
| zzak | z****t@g****m | 6 |
| and 110 more... | ||
Committer domains:
- ruby-lang.org: 4
- redhat.com: 3
- zzak.io: 2
- hollensbe.org: 2
- gimp.org: 1
- faeriemud.org: 1
- shopify.com: 1
- headius.com: 1
- amazon.com: 1
- dio.jp: 1
- gmx.at: 1
- reinh.com: 1
- rhe.jp: 1
- mediadrive.ca: 1
- rubinick.dev: 1
- riseup.net: 1
- peterzhu.ca: 1
- toshimaru.net: 1
- deheus.net: 1
- zenspider.com: 1
- jeremyevans.net: 1
- hagelb.org: 1
- mbf.nifty.com: 1
- clear-code.com: 1
- infoether.com: 1
- zacharyscott.net: 1
- designingpatterns.com: 1
- airemix.jp: 1
- marc-andre.ca: 1
- ktdreyer.com: 1
- jiubao.org: 1
- hawthorn.email: 1
- floehopper.org: 1
- waftex.com: 1
- colby.fyi: 1
- thoughtbot.com: 1
- brynary.com: 1
- hopsandfork.com: 1
- ledovskis.lv: 1
- codecompulsion.com: 1
- megiston.it: 1
- oriontransfer.co.nz: 1
- stepsecurity.io: 1
- pdfcv.com: 1
- paralaus.com: 1
- soutaro.com: 1
- stevengharms.com: 1
- peterhiggins.org: 1
- basesecrete.com: 1
- iitj.ac.in: 1
- qq.com: 1
- suse.de: 1
- stoneship.org: 1
- pocke.me: 1
- segment7.net: 1
Issue and Pull Request metadata
Last synced: about 13 hours ago
Total issues: 130
Total pull requests: 738
Average time to close issues: over 1 year
Average time to close pull requests: about 1 month
Total issue authors: 61
Total pull request authors: 67
Average comments per issue: 1.28
Average comments per pull request: 1.12
Merged pull request: 550
Bot issues: 0
Bot pull requests: 142
Past year issues: 38
Past year pull requests: 185
Past year average time to close issues: 6 days
Past year average time to close pull requests: 9 days
Past year issue authors: 21
Past year pull request authors: 24
Past year average comments per issue: 1.53
Past year average comments per pull request: 1.51
Past year merged pull request: 107
Past year bot issues: 0
Past year bot pull requests: 33
Top Issue Authors
- BurdetteLamar (14)
- st0012 (12)
- okuramasafumi (7)
- nobu (7)
- hsbt (6)
- Earlopain (5)
- zenspider (5)
- tompng (3)
- halostatue (3)
- zzak (3)
- nevans (3)
- peterzhu2118 (3)
- gemmaro (3)
- p8 (2)
- skatkov (2)
Top Pull Request Authors
- st0012 (173)
- dependabot[bot] (142)
- nobu (70)
- tompng (47)
- BurdetteLamar (32)
- hsbt (25)
- p8 (20)
- okuramasafumi (19)
- flavorjones (15)
- vinistock (15)
- zzak (14)
- ybiquitous (13)
- nevans (11)
- sunblaze (11)
- adam12 (8)
Top Issue Labels
- bug (16)
- enhancement (6)
- Feature Request (5)
- markup-markdown (4)
- Bug (2)
- Non-Bug (1)
- generator (1)
- documentation (1)
Top Pull Request Labels
- dependencies (142)
- enhancement (79)
- bug (69)
- github_actions (48)
- documentation (36)
- Documentation (7)
- Feature Request (6)
- refactor (2)
- experimental (2)
- breaking-change (2)
- integration_testng (2)
- Bug (1)
- javascript (1)
- Performance (1)
Package metadata
- Total packages: 4
-
Total downloads:
- rubygems: 594,716,597 total
- Total docker downloads: 9,767,317,480
- Total dependent packages: 5,167 (may contain duplicates)
- Total dependent repositories: 465,939 (may contain duplicates)
- Total versions: 319
- Total maintainers: 6
- Total advisories: 6
gem.coop: rdoc
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.
- Homepage: https://ruby.github.io/rdoc
- Documentation: http://www.rubydoc.info/gems/rdoc/
- Licenses: Ruby
- Latest release: 7.2.0 (published 3 months ago)
- Last Synced: 2026-04-28T14:01:40.412Z (2 days ago)
- Versions: 124
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 297,055,952 Total
- Docker Downloads: 4,883,658,740
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 0.033%
- Downloads: 0.099%
- Maintainers (6)
- Advisories:
rubygems.org: rdoc
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.
- Homepage: https://ruby.github.io/rdoc
- Documentation: http://www.rubydoc.info/gems/rdoc/
- Licenses: Ruby
- Latest release: 7.2.0 (published 3 months ago)
- Last Synced: 2026-04-30T04:20:57.317Z (about 14 hours ago)
- Versions: 124
- Dependent Packages: 5,167
- Dependent Repositories: 465,939
- Downloads: 297,660,645 Total
- Docker Downloads: 4,883,658,740
-
Rankings:
- Docker downloads count: 0.002%
- Dependent packages count: 0.009%
- Dependent repos count: 0.036%
- Downloads: 0.117%
- Average: 0.578%
- Forks count: 1.235%
- Stargazers count: 2.068%
- Maintainers (6)
- Advisories:
proxy.golang.org: github.com/ruby/rdoc
- Homepage:
- Documentation: https://pkg.go.dev/github.com/ruby/rdoc#section-documentation
- Licenses: other
- Latest release: v7.2.0+incompatible (published 3 months ago)
- Last Synced: 2026-04-28T04:01:32.437Z (3 days ago)
- Versions: 70
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Forks count: 1.352%
- Stargazers count: 2.208%
- Average: 5.984%
- Dependent packages count: 9.576%
- Dependent repos count: 10.802%
guix: ruby-rdoc
HTML and command-line documentation utility
- Homepage: https://ruby.github.io/rdoc/
- Documentation: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/ruby-xyz.scm#n12687
- Licenses: gpl2+
- Latest release: 6.7.0 (published about 2 months ago)
- Last Synced: 2026-04-27T16:19:11.463Z (3 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
Dependencies
- gettext >= 0 development
- kpeg >= 0 development
- racc > 1.4.10 development
- rake >= 0 development
- rubocop >= 0 development
- test-unit >= 0 development
- psych >= 4.0.0
- actions/checkout ac593985615ec2ede58e132d2e21d2b1cbd6127c composite
- ruby/setup-ruby 319066216501fbd5e2d568f14b7d68c19fb67a5d composite
- actions/checkout v3 composite
- actions/configure-pages v3 composite
- actions/deploy-pages v2 composite
- actions/upload-pages-artifact v1 composite
- ruby/setup-ruby 250fcd6a742febb1123a77a841497ccaa8b9e939 composite
- actions/checkout 8e8c483db84b4bee98b60c0593521ed34d9990e8 composite
- ruby/setup-ruby eaecf785f6a34567a6d97f686bbb7bccc1ac1e5c composite
- rubygems/release-gem 1c162a739e8b4cb21a676e97b087e8268d8fc40b composite
- step-security/harden-runner df199fb7be9f65074067a9eb93f12bb4c5547cf2 composite
- 124 dependencies
- actions/checkout 8e8c483db84b4bee98b60c0593521ed34d9990e8 composite
- ruby/setup-ruby eaecf785f6a34567a6d97f686bbb7bccc1ac1e5c composite
- actions/download-artifact v6 composite
- actions/github-script v8 composite
- actions/checkout v6.0.1 composite
- actions/github-script v8 composite
- cloudflare/wrangler-action v3 composite
- ruby/setup-ruby v1 composite
- actions/checkout v6.0.1 composite
- ruby/setup-ruby master composite
- stylelint ^16.25.0 development
- stylelint-config-standard ^39.0.1 development
- stylelint-value-no-unknown-custom-properties ^6.0.1 development
- actions/github-script v8 composite
- actions/upload-artifact v5 composite
Score: 34.97851730525226