Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchilleas Pipinellis <axil@gitlab.com>2018-05-30 09:29:26 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2018-05-30 09:29:26 +0300
commitc019193f9710240b57704c630a0fa8f5f1089357 (patch)
treefd63a071bbc1b65f7e2edfd293b3140072e166a9
parent405d8e479b37582171bf693ed493351722f9cacc (diff)
Exclude CE from sitemap
-rw-r--r--content/sitemap.xml.erb9
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
) %>