summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBurdette Lamar <BurdetteLamar@Yahoo.com>2023-11-23 22:39:24 -0600
committerGitHub <noreply@github.com>2023-11-23 20:39:24 -0800
commit12f4e9655e6278b14f3b75ccccf63a535d72c120 (patch)
treec1b011f31d0d40f6e8fe70c932f923b2e5ede72c
parent02cc9d48f1958e8f22757116358cf5863cb109f4 (diff)
Add recommendations on link formatting in documentation
-rw-r--r--doc/contributing/documentation_guide.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/contributing/documentation_guide.md b/doc/contributing/documentation_guide.md
index af91817003..2192c12d46 100644
--- a/doc/contributing/documentation_guide.md
+++ b/doc/contributing/documentation_guide.md
@@ -199,6 +199,36 @@ will be autolinked:
If not, or if you suppress autolinking, consider forcing
[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
The name of a variable (as specified in its call-seq) should be marked up as