Skip to content

Commit

Permalink
Generate sitemap.xml from page and posts index
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas committed Nov 3, 2013
1 parent 98fcb6c commit e3d9c40
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 1 deletion.
1 change: 1 addition & 0 deletions _config.yml
@@ -1,6 +1,7 @@
safe: true safe: true
encoding: UTF-8 encoding: UTF-8
baseurl: / baseurl: /
hostname: "http://roundcube.net"
permalink: news/:year/:month/:day/:title permalink: news/:year/:month/:day/:title
paginate: 6 paginate: 6
paginate_path: news/page:num paginate_path: news/page:num
1 change: 1 addition & 0 deletions about/index.html
Expand Up @@ -3,6 +3,7 @@
title: About Roundcube Webmail title: About Roundcube Webmail
navtitle: About navtitle: About
permalink: / permalink: /
lastmod: 2013-11-03T15:40:00Z
--- ---
<h1>About the Roundcube webmail project</h1> <h1>About the Roundcube webmail project</h1>


Expand Down
1 change: 1 addition & 0 deletions download/index.html
Expand Up @@ -3,6 +3,7 @@
title: Roundcube Webmail Downloads title: Roundcube Webmail Downloads
navtitle: Download navtitle: Download
permalink: / permalink: /
lastmod: 2013-11-03T15:40:00Z
--- ---
<h1>Download your version of Roundcube</h1> <h1>Download your version of Roundcube</h1>


Expand Down
2 changes: 1 addition & 1 deletion feeds/atom.xml
@@ -1,6 +1,6 @@
--- ---
layout: nil layout: nil
baseurl: "http://roundcube.github.io" baseurl: "http://roundcube.net"
--- ---
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"> <feed xmlns="http://www.w3.org/2005/Atom">
Expand Down
1 change: 1 addition & 0 deletions index.html
@@ -1,6 +1,7 @@
--- ---
layout: home layout: home
title: Roundcube - Free and Open Source Webmail Software title: Roundcube - Free and Open Source Webmail Software
date: 2013-11-03T15:40:00Z
--- ---


<div id="homescreen"> <div id="homescreen">
Expand Down
1 change: 1 addition & 0 deletions news/index.html
Expand Up @@ -3,6 +3,7 @@
title: Roundcube Webmail News title: Roundcube Webmail News
navtitle: News navtitle: News
permalink: / permalink: /
lastmod: 2013-11-03T15:40:00Z
--- ---
<h1>The Roundcube Project News</h1> <h1>The Roundcube Project News</h1>


Expand Down
28 changes: 28 additions & 0 deletions sitemap.xml
@@ -0,0 +1,28 @@
---
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for page in site.pages %}
{% if page.layout != nil %}
<url>
<loc>{{site.hostname }}{{ page.url | remove:'index.html' }}</loc>
{% if page.lastmod != nil %}
<lastmod>{{ page.lastmod | date_to_xmlschema }}</lastmod>
{% endif %}
<changefreq>weekly</changefreq>
</url>
{% endif %}
{% endfor %}
{% for post in site.posts %}
<url>
<loc>{{site.hostname }}{{ post.url | remove:'index.html' }}</loc>
{% if post.lastmod == nil %}
<lastmod>{{ post.date | date_to_xmlschema }}</lastmod>
{% else %}
<lastmod>{{ post.lastmod | date_to_xmlschema }}</lastmod>
{% endif %}
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
{% endfor %}
</urlset>

0 comments on commit e3d9c40

Please sign in to comment.