Add recommendations on link formatting in documentation
This commit is contained in:
parent
02cc9d48f1
commit
12f4e9655e
@ -199,6 +199,36 @@ will be autolinked:
|
|||||||
If not, or if you suppress autolinking, consider forcing
|
If not, or if you suppress autolinking, consider forcing
|
||||||
[monofont](rdoc-ref:RDoc::MarkupReference@Monofont).
|
[monofont](rdoc-ref:RDoc::MarkupReference@Monofont).
|
||||||
|
|
||||||
|
### Explicit Links
|
||||||
|
|
||||||
|
When writing an explicit link, follow these guidelines.
|
||||||
|
|
||||||
|
#### +rdoc-ref+ Scheme
|
||||||
|
|
||||||
|
Use the +rdoc-ref+ scheme for:
|
||||||
|
|
||||||
|
- A link in core documentation to other core documentation.
|
||||||
|
- A link in core documentation to documentation in a standard library package.
|
||||||
|
- A link in a standard library package to other documentation in that same
|
||||||
|
standard library package.
|
||||||
|
|
||||||
|
See section "+rdoc-ref+ Scheme" in {Links}[rdoc-ref:RDoc::MarkupReference@Links].
|
||||||
|
|
||||||
|
#### URL-Based Link
|
||||||
|
|
||||||
|
Use a full URL-based link for:
|
||||||
|
|
||||||
|
- A link in standard library documentation to documentation in the core.
|
||||||
|
- A link in standard library documentation to documentation in a different
|
||||||
|
standard library package.
|
||||||
|
|
||||||
|
Doing so ensures that the link will valid even when the package documentation
|
||||||
|
is built independently (separately from the core documentation).
|
||||||
|
|
||||||
|
The link should lead to a target in https://docs.ruby-lang.org/en/master/.
|
||||||
|
|
||||||
|
Also use a full URL-based link for a link to an off-site document.
|
||||||
|
|
||||||
### Variable Names
|
### Variable Names
|
||||||
|
|
||||||
The name of a variable (as specified in its call-seq) should be marked up as
|
The name of a variable (as specified in its call-seq) should be marked up as
|
||||||
|
Loading…
x
Reference in New Issue
Block a user