1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-22 12:50:24 +01:00

Merge pull request #182 from XhmikosR/sitemap

Generate sitemap.xml and add robots.txt.
This commit is contained in:
Phil Haack 2014-01-24 09:16:26 -08:00
commit 24e9effec1
4 changed files with 43 additions and 0 deletions

View File

@ -2,6 +2,7 @@
title: ChooseALicense.com title: ChooseALicense.com
relative_permalinks: false relative_permalinks: false
markdown: kramdown markdown: kramdown
url: "http://choosealicense.com"
rules: rules:

View File

@ -4,6 +4,7 @@ class: home
hide_breadcrumbs: true hide_breadcrumbs: true
title: Choosing an OSS license doesn't need to be scary title: Choosing an OSS license doesn't need to be scary
description: A site to provide non-judgmental guidance on choosing a license for your open source project description: A site to provide non-judgmental guidance on choosing a license for your open source project
permalink: /
--- ---
<h2> <h2>

10
robots.txt Normal file
View File

@ -0,0 +1,10 @@
---
layout: nil
---
# www.robotstxt.org/
# Allow crawling of all content
User-agent: *
Disallow:
Sitemap: {{ site.url }}/sitemap.xml

31
sitemap.xml Normal file
View File

@ -0,0 +1,31 @@
---
layout: nil
---
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/sitemap.xsl"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>{{ site.url }}/</loc>
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
{% for page in site.pages %}
{% if page.layout != "nil" %}
<url>
<loc>{{ site.url }}{{ page.url }}</loc>
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
<changefreq>weekly</changefreq>
<priority>0.7</priority>
</url>
{% endif %}
{% endfor %}
{% for post in site.posts %}
<url>
<loc>{{ site.url }}{{ post.url }}</loc>
<lastmod>{{ post.date | date_to_xmlschema }}</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
{% endfor %}
</urlset>