Skip to content

Add user-facing configuration reference#1692

Open
st0012 wants to merge 1 commit intoruby:masterfrom
st0012:docs/configuration
Open

Add user-facing configuration reference#1692
st0012 wants to merge 1 commit intoruby:masterfrom
st0012:docs/configuration

Conversation

@st0012
Copy link
Copy Markdown
Member

@st0012 st0012 commented May 4, 2026

Summary

Adds doc/configuration.md, a single-page reference covering how to configure RDoc.

  • The four configuration mechanisms — .rdoc_options, RDoc::Task, .document, and the RDOCOPT env var — with when to use each, syntax, and a worked example.
  • A "name cheat sheet" flagging the ten cross-mechanism naming caveats (e.g. --main vs main_page vs rdoc.main; --output/op_dir/rdoc.rdoc_dir; --template having no portable YAML form).
  • A grouped options reference (What to document, Appearance, Dev/preview, Cross-references, Output/format, I18n) with each option's CLI flag, .rdoc_options key, RDoc::Task attribute, effective default, and notes.
  • Worked examples: minimal gem setup, Rakefile equivalent, footer_content for the Aliki theme, and combining .document + exclude + --no-skipping-tests for scope tuning.

Defaults sourced from RDoc::Options#init_ivars and RDoc::Options#finish (which post-processes a few like op_dir'doc' and rdoc_include[project root]); RDoc::Task defaults from RDoc::Task#defaults (which differs in places, e.g. rdoc_dir = 'html').

A user-facing configuration reference for RDoc covering the four
configuration mechanisms (`.rdoc_options`, `RDoc::Task`, `.document`,
`RDOCOPT`), a name cheat sheet flagging the nine cross-mechanism
naming mismatches, and a grouped options reference with defaults
sourced from `RDoc::Options#init_ivars`.
@st0012 st0012 requested a deployment to fork-preview-protection May 4, 2026 09:47 — with GitHub Actions Waiting
@st0012 st0012 marked this pull request as ready for review May 7, 2026 06:27
Copilot AI review requested due to automatic review settings May 7, 2026 06:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new user-facing documentation page (doc/configuration.md) that consolidates RDoc configuration mechanisms and option mappings into a single reference, intended to ship as part of RDoc’s own generated documentation.

Changes:

  • Documented the four configuration mechanisms (.rdoc_options, RDoc::Task, .document, RDOCOPT) including precedence and usage guidance.
  • Added a “name cheat sheet” and a cross-mechanism naming table mapping CLI flags ↔ YAML keys ↔ RDoc::Task attributes.
  • Added grouped option reference tables plus worked examples for common setups.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread doc/configuration.md

This writes a `.rdoc_options` file containing the current settings.

**Limitation.** Some options cannot be stored in `.rdoc_options` (they are silently ignored even if you add them). These are flagged in the [options reference](#options-reference) below. Examples: `--dry-run`, `--force-output`, `--force-update`, `--server`, `--pipe`, `--no-skipping-tests`, `--template`, `--template-stylesheets`.
Comment thread doc/configuration.md
| `--no-skipping-tests` | **CLI only** | — | skip tests | Without this flag, RDoc skips common test directory names (`test`, `spec`). |
| `--page-dir DIR` | `page_dir` | — | `nil` | Directory holding guides, FAQ, and other non-class pages. Do not reuse filenames from the project root. |
| `--root DIR` | **CLI only** | — | current dir | Root of the source tree. Set when building docs outside the source directory. |
| `--visibility VIS` | `visibility: :public` etc. | — | `:protected` | Minimum visibility: `:public`, `:protected`, `:private`, or `:nodoc` (show everything). YAML values must be symbols. |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants