Sfoglia il codice sorgente

Remove /draft from sitemap

Do not include /draft in sitemap.

Paritally implements bp draft-publishing

Change-Id: Iddfef2933c7a397da6f084da1285716b0078ea06
tags/0.25
Andreas Jaeger 4 anni fa
parent
commit
a21cf5f375
2 ha cambiato i file con 4 aggiunte e 2 eliminazioni
  1. 1
    0
      sitemap/generator/spiders/sitemap.py
  2. 3
    2
      sitemap/transform-sitemap.xslt

+ 1
- 0
sitemap/generator/spiders/sitemap.py Vedi File

@@ -34,6 +34,7 @@ class SitemapSpider(spiders.CrawlSpider):
34 34
                 ],
35 35
                 deny=[
36 36
                     r'/trunk/',
37
+                    r'/draft/',
37 38
                     r'/api/'
38 39
                 ]
39 40
             ),

+ 3
- 2
sitemap/transform-sitemap.xslt Vedi File

@@ -1,6 +1,6 @@
1 1
 <?xml version="1.0"?>
2 2
 <!-- Use this transform on a sitemap.xml file generated from freesitemapgenerator.com -->
3
-<!-- It removes the /trunk URLs and the release URLs that you indicate below, here it's folsom -->
3
+<!-- It removes the /trunk and /draft URLs and the release URLs that you indicate below, here it's folsom -->
4 4
 <xsl:stylesheet version="1.0"
5 5
     xmlns:sm="http://www.sitemaps.org/schemas/sitemap/0.9"
6 6
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
@@ -14,6 +14,7 @@
14 14
     
15 15
     <!-- discard any url/loc that refer to trunk or folsom -->
16 16
     <xsl:template match="sm:url[starts-with(./sm:loc,'http://docs.openstack.org/trunk')]"/>
17
+    <xsl:template match="sm:url[starts-with(./sm:loc,'http://docs.openstack.org/draft')]"/>
17 18
     <xsl:template match="sm:url[starts-with(./sm:loc,'http://docs.openstack.org/folsom')]"/>
18 19
     
19
-</xsl:stylesheet>
20
+</xsl:stylesheet>

Loading…
Annulla
Salva