diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2022-04-12 18:56:11 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2022-04-12 18:56:11 +0300 |
commit | 0ffb2af7f353033eb9cf84f7ff9383e93f4e7cba (patch) | |
tree | 385394907619d08c86d63669c6ec1e345b7466cc | |
parent | dce6807f49f6bd13eeca296608eeeba2c99b83ba (diff) |
Skip adding external domains to Pages redirectsaxil-dont-add-external-domain-redirects
-rw-r--r-- | Rakefile | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -356,6 +356,11 @@ namespace :docs do counter += 1 File.delete(filename) if File.exist?(filename) + + # Don't add any entries that are domain-level redirects, they are not supported + # https://docs.gitlab.com/ee/user/project/pages/redirects.html + next if new_path(frontmatter['redirect_to'], filename, content_dir, slug).start_with?('http') + File.open(redirects_yaml, 'a') do |post| post.puts " - from: #{old_path}" post.puts " to: #{new_path(frontmatter['redirect_to'], filename, content_dir, slug)}" |