Skip to content

Commit aa516e7

Browse files
Merge pull request #27525 from TheOdinProject/thatblindgeye-patch-3
Provide additional verbiage for links in style guide
2 parents 45e0413 + 9f59407 commit aa516e7

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

LAYOUT_STYLE_GUIDE.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,32 @@ See the [lesson template](./templates/lesson-template.md) for a more easily copy
454454
Or, check out the [project template](./templates/project-template.md) for a more easily copyable project file.
455455
~~~
456456

457+
Typically you want to ensure the link text describes the purpose of the link or where the link will redirect a user, and can often be the title of a blog article or video. You should also do your best to avoid including "this" and "here" in the link text to avoid our linter from flagging it as an error, even if the link text is descriptive. Often times "this" or "here" aren't necessary as part of the link text, and may cause some confusion despite a descriptive text ("Where's here??").
458+
459+
```markdown
460+
// Sufficient, but could be tweaked further
461+
Check out [this video on flex-grow from CoolYoutuber](...url)
462+
Go look at our [installations guide here](...url)
463+
464+
// After a slight change
465+
Check out this [video on flex-grow from CoolYoutuber](...url)
466+
Go look at our [installations guide](...url)
467+
```
468+
469+
Additionally, if there are multiple links in a lesson that redirect to the same `href`, the link text for each link must be the same. For example:
470+
471+
```markdown
472+
// Not great :(
473+
Go to [Google](www.google.com)
474+
Try [searching on Google](www.google.com)
475+
First go to the [Google homepage](www.google.com)
476+
477+
// Better! :)
478+
Go to [Google](www.google.com)
479+
Try searching on [Google](www.google.com)
480+
First go to the [Google](www.google.com) homepage
481+
```
482+
457483
### Don't scatter links throughout lessons
458484

459485
Links to required reading should not be scattered throughout a lesson, and should instead be placed in either the `### Assignment` or `### Additional resources` section. Links that refer a user to a previous lesson as a refresher, or a link to a Wikipedia page that offers a definition/explanation of a term are fine to place outside of these two sections.

0 commit comments

Comments
 (0)