Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate sitemap.xml from page and posts index
- Loading branch information
Thomas
committed
Nov 3, 2013
1 parent
98fcb6c
commit e3d9c40
Showing
7 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -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> |