Remove /draft from sitemap

Do not include /draft in sitemap.

Paritally implements bp draft-publishing

Change-Id: Iddfef2933c7a397da6f084da1285716b0078ea06
This commit is contained in:
Andreas Jaeger 2015-04-18 09:43:10 +02:00
parent 11b7494d90
commit a21cf5f375
2 changed files with 4 additions and 2 deletions

View File

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

View File

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