diff --git a/doc/.vale/gitlab_docs/ReferenceLinks.yml b/doc/.vale/gitlab_docs/ReferenceLinks.yml index a4697b8e9246314dcab8362bac4289b1fc219908..b55e02a90b3f7d5fd7ab7a5f87945b38e9a5a077 100644 --- a/doc/.vale/gitlab_docs/ReferenceLinks.yml +++ b/doc/.vale/gitlab_docs/ReferenceLinks.yml @@ -6,7 +6,7 @@ # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence message: "Put this link inline with the rest of the text." -link: https://docs.gitlab.com/ee/development/documentation/styleguide/#links +link: https://docs.gitlab.com/ee/development/documentation/styleguide/#inline-links vocab: false level: error nonword: true diff --git a/doc/development/documentation/styleguide/_index.md b/doc/development/documentation/styleguide/_index.md index a35114a4a8625c2cef41b7d7fa3972eae32f3581..9266281bf3f83f3fc2b8ff9f2bb886e324c344a8 100644 --- a/doc/development/documentation/styleguide/_index.md +++ b/doc/development/documentation/styleguide/_index.md @@ -847,6 +847,26 @@ However, you should avoid putting too many links on any page. Too many links can - Consider using [Related topics](../topic_types/_index.md#related-topics) to reduce links that interrupt the flow of a task. - Try to avoid anchor links to sections on the same page. Let users rely on the right navigation instead. +### Inline links + +Use inline links instead of reference links. Inline links are easier to parse +and edit. +([Vale](../testing/vale.md) rule: [`ReferenceLinks.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab_docs/ReferenceLinks.yml)) + +- Do: + + ```markdown + For more information, see [merge requests](path/to/merge_requests.md) + ``` + +- Don't: + + ```markdown + For more information, see [merge requests][1]. + + [1]: path/to/merge_requests.md + ``` + ### Links in the same repository To link to another documentation (`.md`) file in the same repository: