Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f1168386
Commit
f1168386
authored
Jul 02, 2019
by
Marcia Ramos
Committed by
Achilleas Pipinellis
Jul 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs: update global nav document
parent
6d867cad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
21 deletions
+13
-21
doc/development/documentation/site_architecture/global_nav.md
...development/documentation/site_architecture/global_nav.md
+13
-21
No files found.
doc/development/documentation/site_architecture/global_nav.md
View file @
f1168386
...
@@ -4,8 +4,9 @@ description: "Learn how GitLab docs' global navigation works and how to add new
...
@@ -4,8 +4,9 @@ description: "Learn how GitLab docs' global navigation works and how to add new
# Global navigation
# Global navigation
> [Introduced](https://gitlab.com/gitlab-com/gitlab-docs/merge_requests/362)
> - [Introduced](https://gitlab.com/gitlab-com/gitlab-docs/merge_requests/362)
in November 2018 for GitLab 11.6.
in GitLab 11.6.
> - [Updated](https://gitlab.com/gitlab-com/gitlab-docs/merge_requests/482) in GitLab 12.1.
The global nav adds to the left sidebar the ability to
The global nav adds to the left sidebar the ability to
navigate and explore the contents of GitLab's documentation.
navigate and explore the contents of GitLab's documentation.
...
@@ -217,13 +218,13 @@ and the following syntax rules.
...
@@ -217,13 +218,13 @@ and the following syntax rules.
-
Always use relative paths against the home of CE and EE. Examples:
-
Always use relative paths against the home of CE and EE. Examples:
-
For
`https://docs.gitlab.com/ee/README.html`
, the relative URL is
`README.html`
.
-
For
`https://docs.gitlab.com/ee/README.html`
, the relative URL is
`README.html`
.
-
For
`https://docs.gitlab.com/ee/user/project/cycle_analytics.html`
, the relative
-
For
`https://docs.gitlab.com/ee/user/project/cycle_analytics.html`
, the relative
URL is
`user/project/cycle_analytics.html`
URL is
`user/project/cycle_analytics.html`
.
-
For
`README.html`
files, add the complete path
`path/to/README.html`
.
-
For
`README.html`
files, add the complete path
`path/to/README.html`
.
-
For
`index.html`
files, use the clean (canonical) URL:
`path/to/`
.
-
For
`index.html`
files, use the clean (canonical) URL:
`path/to/`
.
-
For EE-only docs, use the same relative path, but add the attribute
`ee_only: true`
below
-
For EE-only docs, use the same relative path, but add the attribute
`ee_only: true`
below
the
`doc_url`
or
`category_url`
, as explained above. This
will guarantee that when
the
`doc_url`
or
`category_url`
, as explained above. This
displays
the user is looking at the CE docs, it will link to the EE docs. It also display
s
an "info" icon on the nav to make the user aware that the feature i
s
an "info" icon on the CE nav to make the user aware that it's a different link
.
EE-only
.
DANGER:
**Important!**
DANGER:
**Important!**
All links present on the data file must end in
`.html`
, not
`.md`
. Do not
All links present on the data file must end in
`.html`
, not
`.md`
. Do not
...
@@ -293,7 +294,7 @@ point to `/ee/` docs.
...
@@ -293,7 +294,7 @@ point to `/ee/` docs.
On the other hand, if the user is looking at
`/ce/`
docs,
On the other hand, if the user is looking at
`/ce/`
docs,
all the links in the CE nav should link internally to
`/ce/`
all the links in the CE nav should link internally to
`/ce/`
files
, except for
[
`ee-only` docs
](
#ee-only-docs
)
.
files.
```
html
```
html
<
%
if
dir
!=
'
ce
'
%
>
<
%
if
dir
!=
'
ce
'
%
>
...
@@ -314,21 +315,12 @@ categories (`cat[:category_url]`), and docs (`doc[:doc_url]`) URLs.
...
@@ -314,21 +315,12 @@ categories (`cat[:category_url]`), and docs (`doc[:doc_url]`) URLs.
#### `ee-only` docs
#### `ee-only` docs
If the user is looking at the CE nav, a given doc is present only
Docs for features present only in GitLab EE are tagged
in
`/ee/`
, it's tagged in the data file by
`ee-only`
, linking it
in
the data file by
`ee-only`
and an icon is displayed on the nav
directly to
`/ee/`
.
link indicating that the
`ee-only`
feature is not available in CE
.
```
html
The
`ee-only`
attribute is available for
`categories`
(
`<% if cat[:ee_only] %>`
)
<
%
if
dir =
=
'
ce
'
&&
cat
[
:ee_only
]
%
>
and
`docs`
(
`<% if doc[:ee_only] %>`
), but not for
`sections`
.
<a
href=
"/ee/<%= cat[:category_url] %>"
>
...
</a>
<
%
end
%
>
```
To make it clear that it it's a different link, an icon is displayed
on the nav link indicating that the
`ee-only`
doc is not available in CE.
The
`ee-only`
attribute is available for
`categories`
(
`<% if dir == 'ce' && cat[:ee_only] %>`
)
and
`docs`
(
`<% if dir == 'ce' && doc[:ee_only] %>`
), but not for
`sections`
.
### CSS classes
### CSS classes
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment