Allow site to publish either _index.md or index.md files as index.html
What does this MR do and why?
As part of gitlab-org/technical-writing-group/gitlab-docs-hugo#55 (closed), make the Docs site be able to publish either _index.md
(Hugo style) or index.md
files as index.html
.
This would help both nanoc
and Hugo to publish the same files.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md. -
Check out this branch. -
Run make compile
. The site should publish normally, including creating or updatingindex.html
files. -
Modify your local checkouts of GitLab docs content so that all index.md
files are renamed to_index.md
. See https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/blob/bae8d80a4b25edd3ef8cfb050f94633945b1ff24/scripts/content-post-process.sh#L22 for inspiration. -
Run make compile
. The site should publish normally, with files called_index.md
published asindex.html
in the correct places.
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.
Edited by Evan Read