diff options
author | Sarah German <sgerman@gitlab.com> | 2022-10-04 23:25:35 +0300 |
---|---|---|
committer | Sarah German <sgerman@gitlab.com> | 2022-10-04 23:25:35 +0300 |
commit | 97755ec846ddd70e4dfab7ee2b56cb9feefb2f3c (patch) | |
tree | b237cae793577cca41847f207ecd8750811f8362 | |
parent | b16c762757c462214cae0c5abc9cecd1acc1e805 (diff) | |
parent | 5613892e84169aa0220d4f557535392473a07040 (diff) |
Merge branch 'sarahg/new-product-docs' into 'main'
Update documentation for adding new products to the docs site
See merge request https://gitlab.com/gitlab-org/gitlab-docs/-/merge_requests/3153
Merged-by: Sarah German <sgerman@gitlab.com>
Co-authored-by: Achilleas Pipinellis <axil@gitlab.com>
-rw-r--r-- | doc/architecture.md | 32 | ||||
-rw-r--r-- | doc/development.md | 22 |
2 files changed, 16 insertions, 38 deletions
diff --git a/doc/architecture.md b/doc/architecture.md index fde04405..53dca326 100644 --- a/doc/architecture.md +++ b/doc/architecture.md @@ -145,38 +145,6 @@ To build and deploy the site immediately (must have the Maintainer role): Read more about [documentation deployments](https://docs.gitlab.com/ee/development/documentation/site_architecture/deployment_process.html). -## Using YAML data files - -The easiest way to achieve something similar to -[Jekyll's data files](https://jekyllrb.com/docs/datafiles/) in Nanoc is by -using the [`@items`](https://nanoc.app/doc/reference/variables/#items-and-layouts) -variable. - -The data file must be placed inside the `content/` directory and then it can -be referenced in an ERB template. - -Suppose we have the `content/_data/versions.yaml` file with the content: - -```yaml -versions: - - 10.6 - - 10.5 - - 10.4 -``` - -We can then loop over the `versions` array with something like: - -```erb -<% @items['/_data/versions.yaml'][:versions].each do | version | %> - -<h3><%= version %></h3> - -<% end &> -``` - -Note that the data file must have the `yaml` extension (not `yml`) and that -we reference the array with a symbol (`:versions`). - ## Archived documentation banner A banner is displayed on archived documentation pages with the text `This is archived documentation for diff --git a/doc/development.md b/doc/development.md index 03cbf446..fb6e8b6f 100644 --- a/doc/development.md +++ b/doc/development.md @@ -207,17 +207,27 @@ To add an additional set of product documentation to <https://docs.gitlab.com> f that takes care of that. Otherwise, if the product doesn't have a stable branch at all, you can omit this and the default branch will be always pulled. -1. Edit [`.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab-docs/-/blob/68814c875e322b1871d6368135af49794041ddd1/.gitlab-ci.yml#L30-34) and set the default branch variable for the new product. For example: +1. Edit ['lib/edit_on_gitlab.rb'](../lib/edit_on_gitlab.rb) and add the product and its attributes to the `PRODUCT_REPOS` object, then add 1-2 test cases in [`spec/lib/helpers/edit_on_gitlab_spec.rb`](../spec/lib/helpers/edit_on_gitlab_spec.rb). - ```yaml - variables: - BRANCH_PRODUCT: main - ``` +1. Edit [`.test.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/.gitlab/ci/test.gitlab-ci.yml) and add the new product to the following tests, following the same pattern as existing products: + +- `test_global_nav_links` +- `test_EOL_whitespace` +- `test_unlinked_images` -1. Edit the [`Rakefile`](https://gitlab.com/gitlab-org/gitlab-docs/-/blob/68814c875e322b1871d6368135af49794041ddd1/Rakefile#L107-113) and add a line to replace the product's branch variable. If the product doesn't have a stable branch process, omit this step to use the product's default branch. 1. Edit [`scripts/normalize-links.sh`](https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/scripts/normalize-links.sh) and add the new product to the `Relative URLs` and `Full URLs` sections. +1. Edit the ['Makefile'](../Makefile): + + - Add a command to clone the repository, and add it to `clone-all-docs-projects` (see `../gitlab-operator/.git` as an example). + - Add a command to update the repository, and add it to `update-all-docs-projects` (see `update-gitlab-operator`) as an example). + +1. Update `gitlab-docs` documentation: + + - Add the new product to the list in [`doc/index.md`](../doc/index.md). + - Add the new product to the diagram in [`doc/architecture.md`](../doc/architecture.md). + ## Exclude a directory To exclude a directory so the contents aren't published to the docs site: |