Add a sitemap.txt for popular public repos

and reference it from the robots.txt
This commit is contained in:
Jake Moshenko 2016-06-17 13:52:27 -04:00
parent c712be05e2
commit a1cf12e460
11 changed files with 146 additions and 52 deletions

2
templates/robots.txt Normal file
View file

@ -0,0 +1,2 @@
User-agent: *
Disallow: /

58
templates/sitemap.xml Normal file
View file

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>{{ baseurl }}/</loc>
<changefreq>hourly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>{{ baseurl }}/plans/</loc>
<changefreq>monthly</changefreq>
</url>
<url>
<loc>{{ baseurl }}/tour/</loc>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>{{ baseurl }}/tour/organizations</loc>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>{{ baseurl }}/tour/features</loc>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>{{ baseurl }}/tour/enterprise</loc>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>{{ baseurl }}/contact/</loc>
<changefreq>monthly</changefreq>
</url>
<url>
<loc>{{ baseurl }}/about/</loc>
<changefreq>monthly</changefreq>
</url>
<url>
<loc>{{ baseurl }}/security/</loc>
<changefreq>monthly</changefreq>
<priority>0.4</priority>
</url>
<url>
<loc>{{ baseurl }}/tos</loc>
<changefreq>monthly</changefreq>
<priority>0.4</priority>
</url>
<url>
<loc>{{ baseurl }}/privacy</loc>
<changefreq>monthly</changefreq>
<priority>0.4</priority>
</url>
{% for namespace, reponame in public_repos -%}
<url>
<loc>{{ baseurl }}/repository/{{ namespace }}/{{ reponame }}</loc>
<changefreq>daily</changefreq>
<priority>0.3</priority>
</url>
{%- endfor %}
</urlset>