Allow nanoc to process links to _index files
What does this MR do and why?
For: gitlab-org/technical-writing-group/gitlab-docs-hugo#55 (closed), if we encounter links to _index.md
, we need to change them because nanoc
will serve index.html
.
How to set up and validate locally
-
Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md. -
In a check out of gitlab
connected to the GitLab Docs environment, indoc/index.md
, update line 26 (https://gitlab.com/gitlab-org/gitlab/-/blob/4dfdb031c3f142bebb13fcb7f027f22408629446/doc/index.md#L26) so that the link touser/index.md
is changed touser/_index.md
. -
In the same check out of gitlab
connected to the GitLab Docs environment, renameuser/index.md
touser/_index.md
. -
Run make view
and navigate tohttp://127.0.0.1:3000/ee/
. Select the Use GitLab link (which points tohttp://127.0.0.1:3000/ee/user/_index.html
) and get an error. -
Navigate to http://127.0.0.1:3000/ee/user/index.html
and note the URL and that it worked. -
Check out this branch. -
Run make view
and navigate tohttp://127.0.0.1:3000/ee/
. Select the Use GitLab link (which now points tohttp://127.0.0.1:3000/ee/user/index.html
) and you're taken to the right page (http://127.0.0.1:3000/ee/user/index.html
).
Merge request acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this merge request.