Skip to content

Commit 9103023

Browse files
committed
Merge branch 'doc-location-guidelines' into 'master'
Add doc guidelines on documents naming and location ## What does this MR do? Add guidelines on the structure of the documentation. ## What are the relevant issue numbers? https://gitlab.com/gitlab-org/gitlab-ce/issues/3349 See merge request !5641
2 parents a79ff43 + ff44079 commit 9103023

File tree

1 file changed

+60
-5
lines changed

1 file changed

+60
-5
lines changed

doc/development/doc_styleguide.md

+60-5
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,64 @@
33
This styleguide recommends best practices to improve documentation and to keep
44
it organized and easy to find.
55

6-
## Naming
6+
## Location and naming of documents
77

8-
- When creating a new document and it has more than one word in its name,
9-
make sure to use underscores instead of spaces or dashes (`-`). For example,
10-
a proper naming would be `import_projects_from_github.md`. The same rule
11-
applies to images.
8+
>**Note:**
9+
These guidelines derive from the discussion taken place in issue [#3349](ce-3349).
10+
11+
The documentation hierarchy can be vastly improved by providing a better layout
12+
and organization of directories.
13+
14+
Having a structured document layout, we will be able to have meaningful URLs
15+
like `docs.gitlab.com/user/project/merge_requests.html`. With this pattern,
16+
you can immediately tell that you are navigating a user related documentation
17+
and is about the project and its merge requests.
18+
19+
The table below shows what kind of documentation goes where.
20+
21+
| Directory | What belongs here |
22+
| --------- | -------------- |
23+
| `doc/user/` | User related documentation. Anything that can be done within the GitLab UI goes here including `/admin`. |
24+
| `doc/administration/` | Documentation that requires the user to have access to the server where GitLab is installed. The admin settings that can be accessed via GitLab's interface go under `doc/user/admin_area/`. |
25+
| `doc/api/` | API related documentation. |
26+
| `doc/development/` | Documentation related to the development of GitLab. Any styleguides should go here. |
27+
| `doc/legal/` | Legal documents about contributing to GitLab. |
28+
| `doc/install/`| Probably the most visited directory, since `installation.md` is there. Ideally this should go under `doc/administration/`, but it's best to leave it as-is in order to avoid confusion (still debated though). |
29+
| `doc/update/` | Same with `doc/install/`. Should be under `administration/`, but this is a well known location, better leave as-is, at least for now. |
30+
31+
---
32+
33+
**General rules:**
34+
35+
1. The correct naming and location of a new document, is a combination
36+
of the relative URL of the document in question and the GitLab Map design
37+
that is used for UX purposes ([source][graffle], [image][gitlab-map]).
38+
1. When creating a new document and it has more than one word in its name,
39+
make sure to use underscores instead of spaces or dashes (`-`). For example,
40+
a proper naming would be `import_projects_from_github.md`. The same rule
41+
applies to images.
42+
1. There are four main directories, `user`, `administration`, `api` and `development`.
43+
1. The `doc/user/` directory has five main subdirectories: `project/`, `group/`,
44+
`profile/`, `dashboard/` and `admin_area/`.
45+
1. `doc/user/project/` should contain all project related documentation.
46+
1. `doc/user/group/` should contain all group related documentation.
47+
1. `doc/user/profile/` should contain all profile related documentation.
48+
Every page you would navigate under `/profile` should have its own document,
49+
i.e. `account.md`, `applications.md`, `emails.md`, etc.
50+
1. `doc/user/dashboard/` should contain all dashboard related documentation.
51+
1. `doc/user/admin_area/` should contain all admin related documentation
52+
describing what can be achieved by accessing GitLab's admin interface
53+
(_not to be confused with `doc/administration` where server access is
54+
required_).
55+
1. Every category under `/admin/application_settings` should have its
56+
own document located at `doc/user/admin_area/settings/`. For example,
57+
the **Visibility and Access Controls** category should have a document
58+
located at `doc/user/admin_area/settings/visibility_and_access_controls.md`.
59+
60+
---
61+
62+
If you are unsure where a document should live, you can ping `@axil` in your
63+
merge request.
1264

1365
## Text
1466

@@ -372,3 +424,6 @@ curl -X PUT -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" -d "domain_whitelist[]=*.ex
372424
[single spaces]: http://www.slate.com/articles/technology/technology/2011/01/space_invaders.html
373425
[gfm]: http://docs.gitlab.com/ce/markdown/markdown.html#newlines "GitLab flavored markdown documentation"
374426
[doc-restart]: ../administration/restart_gitlab.md "GitLab restart documentation"
427+
[ce-3349]: https://gitlab.com/gitlab-org/gitlab-ce/issues/3349 "Documentation restructure"
428+
[graffle]: https://gitlab.com/gitlab-org/gitlab-design/blob/d8d39f4a87b90fb9ae89ca12dc565347b4900d5e/production/resources/gitlab-map.graffle
429+
[gitlab-map]: https://gitlab.com/gitlab-org/gitlab-design/raw/master/production/resources/gitlab-map.png

0 commit comments

Comments
 (0)