Docs: document new redirect for Disqus comments
This commit is contained in:
parent
547b458e25
commit
228ff2c979
3 changed files with 55 additions and 5 deletions
|
@ -11,4 +11,6 @@ See the guidelines: http://docs.gitlab.com/ce/development/doc_styleguide.html#ch
|
|||
- [ ] Make sure the old link is not removed and has its contents replaced with a link to the new location.
|
||||
- [ ] Make sure internal links pointing to the document in question are not broken.
|
||||
- [ ] Search and replace any links referring to old docs in GitLab Rails app, specifically under the `app/views/` directory.
|
||||
- [ ] Make sure to add [`redirect_from`](https://docs.gitlab.com/ee/development/doc_styleguide.html#redirections-for-pages-with-disqus-comments) to the new document if there are any Disqus comments on the old document thread.
|
||||
- [ ] If working on CE, submit an MR to EE with the changes as well.
|
||||
- [ ] Ping one of the technical writers for review.
|
||||
|
|
|
@ -34,7 +34,6 @@ The table below shows what kind of documentation goes where.
|
|||
| `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) |
|
||||
| `doc/articles/` | [Technical Articles](writing_documentation.md#technical-articles): user guides, admin guides, technical overviews, tutorials (`doc/articles/article-title/index.md`). |
|
||||
|
||||
---
|
||||
|
||||
|
@ -67,11 +66,10 @@ The table below shows what kind of documentation goes where.
|
|||
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. For technical articles, place their images under `doc/articles/article-title/img/`.
|
||||
|
||||
---
|
||||
|
||||
If you are unsure where a document should live, you can ping `@axil` in your
|
||||
If you are unsure where a document should live, you can ping `@axil` or `@marcia` in your
|
||||
merge request.
|
||||
|
||||
## Text
|
||||
|
@ -108,8 +106,8 @@ merge request.
|
|||
- Avoid adding things that show ephemeral statuses. For example, if a feature is
|
||||
considered beta or experimental, put this info in a note, not in the heading.
|
||||
- When introducing a new document, be careful for the headings to be
|
||||
grammatically and syntactically correct. It is advised to mention one or all
|
||||
of the following GitLab members for a review: `@axil`, `@rspeicher`, `@marcia`.
|
||||
grammatically and syntactically correct. Mention one or all
|
||||
of the following GitLab members for a review: `@axil` or `@marcia`.
|
||||
This is to ensure that no document with wrong heading is going
|
||||
live without an audit, thus preventing dead links and redirection issues when
|
||||
corrected
|
||||
|
@ -330,6 +328,10 @@ For example, if you were to move `doc/workflow/lfs/lfs_administration.md` to
|
|||
git grep -n "lfs/lfs_administration"
|
||||
```
|
||||
|
||||
NOTE: **Note:**
|
||||
If the document being moved has any Disqus comments on it, there are extra steps
|
||||
to follow documented just [below](#redirections-for-pages-with-disqus-comments).
|
||||
|
||||
Things to note:
|
||||
|
||||
- Since we also use inline documentation, except for the documentation itself,
|
||||
|
@ -342,6 +344,32 @@ Things to note:
|
|||
documentation, sometimes it might be useful to search a path deeper.
|
||||
- The `*.md` extension is not used when a document is linked to GitLab's
|
||||
built-in help page, that's why we omit it in `git grep`.
|
||||
- Use the checklist on the documentation MR description template.
|
||||
|
||||
### Redirections for pages with Disqus comments
|
||||
|
||||
If the documentation page being relocated already has any Disqus comments,
|
||||
we need to preserve the Disqus thread.
|
||||
|
||||
Disqus uses an identifier per page, and for docs.gitlab.com, the page identifier
|
||||
is configured to be the page URL. Therefore, when we change the document location,
|
||||
we need to preserve the old URL as the same Disqus identifier.
|
||||
|
||||
To do that, add to the frontmatter the variable `redirect_from`,
|
||||
using the old URL as value. For example, let's say I moved the document
|
||||
available under `https://docs.gitlab.com/my-old-location/README.html` to a new location,
|
||||
`https://docs.gitlab.com/my-new-location/index.html`.
|
||||
|
||||
Into the **new document** frontmatter add the following:
|
||||
|
||||
```yaml
|
||||
---
|
||||
redirect_from: 'https://docs.gitlab.com/my-old-location/README.html'
|
||||
---
|
||||
```
|
||||
|
||||
Note: it is necessary to include the file name in the `redirect_from` URL,
|
||||
even if it's `index.html` or `README.html`.
|
||||
|
||||
## Configuration documentation for source and Omnibus installations
|
||||
|
||||
|
|
|
@ -25,6 +25,26 @@ them to review it for you.
|
|||
We use the [monthly release blog post](https://about.gitlab.com/handbook/marketing/blog/release-posts/#monthly-releases) as a changelog checklist to ensure everything
|
||||
is documented.
|
||||
|
||||
Whenever you submit a merge request for the documentation, use the documentation MR description template.
|
||||
|
||||
### Documentation directory structure
|
||||
|
||||
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).
|
||||
|
||||
To learn where to place a new document, check the [documentation style guide](doc_styleguide.md#location-and-naming-of-documents).
|
||||
|
||||
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. Every new document should be cross-linked to its related documentation, and linked from its topic-related index, when existent.
|
||||
|
||||
The directories `/workflow/`, `/gitlab-basics/`, `/university/`, and `/articles/` have
|
||||
been deprecated and the majority their docs have been moved to their correct location
|
||||
in small iterations. Please don't create new docs in these folders.
|
||||
|
||||
To move a document from its location to another directory, read the section
|
||||
[changing document location](doc_styleguide.md#changing-document-location) of the doc style guide.
|
||||
|
||||
### Feature overview and use cases
|
||||
|
||||
Every major feature (regardless if present in GitLab Community or Enterprise editions)
|
||||
|
|
Loading…
Reference in a new issue