diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2018-05-30 11:19:56 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2018-05-30 11:19:56 +0300 |
commit | 323685ae9ed69721db56514670e9bda8563c0261 (patch) | |
tree | fd63a071bbc1b65f7e2edfd293b3140072e166a9 | |
parent | 405d8e479b37582171bf693ed493351722f9cacc (diff) | |
parent | c019193f9710240b57704c630a0fa8f5f1089357 (diff) |
Merge branch 'sitemap-exclude-ce' into 'master'
Exclude CE from sitemap
See merge request gitlab-com/gitlab-docs!277
-rw-r--r-- | content/sitemap.xml.erb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/content/sitemap.xml.erb b/content/sitemap.xml.erb index 9cb57577..3637eaee 100644 --- a/content/sitemap.xml.erb +++ b/content/sitemap.xml.erb @@ -2,5 +2,12 @@ is_hidden: true --- <%= xml_sitemap( - items: items.select { |i| !i[:is_hidden] && i.identifier.to_s.end_with?('.md','.erb','.html')} + items: items.select do |i| + # Exclude 'is_hidden: true' files + !i[:is_hidden] && + # Exclude CE + !i.identifier.to_s.include?('/ce/') && + # Include all files end with md, erb, html + i.identifier.to_s.end_with?('.md','.erb','.html') + end ) %> |