Add Hugo build tests to docs content pipelines
Docs content pipelines need to run a Hugo build as a test to validate shortcodes.
We also need to test file naming. The move to Hugo, and dropping the ee
prefix for GitLab project paths, introduces a few potential problems caused by filenames:
-
Index pages should be named
_index.md
rather than the standardindex.md
. Missing the underscore will cause sub-pages in this directory to not be built by Hugo (see https://gohugo.io/content-management/page-bundles/).- Possible solution: Add a check, probably in the
lint-doc.sh
script in the gitlab project, to make sure index files have the leading underscore.
- Possible solution: Add a check, probably in the
-
The
gitlab
project must not include top-level directories with the same names as the other projects (runner
,charts
, etc). Otherwise thegitlab
page will be built, but not the page for the other project.Possible solution: include the--printPathWarnings --panicOnWarning
flags on the Hugo build- Test for this in gitlab-org/gitlab!180801 (merged)
-
Update projects to use the markdownlint image from the
docs-gitlab-com
project.
Done when
-
We have a Hugo build running as a test job on source content pipelines, configured to detect path warnings. - Operator
- Charts
- Omnibus
- Runner
-
Add + enable: gitlab-org/gitlab-runner!5306 (merged)
-
- gitlab
-
Add + enable: gitlab-org/gitlab!180806 (merged)
-
-
We've added a script to check for index.md
files in source project pipelines. Until we do https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/issues/82, this check will fail, but that's OK (we can allow the job to fail for now).
We will introduce these as manual jobs so that they don't slow down regular docs pipelines, then enable them to run on regular docs pipelines.