Add index pages

This commit is contained in:
Clément Fournier 2018-05-18 01:25:40 +02:00
parent 1272f597e6
commit b22467e32a

View File

@ -2,7 +2,7 @@
# Sitemap generator
# Assumes we have the latest version of the site under "latest" and "pmd-${RELEASE_VERSION}"
# https://www.sitemaps.org/protocol.html
WEBSITE_PREFIX="https://pmd.github.io/"
DOC_PREFIX="pmd-${RELEASE_VERSION}/"
@ -16,19 +16,35 @@ cat << HEADER_END > sitemap.xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>${WEBSITE_PREFIX}index.html</loc>
<priority>1</priority>
<changefreq>monthly</changefreq>
<lastmod>$DATE</lastmod>
</url>
<url>
<loc>${WEBSITE_PREFIX}${DOC_PREFIX}index.html</loc>
<priority>0.9</priority>
<changefreq>monthly</changefreq>
<lastmod>$DATE</lastmod>
</url>
HEADER_END
for page in pmd-${RELEASE_VERSION}/pmd_*.html
for page in ${DOC_PREFIX}pmd_*.html
do
cat << ENTRY_END >> sitemap.xml
<url>
<loc>${WEBSITE_PREFIX}$page</loc>
<priority>$LATEST_PRIORITY</priority>
<changefreq>monthly</changefreq>
<lastmod>$DATE</lastmod>
</url>
cat << ENTRY_END >> sitemap.xml
<url>
<loc>${WEBSITE_PREFIX}$page</loc>
<priority>$LATEST_PRIORITY</priority>
<changefreq>monthly</changefreq>
<lastmod>$DATE</lastmod>
</url>
ENTRY_END