diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index ac70807b3f49c6f7fd06e66f3ce8374d7a008b7d..d523c2cce15a1bb3146916eb4857f75e989a8fd9 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -401,7 +401,7 @@ - "scripts/rspec_helpers.sh" # Mapped patterns (see tests.yml) - "data/whats_new/*.yml" - - "doc/index.md" + - "doc/_index.md" - "doc/api/settings.md" .search-backend-patterns: &search-backend-patterns @@ -508,7 +508,7 @@ - "{,jh/}.gitlab/ci/**/*" # Mapped patterns (see tests.yml) - "data/whats_new/*.yml" - - "doc/index.md" + - "doc/_index.md" - "doc/api/settings.md" # .code-patterns + .backstage-patterns @@ -537,7 +537,7 @@ - "{,jh/}.gitlab/ci/**/*" # Mapped patterns (see tests.yml) - "data/whats_new/*.yml" - - "doc/index.md" + - "doc/_index.md" - "doc/api/settings.md" # Backstage changes - "Dangerfile" @@ -574,7 +574,7 @@ - "{,jh/}.gitlab/ci/**/*" # Mapped patterns (see tests.yml) - "data/whats_new/*.yml" - - "doc/index.md" + - "doc/_index.md" - "doc/api/settings.md" # QA changes - ".dockerignore" @@ -617,7 +617,7 @@ - "{,jh/}qa/**/*" # Mapped patterns (see tests.yml) - "data/whats_new/*.yml" - - "doc/index.md" + - "doc/_index.md" - "doc/api/settings.md" # .code-backstage-qa-patterns + .workhorse-patterns @@ -649,7 +649,7 @@ - "{,jh/}.gitlab/ci/**/*" # Mapped patterns (see tests.yml) - "data/whats_new/*.yml" - - "doc/index.md" + - "doc/_index.md" - "doc/api/settings.md" # Backstage changes - "Dangerfile" diff --git a/app/assets/javascripts/super_sidebar/components/help_center.vue b/app/assets/javascripts/super_sidebar/components/help_center.vue index 0863b3e57166bc847eacf7cd6ff1ec55e5240508..4cebc247454a6a1c7b8313b147884bdab9f03bf8 100644 --- a/app/assets/javascripts/super_sidebar/components/help_center.vue +++ b/app/assets/javascripts/super_sidebar/components/help_center.vue @@ -88,7 +88,7 @@ export default { }, { text: this.$options.i18n.contribute, - href: helpPagePath('', { anchor: 'contribute-to-gitlab' }), + href: helpPagePath('_index.md', { anchor: 'contribute-to-gitlab' }), extraAttrs: { ...this.trackingAttrs('contribute_to_gitlab'), }, diff --git a/doc/index.md b/doc/_index.md similarity index 100% rename from doc/index.md rename to doc/_index.md diff --git a/doc/administration/get_started.md b/doc/administration/get_started.md index ded6bcd39b047a6904c124de140de9d4caae0361..769ee0c9a07df575a8f45bd8488082fc4713d093 100644 --- a/doc/administration/get_started.md +++ b/doc/administration/get_started.md @@ -231,7 +231,7 @@ If you use GitLab SaaS, you have several channels with which to get support and To get assistance for GitLab SaaS: -- Access [GitLab Docs](../index.md) for self-service support. +- Access [GitLab Docs](../_index.md) for self-service support. - Join the [GitLab Forum](https://forum.gitlab.com/) for community support. - Gather [your subscription information](https://about.gitlab.com/support/#for-self-managed-users) before submitting a ticket. - Submit a support ticket for: diff --git a/doc/development/documentation/help.md b/doc/development/documentation/help.md index eb96aeb823f40ffa3c74b0560e36b117e2d300f6..b3edf9cbba9c18279e73022ec963f05f75f8c066 100644 --- a/doc/development/documentation/help.md +++ b/doc/development/documentation/help.md @@ -156,5 +156,5 @@ Do not use `include ActionView::Helpers::UrlHelper` just to make the `link_to` m ## `/help` tests Several [RSpec tests](https://gitlab.com/gitlab-org/gitlab/-/blob/master/spec/features/help_pages_spec.rb) -are run to ensure GitLab documentation renders and works correctly. In particular, that [main docs landing page](../../index.md) works correctly from `/help`. +are run to ensure GitLab documentation renders and works correctly. In particular, that [main docs landing page](../../_index.md) works correctly from `/help`. For example, [GitLab.com's `/help`](https://gitlab.com/help). diff --git a/doc/development/documentation/site_architecture/automation.md b/doc/development/documentation/site_architecture/automation.md index 33320f7a566016c834ae258683bd89cdd8a1ee00..aed0f5c1b0b83022ba248de252a497fd78d88032 100644 --- a/doc/development/documentation/site_architecture/automation.md +++ b/doc/development/documentation/site_architecture/automation.md @@ -50,7 +50,7 @@ that are coded across multiple repositories. | [Available custom role permissions](../../../user/custom_roles/abilities.md) | [Generated by Rake task](https://gitlab.com/gitlab-org/gitlab/-/blob/master/tooling/custom_roles/docs/templates/custom_abilities.md.erb) | [Authorization](https://handbook.gitlab.com/handbook/product/categories/#authorization-group)| | [Application settings analysis](../../cells/application_settings_analysis.md) | [Generated by Ruby script](https://gitlab.com/gitlab-org/gitlab/-/blob/2bb2910c84fad965bde473aa2881d88358b6e96e/scripts/cells/application-settings-analysis.rb#L353) | | | DAST vulnerability check documentation ([Example](../../../user/application_security/dast/browser/checks/798.19.md)) | [How to generate the Markdown](https://gitlab.com/gitlab-org/security-products/dast-cwe-checks/-/blob/main/doc/how-to-generate-the-markdown-documentation.md) | [Dynamic Analysis](https://handbook.gitlab.com/handbook/product/categories/#dynamic-analysis-group) | -| [The docs homepage](../../../index.md) | | [Technical Writing](https://handbook.gitlab.com/handbook/product/ux/technical-writing/) | +| [The docs homepage](../../../_index.md) | | [Technical Writing](https://handbook.gitlab.com/handbook/product/ux/technical-writing/) | ## Make an automation request diff --git a/doc/legal/index.md b/doc/legal/_index.md similarity index 100% rename from doc/legal/index.md rename to doc/legal/_index.md diff --git a/doc/security/hardening_cicd_recommendations.md b/doc/security/hardening_cicd_recommendations.md index bffa6cd3c2c8636ef4ad50a21e6bb293ab88acd8..a668eb9afc52a86246961cc250d916e13a567eae 100644 --- a/doc/security/hardening_cicd_recommendations.md +++ b/doc/security/hardening_cicd_recommendations.md @@ -25,7 +25,7 @@ information to help harden the CI/CD process. container technology should be used, such as GCP Secret Manager, AWS KMS, or HashiCorp Vault. For self-managed and standalone instances, HashiCorp Vault is recommended, and many GitLab features can take advantage of Vault and are well - documented in the main [Documentation](../index.md). For detailed CI/CD examples, see [using external secrets in CI](../ci/secrets/_index.md). + documented in the main [Documentation](../_index.md). For detailed CI/CD examples, see [using external secrets in CI](../ci/secrets/_index.md). - **External Communications**. If your CI/CD process requires connectivity to other hosts, ensure that these communication channels are encrypted. You should use TLS 1.2 or 1.3, and where possible implement mutual TLS. - **Logging**. Logging can be very important for auditing and troubleshooting, so it diff --git a/doc/user/markdown.md b/doc/user/markdown.md index 9eb14a7c30431cd752d68bb3ff2b2b50afa73b69..ba197c923aea110bcdeec56af132440210790bdf 100644 --- a/doc/user/markdown.md +++ b/doc/user/markdown.md @@ -592,7 +592,7 @@ Do not change it back to a markdown codeblock. <pre class="highlight"><code>- This line shows an [inline-style link](https://www.google.com) - This line shows a [link to a repository file in the same directory](permissions.md) -- This line shows a [relative link to a file one directory higher](../index.md) +- This line shows a [relative link to a file one directory higher](../_index.md) - This line shows a [link that also has title text](https://www.google.com "This link takes you to Google!") Using heading ID anchors: @@ -615,7 +615,7 @@ Some text to show that the reference links can follow later. - This line shows an [inline-style link](https://www.google.com) - This line shows a [link to a repository file in the same directory](permissions.md) -- This line shows a [relative link to a file one directory higher](../index.md) +- This line shows a [relative link to a file one directory higher](../_index.md) - This line shows a [link that also has title text](https://www.google.com "This link takes you to Google!") Using heading ID anchors: @@ -1674,7 +1674,7 @@ the content. This data can be used by static site generators like [Jekyll](https When you view a Markdown file rendered by GitLab, front matter is displayed as-is, in a box at the top of the document. The HTML content displays after the front matter. To view an example, you can toggle between the source and rendered version of a -[GitLab documentation file](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/index.md). +[GitLab documentation file](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/_index.md). In GitLab, front matter is used only in Markdown files and wiki pages, not the other places where Markdown formatting is supported. It must be at the very top of the document diff --git a/doc/user/project/settings/import_export.md b/doc/user/project/settings/import_export.md index 5b4a833daf942c1ad17f7c10fa8c86a70fb44137..f6ecab07957fac4ab5b020e311e1801374e64aac 100644 --- a/doc/user/project/settings/import_export.md +++ b/doc/user/project/settings/import_export.md @@ -125,7 +125,7 @@ and vice versa, assuming [compatibility](#compatibility) is met. If you're exporting a project from the Enterprise Edition to the Community Edition, you may lose data that is retained only in the Enterprise Edition. For more information, see -[downgrading from EE to CE](../../../index.md). +[downgrading from EE to CE](../../../downgrade_ee_to_ce/_index.md). ### Export a project and its data @@ -335,7 +335,7 @@ Professional Services team. - You can export groups from the [Community Edition to the Enterprise Edition](https://about.gitlab.com/install/ce-or-ee/) and vice versa. The Enterprise Edition retains some group data that isn't part of the Community Edition. If you're exporting a group from the Enterprise Edition to the Community Edition, you may lose this data. For more information, - see [downgrading from EE to CE](../../../index.md). + see [downgrading from EE to CE](../../../downgrade_ee_to_ce/_index.md). The maximum import file size depends on whether you import to GitLab Self-Managed or GitLab.com: diff --git a/scripts/verify-tff-mapping b/scripts/verify-tff-mapping index bf4a327b034d974a4e975b31118f070f0e02e7ac..bc1282215255a588b15c1bd8cc356e1f0fb9e019 100755 --- a/scripts/verify-tff-mapping +++ b/scripts/verify-tff-mapping @@ -204,7 +204,7 @@ tests = [ { explanation: 'The documentation index page is used in this haml_lint spec', - changed_file: 'doc/index.md', + changed_file: 'doc/_index.md', expected: ['spec/haml_lint/linter/documentation_links_spec.rb'] }, diff --git a/spec/dot_gitlab_ci/ci_configuration_validation/shared_context_and_examples.rb b/spec/dot_gitlab_ci/ci_configuration_validation/shared_context_and_examples.rb index 1c13c6cf0dbb94439913dd616be593c596d7cc87..0ea76a57f148761890c529573f64a65d0a19fc11 100644 --- a/spec/dot_gitlab_ci/ci_configuration_validation/shared_context_and_examples.rb +++ b/spec/dot_gitlab_ci/ci_configuration_validation/shared_context_and_examples.rb @@ -24,7 +24,7 @@ let_it_be(:gitlab_org_gitlab_project) { create(:project, :empty_repo, group: group, path: 'gitlab') } let_it_be(:user) { create(:user) } let_it_be(:ci_glob) { Dir.glob("{.gitlab-ci.yml,.gitlab/**/*.yml}").freeze } - let_it_be(:ci_glob_with_common_file_globs) { [*ci_glob, 'lib/api/lint.rb', 'doc/index.md'] } + let_it_be(:ci_glob_with_common_file_globs) { [*ci_glob, 'lib/api/lint.rb', 'doc/_index.md'] } let_it_be(:master_branch) { 'master' } around do |example| diff --git a/spec/frontend/super_sidebar/components/help_center_spec.js b/spec/frontend/super_sidebar/components/help_center_spec.js index b46ec391942a0a1d5f2aa7b1ee00ca1cb0fd6332..65c2e5b73d6fbae4c882fd7c4e0c55c002af9459 100644 --- a/spec/frontend/super_sidebar/components/help_center_spec.js +++ b/spec/frontend/super_sidebar/components/help_center_spec.js @@ -77,7 +77,7 @@ describe('HelpCenter component', () => { }, { text: HelpCenter.i18n.contribute, - href: helpPagePath('', { anchor: 'contribute-to-gitlab' }), + href: helpPagePath('_index.md', { anchor: 'contribute-to-gitlab' }), extraAttrs: trackingAttrs('contribute_to_gitlab'), }, { diff --git a/spec/haml_lint/linter/documentation_links_spec.rb b/spec/haml_lint/linter/documentation_links_spec.rb index f1a7e4146be79a284d0fb520c4829d2cb655b0c4..a1e23058bf57469754cfd1b7fdb23484e6e5d3fe 100644 --- a/spec/haml_lint/linter/documentation_links_spec.rb +++ b/spec/haml_lint/linter/documentation_links_spec.rb @@ -11,13 +11,13 @@ shared_examples 'link validation rules' do |link_pattern| context 'when link_to points to the existing file path' do - let(:haml) { "= link_to 'Description', #{link_pattern}('index.md')" } + let(:haml) { "= link_to 'Description', #{link_pattern}('_index.md')" } it { is_expected.not_to report_lint } end context 'when link_to points to the existing file with valid anchor' do - let(:haml) { "= link_to 'Description', #{link_pattern}('index.md', anchor: 'user-accounts'), target: '_blank'" } + let(:haml) { "= link_to 'Description', #{link_pattern}('_index.md', anchor: 'user-accounts'), target: '_blank'" } it { is_expected.not_to report_lint } end @@ -29,12 +29,12 @@ end context 'when anchor is not correct' do - let(:haml) { "= link_to 'Description', #{link_pattern}('index.md', anchor: 'wrong')" } + let(:haml) { "= link_to 'Description', #{link_pattern}('_index.md', anchor: 'wrong')" } it { is_expected.to report_lint } context "when #{link_pattern} has multiple options" do - let(:haml) { "= link_to 'Description', #{link_pattern}('index.md', key: :value, anchor: 'wrong')" } + let(:haml) { "= link_to 'Description', #{link_pattern}('_index.md', key: :value, anchor: 'wrong')" } it { is_expected.to report_lint } end @@ -65,7 +65,7 @@ end context 'when anchor belongs to a different element' do - let(:haml) { "= link_to 'Description', #{link_pattern}('index.md'), target: (anchor: 'blank')" } + let(:haml) { "= link_to 'Description', #{link_pattern}('_index.md'), target: (anchor: 'blank')" } it { is_expected.not_to report_lint } end @@ -89,7 +89,7 @@ end context 'when the second link is invalid' do - let(:haml) { ".data-form{ data: { url: #{link_pattern}('index.md'), wrong_url: #{link_pattern}('wrong') } }" } + let(:haml) { ".data-form{ data: { url: #{link_pattern}('_index.md'), wrong_url: #{link_pattern}('wrong') } }" } it { is_expected.to report_lint } end diff --git a/tests.yml b/tests.yml index 48a40a20c4a2fb7c3dffec4cebe7547a2d40ea53..778e0759fb1c01216fa7d5026dd1948fa8ae5df4 100644 --- a/tests.yml +++ b/tests.yml @@ -110,7 +110,7 @@ mapping: test: 'spec/lib/release_highlights/validator_spec.rb' # The documentation index page is used in this haml_lint spec - - source: 'doc/index\.md' + - source: 'doc/_index\.md' test: 'spec/haml_lint/linter/documentation_links_spec.rb' - source: '(?<prefix>ee/)?app/models/.+\.rb'