Skip to content
代码片段 群组 项目
未验证 提交 8d8c38b7 编辑于 作者: Suzanne Selhorn's avatar Suzanne Selhorn 提交者: GitLab
浏览文件

Merge branch 'sarahgerman-master-patch-d429' into 'master'

Update references to docs global nav file

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/183069



Merged-by: default avatarSuzanne Selhorn <sselhorn@gitlab.com>
Approved-by: default avatarSuzanne Selhorn <sselhorn@gitlab.com>
Reviewed-by: default avatarSarah German <sgerman@gitlab.com>
Co-authored-by: default avatarSarah German <sgerman@gitlab.com>
No related branches found
No related tags found
2 合并请求!3031Merge per-main-jh to main-jh by luzhiyuan,!3030Merge per-main-jh to main-jh
...@@ -80,8 +80,8 @@ left side of the documentation website). To do so, open a second MR, against the ...@@ -80,8 +80,8 @@ left side of the documentation website). To do so, open a second MR, against the
[GitLab documentation repository](https://gitlab.com/gitlab-org/technical-writing/docs-gitlab-com/). [GitLab documentation repository](https://gitlab.com/gitlab-org/technical-writing/docs-gitlab-com/).
The global navigation is set in the The global navigation is set in the
[`navigation.yaml`](https://gitlab.com/gitlab-org/technical-writing/docs-gitlab-com/-/blob/main/data/navigation.yaml) file, [`navigation.yaml`](https://gitlab.com/gitlab-org/technical-writing/docs-gitlab-com/-/blob/main/data/en-us/navigation.yaml) file,
in the `content/data` subdirectory. You can find the GraphQL section under the in the `content/data/en-us` subdirectory. You can find the GraphQL section under the
following line: following line:
```yaml ```yaml
......
...@@ -84,7 +84,7 @@ See the Google [Best practices for creating quality meta descriptions](https://d ...@@ -84,7 +84,7 @@ See the Google [Best practices for creating quality meta descriptions](https://d
## Avoid pages being added to global navigation ## Avoid pages being added to global navigation
If a specific page shouldn't be added to the global navigation (have an entry added to If a specific page shouldn't be added to the global navigation (have an entry added to
[`navigation.yaml`](https://gitlab.com/gitlab-org/technical-writing/docs-gitlab-com/-/blob/main/data/navigation.yaml), add [`navigation.yaml`](https://gitlab.com/gitlab-org/technical-writing/docs-gitlab-com/-/blob/main/data/en-us/navigation.yaml), add
the following to the page's metadata: the following to the page's metadata:
```yaml ```yaml
......
...@@ -36,7 +36,7 @@ In the Markdown doc for a resource (AKA endpoint): ...@@ -36,7 +36,7 @@ In the Markdown doc for a resource (AKA endpoint):
description also has both offering and tier, combine them. For description also has both offering and tier, combine them. For
example: _GitLab Self-Managed, Premium and Ultimate only._ example: _GitLab Self-Managed, Premium and Ultimate only._
After a new API documentation page is added, [add an entry in the global navigation](site_architecture/global_nav.md#add-a-navigation-entry). [Examples](https://gitlab.com/gitlab-org/technical-writing/docs-gitlab-com/-/commits/main/data/navigation.yaml). After a new API documentation page is added, [add an entry in the global navigation](site_architecture/global_nav.md#add-a-navigation-entry). [Examples](https://gitlab.com/gitlab-org/technical-writing/docs-gitlab-com/-/commits/main/data/en-us/navigation.yaml).
## API topic template ## API topic template
......
...@@ -40,7 +40,7 @@ as helpful as **Get started with runners**. ...@@ -40,7 +40,7 @@ as helpful as **Get started with runners**.
## Add a navigation entry ## Add a navigation entry
The global nav is stored in the `gitlab-org/technical-writing/docs-gitlab-com` project, in the The global nav is stored in the `gitlab-org/technical-writing/docs-gitlab-com` project, in the
`data/navigation.yaml` file. The documentation website at `docs.gitlab.com` is built using Hugo and assembles documentation `data/en-us/navigation.yaml` file. The documentation website at `docs.gitlab.com` is built using Hugo and assembles documentation
content from several projects (including `charts`, `gitlab`, `gitlab-runner`, and `omnibus-gitlab`). content from several projects (including `charts`, `gitlab`, `gitlab-runner`, and `omnibus-gitlab`).
**Do not** add items to the global nav without **Do not** add items to the global nav without
...@@ -48,7 +48,7 @@ the consent of one of the technical writers. ...@@ -48,7 +48,7 @@ the consent of one of the technical writers.
To add a topic to the global navigation: To add a topic to the global navigation:
1. In the [`navigation.yaml`](https://gitlab.com/gitlab-org/technical-writing/docs-gitlab-com/-/blob/main/data/navigation.yaml) 1. In the [`navigation.yaml`](https://gitlab.com/gitlab-org/technical-writing/docs-gitlab-com/-/blob/main/data/en-us/navigation.yaml)
file, add the item. file, add the item.
1. Assign the MR to a technical writer for review and merge. 1. Assign the MR to a technical writer for review and merge.
...@@ -90,7 +90,6 @@ mechanics of what is required is [documented below](#data-file) but, in principl ...@@ -90,7 +90,6 @@ mechanics of what is required is [documented below](#data-file) but, in principl
Exclude these pages from the global nav: Exclude these pages from the global nav:
- Legal notices. - Legal notices.
- Pages in the `architecture/blueprints` directory.
- Pages in the `user/application_security/dast/checks/` directory. - Pages in the `user/application_security/dast/checks/` directory.
The following pages should probably be in the global nav, but the technical writers The following pages should probably be in the global nav, but the technical writers
...@@ -106,18 +105,6 @@ All other pages should be in the global nav. ...@@ -106,18 +105,6 @@ All other pages should be in the global nav.
The technical writing team runs a report to determine which pages are not in the nav. The technical writing team runs a report to determine which pages are not in the nav.
The team reviews this list each month. The team reviews this list each month.
## Navigation structure
The global nav has five levels:
- Section
- Category
- Doc
- Doc
- Doc
You can view this structure in the [`navigation.yml`](https://gitlab.com/gitlab-org/technical-writing/docs-gitlab-com/-/blob/main/data/navigation.yaml?ref_type=heads) file.
### Use GitLab section ### Use GitLab section
In addition to feature documentation, each category in the **Use GitLab** section should contain: In addition to feature documentation, each category in the **Use GitLab** section should contain:
...@@ -148,7 +135,7 @@ The layout organizes the data among the nav in containers properly [styled](#css ...@@ -148,7 +135,7 @@ The layout organizes the data among the nav in containers properly [styled](#css
### Data file ### Data file
The data file describes the structure of the navigation for the applicable project. The data file describes the structure of the navigation for the applicable project.
It is stored at <https://gitlab.com/gitlab-org/technical-writing/docs-gitlab-com/-/blob/main/data/navigation.yaml>. It is stored at <https://gitlab.com/gitlab-org/technical-writing/docs-gitlab-com/-/blob/main/data/en-us/navigation.yaml>.
Each entry comprises of three main components: Each entry comprises of three main components:
...@@ -187,7 +174,7 @@ For all components, **respect the indentation** and the following syntax rules. ...@@ -187,7 +174,7 @@ For all components, **respect the indentation** and the following syntax rules.
- Use sentence case, capitalizing feature names. - Use sentence case, capitalizing feature names.
- There's no need to wrap the titles, unless there's a special character in it. For example, - There's no need to wrap the titles, unless there's a special character in it. For example,
in `GitLab CI/CD`, there's a `/` present, therefore, it must be wrapped in quotes. in `GitLab CI/CD`, there's a `/` present, therefore, it must be wrapped in quotes.
As convention, wrap the titles in double quotes: `category_title: "GitLab CI/CD"`. As convention, wrap the titles in double quotes: `title: "GitLab CI/CD"`.
##### URLs ##### URLs
...@@ -198,8 +185,7 @@ URLs must be relative. In addition: ...@@ -198,8 +185,7 @@ URLs must be relative. In addition:
- Match the path you see on the website. - Match the path you see on the website.
- As convention, always wrap URLs in single quotes `'url'`. - As convention, always wrap URLs in single quotes `'url'`.
To find the global nav link, from the full URL remove `https://docs.gitlab.com/`. To find the global nav link, from the full URL remove `https://docs.gitlab.com/`.
- Do not link to external URLs. We don't have link checking for external URLs, and - Do not link to external URLs. Leaving the documentation site by clicking the left navigation is a confusing user experience.
leaving the documentation site by clicking the left navigation is a confusing user experience.
Examples of relative URLs: Examples of relative URLs:
...@@ -230,14 +216,9 @@ The [global nav URL](#urls) has a different prefix depending on the documentatio ...@@ -230,14 +216,9 @@ The [global nav URL](#urls) has a different prefix depending on the documentatio
### CSS classes ### CSS classes
The nav is styled in the general `stylesheet.scss`. To change The nav is styled in the general `main.css` file. To change
its styles, keep them grouped for better development among the team. its styles, keep them grouped for better development among the team.
The URL components have their unique styles set by the CSS classes `.level-0`,
`.level-1`, and `.level-2`. To adjust the link's font size, padding, color, etc,
use these classes. This way we guarantee that the rules for each link do not conflict
with other rules in the stylesheets.
## Testing ## Testing
We run various checks on `navigation.yaml` in [`check-navigation.sh`](https://gitlab.com/gitlab-org/technical-writing/docs-gitlab-com/main/scripts/check-navigation.sh), We run various checks on `navigation.yaml` in [`check-navigation.sh`](https://gitlab.com/gitlab-org/technical-writing/docs-gitlab-com/main/scripts/check-navigation.sh),
......
...@@ -135,7 +135,7 @@ To remove a page: ...@@ -135,7 +135,7 @@ To remove a page:
Use [feature X](link-to-docs.md) instead. Use [feature X](link-to-docs.md) instead.
``` ```
1. Edit the [`navigation.yaml`](https://gitlab.com/gitlab-org/technical-writing/docs-gitlab-com/-/blob/main/data/navigation.yaml) in `docs-gitlab-com` 1. Edit the [`navigation.yaml`](https://gitlab.com/gitlab-org/technical-writing/docs-gitlab-com/-/blob/main/data/en-us/navigation.yaml) in `docs-gitlab-com`
to remove the page's entry from the global navigation. to remove the page's entry from the global navigation.
1. Search the [Deprecations and Removals](../../../update/deprecations.md) page for 1. Search the [Deprecations and Removals](../../../update/deprecations.md) page for
links to the removed page. The links use full URLs like: `https://docs.gitlab.com/user/deprecated_page/`. links to the removed page. The links use full URLs like: `https://docs.gitlab.com/user/deprecated_page/`.
......
...@@ -460,7 +460,7 @@ Add documentation for the integration: ...@@ -460,7 +460,7 @@ Add documentation for the integration:
- Add a page in `doc/user/project/integrations`. - Add a page in `doc/user/project/integrations`.
- Link it from the [Integrations overview](../../user/project/integrations/_index.md). - Link it from the [Integrations overview](../../user/project/integrations/_index.md).
- After the documentation has merged, [add an entry](../documentation/site_architecture/global_nav.md#add-a-navigation-entry) - After the documentation has merged, [add an entry](../documentation/site_architecture/global_nav.md#add-a-navigation-entry)
to the documentation navigation under [Integrations](https://gitlab.com/gitlab-org/technical-writing/docs-gitlab-com/-/blob/main/data/navigation.yaml?ref_type=heads#L2936). to the documentation navigation under [Integrations](https://gitlab.com/gitlab-org/technical-writing/docs-gitlab-com/-/blob/main/data/en-us/navigation.yaml?ref_type=heads#L2936).
You can also refer to our general [documentation guidelines](../documentation/_index.md). You can also refer to our general [documentation guidelines](../documentation/_index.md).
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册