Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Prefer non-plugin sitemap

  • Loading branch information...
dhcole committed Sep 12, 2015
1 parent 659d791 commit c5e0ec3690312cc186517de1dd0037901a7d9803
Showing with 40 additions and 2 deletions.
  1. +0 −2 _config.yml
  2. +40 −0 sitemap.xml
@@ -61,5 +61,3 @@ exclude:
- CONTRIBUTING.md
- LICENSE.md
- README.md
gems:
- jekyll-sitemap
@@ -0,0 +1,40 @@
---
---
<?xml version="1.0" encoding="UTF-8"?>
<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">
{% capture site_url %}{% if site.url %}{{ site.url | append: site.baseurl }}{% else %}{{ site.github.url }}{% endif %}{% endcapture %}
{% for post in site.posts %}{% unless post.sitemap == false %}
<url>
<loc>{{ post.url | prepend: site_url }}</loc>
{% if post.last_modified_at %}
<lastmod>{{ post.last_modified_at | date_to_xmlschema }}</lastmod>
{% else %}
<lastmod>{{ post.date | date_to_xmlschema }}</lastmod>
{% endif %}
</url>
{% endunless %}{% endfor %}
{% for page in site.html_pages %}{% unless page.sitemap == false %}
<url>
<loc>{{ page.url | replace:'/index.html','/' | prepend: site_url }}</loc>
{% if page.last_modified_at %}
<lastmod>{{ page.last_modified_at | date_to_xmlschema }}</lastmod>
{% endif %}
</url>
{% endunless %}{% endfor %}
{% for collection in site.collections %}{% unless collection.last.output == false %}
{% for doc in collection.last.docs %}{% unless doc.sitemap == false %}
<url>
<loc>{{ doc.url | replace:'/index.html','/' | prepend: site_url }}</loc>
{% if doc.last_modified_at %}
<lastmod>{{ doc.last_modified_at | date_to_xmlschema }}</lastmod>
{% endif %}
</url>
{% endunless %}{% endfor %}
{% endunless %}{% endfor %}
{% for file in site.html_files %}
<url>
<loc>{{ file.path | prepend: site_url }}</loc>
<lastmod>{{ file.modified_time | date_to_xmlschema }}</lastmod>
</url>
{% endfor %}
</urlset>

0 comments on commit c5e0ec3

Please sign in to comment.
You can’t perform that action at this time.