diff options
author | Sarah German <sgerman@gitlab.com> | 2022-04-22 23:29:31 +0300 |
---|---|---|
committer | Sarah German <sgerman@gitlab.com> | 2022-04-22 23:29:31 +0300 |
commit | 4ff89a4eb0bcda6e9d81f5741fdaed24935b45c8 (patch) | |
tree | e1c185b6634da3ca4a30cd5a7241dfd3750c3344 | |
parent | e77dbf6ffdf7622392887ee6525802c14242dab4 (diff) | |
parent | 0ffb2af7f353033eb9cf84f7ff9383e93f4e7cba (diff) |
Merge branch 'axil-dont-add-external-domain-redirects' into 'main'
Skip adding external domains to Pages redirects
Closes #1157
See merge request gitlab-org/gitlab-docs!2567
-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)}" |