diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2023-09-12 20:54:44 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2023-09-12 20:54:44 +0300 |
commit | 37f437cdd64afe4d335886732c0bbeb8a8733b3c (patch) | |
tree | ff78ba0075f48293b515d63c37e86321cfba74ef | |
parent | f906352e0014c0d365dab13ae8ee4f1b490642a5 (diff) | |
parent | cc720e34913617f99f3e30b049956eae16ddcb6d (diff) |
Merge branch 'eread/add-problem-resolution-text-to-redirects-rake-task' into 'main'
Add problem resolution text to redirects Rake task
See merge request https://gitlab.com/gitlab-org/gitlab-docs/-/merge_requests/4238
Merged-by: Achilleas Pipinellis <axil@gitlab.com>
Reviewed-by: Achilleas Pipinellis <axil@gitlab.com>
Co-authored-by: Evan Read <eread@gitlab.com>
-rw-r--r-- | lib/tasks/redirects.rake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tasks/redirects.rake b/lib/tasks/redirects.rake index 13e07a42..92d6fcc9 100644 --- a/lib/tasks/redirects.rake +++ b/lib/tasks/redirects.rake @@ -71,7 +71,7 @@ namespace :docs do # To : /ee/install/requirements.html # def new_path(redirect, filename, content_dir, slug) - abort "\n#{TaskHelpers::COLOR_CODE_RED}ERROR: No redirect_to found in #{filename}!#{TaskHelpers::COLOR_CODE_RESET}" if redirect.nil? + abort "\n#{TaskHelpers::COLOR_CODE_RED}ERROR: No redirect_to found in #{filename}!#{TaskHelpers::COLOR_CODE_RESET}\n\nTo resolve the problem:\n1. Add redirect_to to the metadata of #{filename}.\n2. Raise a merge request with the metadata change and have the change merged.\n3. Run the Rake task again.#{TaskHelpers::COLOR_CODE_RESET}" if redirect.nil? if !redirect.start_with?('http') Pathname.new(filename).dirname.join(redirect).to_s.gsub(%r{\.md}, '.html').gsub(content_dir, "/#{slug}") |