Skip to content

Commit 26227e1

Browse files
authored
Merge pull request rails#52245 from p8/guides/link-best-practices
Add link guidelines to guides [ci-skip]
2 parents bdb18ce + 1cac637 commit 26227e1

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

guides/source/ruby_on_rails_guides_guidelines.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,33 @@ Use the same inline formatting as regular text:
5151
##### The `:content_type` Option
5252
```
5353

54-
Linking to the API
55-
------------------
54+
Links
55+
-----
56+
57+
Use descriptive links and avoid "here" and "more" links:
58+
59+
```markdown
60+
# BAD
61+
See the Rails Internationalization (I18n) API documentation for [more
62+
details](i18n.html).
63+
64+
# GOOD
65+
See the [Rails Internationalization (I18n) API documentation](i18n.html) for
66+
more details.
67+
```
68+
69+
Use descriptive links for internal links as well:
70+
71+
```markdown
72+
# BAD
73+
We will cover this [below](#multiple-callback-conditions).
74+
75+
# GOOD
76+
We will cover this in the [multiple callback conditions
77+
section](#multiple-callback-conditions) shown below.
78+
```
79+
80+
### Linking to the API
5681

5782
Links to the API (`api.rubyonrails.org`) are processed by the guides generator in the following manner:
5883

0 commit comments

Comments
 (0)