Browse Source

Remove /draft from sitemap

Do not include /draft in sitemap.

Paritally implements bp draft-publishing

Change-Id: Iddfef2933c7a397da6f084da1285716b0078ea06
tags/0.25
Andreas Jaeger 4 years ago
parent
commit
a21cf5f375
2 changed files with 4 additions and 2 deletions
  1. 1
    0
      sitemap/generator/spiders/sitemap.py
  2. 3
    2
      sitemap/transform-sitemap.xslt

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

34
                 ],
34
                 ],
35
                 deny=[
35
                 deny=[
36
                     r'/trunk/',
36
                     r'/trunk/',
37
+                    r'/draft/',
37
                     r'/api/'
38
                     r'/api/'
38
                 ]
39
                 ]
39
             ),
40
             ),

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

1
 <?xml version="1.0"?>
1
 <?xml version="1.0"?>
2
 <!-- Use this transform on a sitemap.xml file generated from freesitemapgenerator.com -->
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
 <xsl:stylesheet version="1.0"
4
 <xsl:stylesheet version="1.0"
5
     xmlns:sm="http://www.sitemaps.org/schemas/sitemap/0.9"
5
     xmlns:sm="http://www.sitemaps.org/schemas/sitemap/0.9"
6
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
6
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
14
     
14
     
15
     <!-- discard any url/loc that refer to trunk or folsom -->
15
     <!-- discard any url/loc that refer to trunk or folsom -->
16
     <xsl:template match="sm:url[starts-with(./sm:loc,'http://docs.openstack.org/trunk')]"/>
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
     <xsl:template match="sm:url[starts-with(./sm:loc,'http://docs.openstack.org/folsom')]"/>
18
     <xsl:template match="sm:url[starts-with(./sm:loc,'http://docs.openstack.org/folsom')]"/>
18
     
19
     
19
-</xsl:stylesheet>
20
+</xsl:stylesheet>

Loading…
Cancel
Save