diff options
author | Mike Lewis <mlewis@gitlab.com> | 2019-04-16 05:17:36 +0000 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2019-04-16 05:17:36 +0000 |
commit | 5051f5b3d656eb629335cfb3b177027c38cbbe66 (patch) | |
tree | c49633eb56d78c1dce3eca9e46c5abbd61e75c8b /doc/development/documentation | |
parent | 8c10e99de29f3c6f0d17ebde5af14324956dc109 (diff) | |
download | gitlab-ce-5051f5b3d656eb629335cfb3b177027c38cbbe66.tar.gz |
Development docs: move some docs content from Handbook and improve content/headings
Diffstat (limited to 'doc/development/documentation')
-rw-r--r-- | doc/development/documentation/index.md | 98 | ||||
-rw-r--r-- | doc/development/documentation/styleguide.md | 157 |
2 files changed, 132 insertions, 123 deletions
diff --git a/doc/development/documentation/index.md b/doc/development/documentation/index.md index 4a2ff64807e..3a6f4bd8ed2 100644 --- a/doc/development/documentation/index.md +++ b/doc/development/documentation/index.md @@ -16,13 +16,13 @@ In addition to this page, the following resources to help craft and contribute d - [Markdown Guide](https://about.gitlab.com/handbook/product/technical-writing/markdown-guide/) - A reference for the markdown implementation used by GitLab's documentation site and about.gitlab.com. - [Site architecture](site_architecture/index.md) - How docs.gitlab.com is built. -## Source and rendered locations +## Source files and rendered web locations Documentation for GitLab Community Edition (CE) and Enterprise Edition (EE), along with GitLab Runner and Omnibus, is published to [docs.gitlab.com](https://docs.gitlab.com). The documentation for CE and EE is also published within the application at `/help` on the domain of the GitLab instance. At `/help`, only content for your current edition and version is included, whereas multiple versions' content is available at docs.gitlab.com. -The source of the documentation is maintained in the following repository locations: +The source of the documentation exists within the codebase of each GitLab application in the following repository locations: | Project | Path | | --- | --- | @@ -48,87 +48,13 @@ as its markdown rendering engine. See the [GitLab Markdown Guide](https://about. Adhere to the [Documentation Style Guide](styleguide.md). If a style standard is missing, you are welcome to suggest one via a merge request. -## Documentation types and organization - -The documentation is structured based on the GitLab UI structure itself, -separated by [`user`](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/user), -[`administrator`](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/administration), and [`contributor`](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/development). - -Organize docs by product area and subject, not type. For example, do not create groupings of similar media types -(e.g. indexes of all articles, videos, etc.). - -Similarly, we do not use glossaries or FAQs. Such grouping of content by type makes -it difficult to browse for the information you need and difficult to maintain up-to-date content. -Instead, organize content by its subject (e.g. everything related to CI goes together) -and cross-link between any related content. - -### Location and naming of files - -Our goal is to have a clear hierarchical structure with meaningful URLs -like `docs.gitlab.com/user/project/merge_requests/`. With this pattern, -you can immediately tell that you are navigating to user-related documentation -about project features; specifically about merge requests. Our site's paths match -those of our repository, so the clear structure also makes documentation easier to update. - -In order to have a [solid site structure](https://searchengineland.com/seo-benefits-developing-solid-site-structure-277456) for our documentation, -all docs should be linked at least from its higher-level index page if not also from other relevant locations. - -The table below shows what kind of documentation goes where. - -| Directory | What belongs here | -|:----------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `doc/user/` | User related documentation. Anything that can be done within the GitLab UI goes here including `/admin`. | -| `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/`. | -| `doc/api/` | API related documentation. | -| `doc/development/` | Documentation related to the development of GitLab. Related process and style guides should go here. | -| `doc/legal/` | Legal documents about contributing to GitLab. | -| `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). | -| `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. | -| `doc/topics/` | Indexes per Topic (`doc/topics/topic-name/index.md`): all resources for that topic (user and admin documentation, articles, and third-party docs) | - -**Rules and best practices:** - -1. When you create a new directory, always start with an `index.md` file. - Do not use another file name and **do not** create `README.md` files. -1. **Do not** use special chars and spaces, or capital letters in file names, - directory names, branch names, and anything that generates a path. -1. When creating a new document and it has more than one word in its name, - make sure to use underscores instead of spaces or dashes (`-`). For example, - a proper naming would be `import_projects_from_github.md`. The same rule - applies to images. -1. For image files, do not exceed 100KB. -1. We do not yet support embedded videos. Please link out. -1. There are four main directories, `user`, `administration`, `api` and `development`. -1. The `doc/user/` directory has five main subdirectories: `project/`, `group/`, - `profile/`, `dashboard/` and `admin_area/`. - 1. `doc/user/project/` should contain all project related documentation. - 1. `doc/user/group/` should contain all group related documentation. - 1. `doc/user/profile/` should contain all profile related documentation. - Every page you would navigate under `/profile` should have its own document, - i.e. `account.md`, `applications.md`, `emails.md`, etc. - 1. `doc/user/dashboard/` should contain all dashboard related documentation. - 1. `doc/user/admin_area/` should contain all admin related documentation - describing what can be achieved by accessing GitLab's admin interface - (_not to be confused with `doc/administration` where server access is - required_). - 1. Every category under `/admin/application_settings` should have its - own document located at `doc/user/admin_area/settings/`. For example, - the **Visibility and Access Controls** category should have a document - located at `doc/user/admin_area/settings/visibility_and_access_controls.md`. -1. The `doc/topics/` directory holds topic-related technical content. Create - `doc/topics/topic-name/subtopic-name/index.md` when subtopics become necessary. - General user- and admin- related documentation, should be placed accordingly. -1. The directories `/workflow/`, `/university/`, and `/articles/` have -been **deprecated** and the majority their docs have been moved to their correct location -in small iterations. - -If you are unsure where a document or a content addition should live, this should -not stop you from authoring and contributing. You can use your best judgment and -then ask the reviewer of your MR to confirm your decision, and/or ask a technical writer -at any stage in the process. The techncial writing team will review all documentation -changes, regardless, and can move content if there is a better place for it. - -### Changing document location +## Folder structure and files + +Beyond the top-level directories under /doc, which mainly pertain to audiences (`user`, `administration`, `development`), we organize by product area and subject, not type. + +For complete details, see the [Content](styleguide.md#content) section of the [Documentation Style Guide](styleguide.md). + +## Changing document location Changing a document's location requires specific steps to be followed to ensure that users can seamlessly access the new doc page, whether they are accesing content @@ -186,7 +112,7 @@ Things to note: built-in help page, that's why we omit it in `git grep`. - Use the checklist on the "Change documentation location" MR description template. -#### Alternative redirection method +### Alternative redirection method Alternatively to the method described above, you can simply replace the content of the old file with a frontmatter containing a redirect link: @@ -204,7 +130,7 @@ This redirection method will not provide a redirect fallback on GitLab `/help`. it, make sure to add a link to the new page on the doc, otherwise it's a dead end for users that land on the doc via `/help`. -#### Redirections for pages with Disqus comments +### Redirections for pages with Disqus comments If the documentation page being relocated already has any Disqus comments, we need to preserve the Disqus thread. @@ -389,7 +315,7 @@ to merge changes that will break `master` from a merge request with a successful ## Docs site architecture See the [Docs site architecture](site_architecture/index.md) page to learn -how we build and deploy the site at [docs.gitlab.com](https://docs.gitlab.com), and +how we build and deploy the site at [docs.gitlab.com](https://docs.gitlab.com) and to review all the assets and libraries in use. ### Global navigation diff --git a/doc/development/documentation/styleguide.md b/doc/development/documentation/styleguide.md index 1cefe48b4c1..d16a8243def 100644 --- a/doc/development/documentation/styleguide.md +++ b/doc/development/documentation/styleguide.md @@ -4,64 +4,147 @@ description: 'Writing styles, markup, formatting, and other standards for GitLab # Documentation Style Guide -The documentation style guide defines the markup structure used in -GitLab documentation. Check the -[documentation guidelines](index.md) for general development instructions. +This document defines the standards for GitLab's documentation content and files. -See the GitLab handbook for the [writing style guidelines](https://about.gitlab.com/handbook/communication/#writing-style-guidelines). +For broader information about the documentation, see the [Documentation guidelines](index.md). For programmatic help adhering to the guidelines, see [linting](index.md#linting). -## Files +See the GitLab handbook for further [writing style guidelines](https://about.gitlab.com/handbook/communication/#writing-style-guidelines) +that apply to all GitLab content, not just documentation. -See the [Documentation types and organization](index.md#documentation-types-and-organization) section -on the index page for information on how to structure and name files across the GitLab documentation. - -DANGER: **Attention:** -**Do not** use capital letters, spaces, or special chars in file names, -branch names, directory names, headings, or in anything that generates a path. - -NOTE: **Note:** -**Do not** create new `README.md` files, name them `index.md` instead. There's -a test that will fail if it spots a new `README.md` file. - -### Markdown +## Content -The [documentation website](https://docs.gitlab.com) uses GitLab Kramdown as its Markdown rendering engine [as of October 2018](https://gitlab.com/gitlab-com/gitlab-docs/merge_requests/108). For a complete Kramdown reference, see the [GitLab Markdown Kramdown Guide](https://about.gitlab.com/handbook/product/technical-writing/markdown-guide/). +These guidelines help toward the goal of having every user's search of documentation +yield a useful result, and ensuring content is consistent, helpful, and easy to consume. -The [`gitlab-kramdown`](https://gitlab.com/gitlab-org/gitlab_kramdown) -gem will support all [GFM markup](../../user/markdown.md) in the future. For now, -use regular markdown markup, following the rules in the linked style guide. +### Single source of truth (SSOT) on the GitLab product -Note that Kramdown-specific markup (e.g., `{:.class}`) will not render properly in on GitLab instances in [`/help`](index.md#gitlab-help). +The documentation is the SSOT for all information related to the implementation, usage, and troubleshooting of GitLab products and features. It evolves continually, in keeping with new products and features, and with improvements for clarity, accuracy, and completeness. -## Content +This policy prevents information silos, ensuring that it remains easy to find information about GitLab products. -These guidelines help toward the goal of having every user's search of documentation -yield a useful result, and ensuring content is helpful and easy to consume. +It also informs decisions about the kinds of content we include in our documentation. -### Subject matter +### All helpful information -[The documentation is the single source of truth (SSOT)](https://about.gitlab.com/handbook/documentation/#documentation-as-single-source-of-truth-ssot) for any and all helpful information and processes needed to learn about, implement, use, and troubleshoot GitLab features. Note that this includes problem-solving actions that may address rare cases or be considered 'risky', so long as proper context is provided. See the SSOT link for more detail. +Include problem-solving actions that may address rare cases or be considered 'risky', so long as proper context is provided in the form of fully detailed warnings and caveats. This kind of content should be included as it could be helpful to others and, when properly explained, its benefits outweigh the risks. If you think you have found an exception to this rule, contact the Technical Writing team. -### Media types and sources +### All helpful media types and sources -Include any media types/sources, if relevant to readers. You can freely include or link presentations, diagrams, videos, etc.; no matter who it was originally composed for, if it is helpful to any of our audiences, we can include it. +Include any media types/sources if the content is relevant to readers. You can freely include or link presentations, diagrams, videos, etc.; no matter who it was originally composed for, if it is helpful to any of our audiences, we can include it. - If you use an image that has a separate source file (for example, a vector or diagram format), link the image to the source file so that it may be reused or updated by anyone. - Do not copy and paste content from other sources unless it is a limited quotation with the source cited. Typically it is better to either rephrase relevant information in your own words or link out to the other source. -### Structure across documents +### Markdown -- Place files in the correct directory per the [Documentation directory structure](index.md#documentation-types-and-organization) guidelines. -- To avoid duplication, do not include the same information in multiple places. Instead, choose one 'single source of truth (SSOT)' location and link from other relevant locations. -- When referencing other GitLab products and features, link to their respective docs. -- When referencing third-party products or technologies, link out to their external sites, documentation, and resources. +All GitLab documentation is written using [Markdown](https://en.wikipedia.org/wiki/Markdown). + +The [documentation website](https://docs.gitlab.com) uses GitLab Kramdown as its Markdown rendering engine. For a complete Kramdown reference, see the [GitLab Markdown Kramdown Guide](https://about.gitlab.com/handbook/product/technical-writing/markdown-guide/). + +The [`gitlab-kramdown`](https://gitlab.com/gitlab-org/gitlab_kramdown) +Ruby gem will support all [GFM markup](../../user/markdown.md) in the future. That is, +all markup that is supported for display in the GitLab application itself. For now, +use regular Markdown markup, following the rules in the linked style guide. + +Note that Kramdown-specific markup (e.g., `{:.class}`) will not render properly on GitLab instances under [`/help`](index.md#gitlab-help). + +## Structure + +### Organize by topic, not by type + +Beyond top-level audience-type folders (e.g. `administration`), we organize content by topic, not by type, so that it can be located as easily as possible within the single-source-of-truth (SSOT) section for the subject matter. + +For example, do not create groupings of similar media types (e.g. glossaries, FAQs, or sets of all articles or videos). + +Such grouping of content by type makes +it difficult to browse for the information you need and difficult to maintain up-to-date content. +Instead, organize content by its subject (e.g. everything related to CI goes together) +and cross-link between any related content. + +### Folder structure overview + +The documentation is separated by top-level audience folders [`user`](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/user), +[`administration`](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/administration), and [`development`](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/development) (contributing) folders. + +Beyond that, we primarily follow the structure of the GitLab user interface or API. + +Our goal is to have a clear hierarchical structure with meaningful URLs +like `docs.gitlab.com/user/project/merge_requests/`. With this pattern, +you can immediately tell that you are navigating to user-related documentation +about Project features; specifically about Merge Requests. Our site's paths match +those of our repository, so the clear structure also makes documentation easier to update. + +The table below shows what kind of documentation goes where. + +| Directory | What belongs here | +|:----------------------|:---------------------------------------------------------------------------------------------------------------------------------| +| `doc/user/` | User related documentation. Anything that can be done within the GitLab UI goes here, including usage of the `/admin` interface. | +| `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 exist under `doc/user/admin_area/`. | +| `doc/api/` | API related documentation. | +| `doc/development/` | Documentation related to the development of GitLab, whether contributing code or docs. Related process and style guides should go here. | +| `doc/legal/` | Legal documents about contributing to GitLab. | +| `doc/install/` | Contains instructions for installing GitLab. | +| `doc/update/` | Contains instructions for updating GitLab. | +| `doc/topics/` | Indexes per topic (`doc/topics/topic-name/index.md`): all resources for that topic. | + +### Working with directories and files + +1. When you create a new directory, always start with an `index.md` file. + Do not use another file name and **do not** create `README.md` files. +1. **Do not** use special characters and spaces, or capital letters in file names, + directory names, branch names, and anything that generates a path. +1. When creating a new document and it has more than one word in its name, + make sure to use underscores instead of spaces or dashes (`-`). For example, + a proper naming would be `import_projects_from_github.md`. The same rule + applies to images. +1. For image files, do not exceed 100KB. +1. We do not yet support embedded videos. Please link out. +1. There are four main directories, `user`, `administration`, `api` and `development`. +1. The `doc/user/` directory has five main subdirectories: `project/`, `group/`, + `profile/`, `dashboard/` and `admin_area/`. + 1. `doc/user/project/` should contain all project related documentation. + 1. `doc/user/group/` should contain all group related documentation. + 1. `doc/user/profile/` should contain all profile related documentation. + Every page you would navigate under `/profile` should have its own document, + i.e. `account.md`, `applications.md`, `emails.md`, etc. + 1. `doc/user/dashboard/` should contain all dashboard related documentation. + 1. `doc/user/admin_area/` should contain all admin related documentation + describing what can be achieved by accessing GitLab's admin interface + (_not to be confused with `doc/administration` where server access is + required_). + 1. Every category under `/admin/application_settings` should have its + own document located at `doc/user/admin_area/settings/`. For example, + the **Visibility and Access Controls** category should have a document + located at `doc/user/admin_area/settings/visibility_and_access_controls.md`. +1. The `doc/topics/` directory holds topic-related technical content. Create + `doc/topics/topic-name/subtopic-name/index.md` when subtopics become necessary. + General user- and admin- related documentation, should be placed accordingly. +1. The directories `/workflow/`, `/university/`, and `/articles/` have +been **deprecated** and the majority their docs have been moved to their correct location +in small iterations. + +If you are unsure where a document or a content addition should live, this should +not stop you from authoring and contributing. You can use your best judgment and +then ask the reviewer of your MR to confirm your decision, and/or ask a technical writer +at any stage in the process. The techncial writing team will review all documentation +changes, regardless, and can move content if there is a better place for it. + +### Avoid duplication + +Do not include the same information in multiple places. Instead, choose one single-source-of-truth location and link from other relevant locations. + +### References across documents + +- Give each folder an index.md page that introduces the topic, introduces the pages within, and links to the pages within (including to the index pages of any next-level subpaths). +- To ensure discoverability, ensure each new or renamed doc is linked from its higher-level index page and other related pages. +- When making reference to other GitLab products and features, link to their respective docs, at least on first mention. +- When making reference to third-party products or technologies, link out to their external sites, documentation, and resources. ### Structure within documents -- Include any and all applicable subsections as described on the [structure and template](structure.md) page, -- To ensure discoverability, link to each doc from its higher-level index page and other related pages. +- Include any and all applicable subsections as described on the [structure and template](structure.md) page. - Structure content in alphabetical order in tables, lists, etc., unless there is a logical reason not to (for example, when mirroring the UI or an otherwise ordered sequence). @@ -95,7 +178,7 @@ Include any media types/sources, if relevant to readers. You can freely include - List item 2 ``` -### Tables overlapping the ToC +### Tables overlapping the TOC By default, all tables have a width of 100% on docs.gitlab.com. In a few cases, the table will overlap the table of contents (ToC). |