Rename index files
We need to rename all index.md
files to _index.md
to work with Hugo.
We've already modified Nanoc and /help
to work with this change. We also need to:
-
Review automated pages to check if any generate an index.md
file. We'll need to adjust these to create_index.md
files instead. Right now the GraphQL API page is the only known automated page that creates an index page. -
Create a test to ensure new pages are named _index.md
rather thanindex.md
(issue) -
Verify that this won't break UI links to /help
pages (e.g, a link to https://gitlab.com/help/user/project/codeowners/index.md). Will need to also test redirects when there is a Documentation Pages URL setting configured (what is currently translating the/help
path to the website path?)
Then we can actually do the renaming, in each project. This will take two steps:
- Rename the files (see
content-post-process.sh
) - Update links that point to index.md files (see
migrate-index-links.go
)
This needs to happen in every source content repo:
-
gitlab runner -
gitlab charts -
gitlab operator -
omnibus gitlab -
gitlab
Last steps will be:
-
Update documentation - https://docs.gitlab.com/ee/development/documentation/site_architecture/folder_structure.html#work-with-directories-and-files
-
https://docs.gitlab.com/ee/development/documentation/help.html#_indexmd-files (we don't need to change this behavior, but we should note that
_index.md
is the required name now)
-
Announce the change in the #docs
Slack channel
Related:
Edited by Sarah German