Skip to content

Commit

Permalink
sitemap
Browse files Browse the repository at this point in the history
Signed-off-by: frank <frankie.lineha@gmail.com>
  • Loading branch information
frank committed Jul 8, 2015
1 parent 6f5c211 commit a44c1ec
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SITE CONFIGURATION
baseurl: "" # the subpath of your site, e.g. /blog/
baseurl: "http://www.frankcode.com" # the subpath of your site, e.g. /blog/
url: "http://www.frankcode.com" # the base hostname & protocol for your site

# THEME-SPECIFIC CONFIGURATION
Expand Down
28 changes: 28 additions & 0 deletions sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
layout: null
---
<?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">
{% for post in site.posts %}
<url>
<loc>{{ site.baseurl }}{{ post.url }}</loc>
{% if post.lastmod == null %}
<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 %}
{% for page in site.pages %}
{% if page.sitemap != null and page.sitemap != empty %}
<url>
<loc>{{ site.baseurl }}{{ page.url }}</loc>
<lastmod>{{ page.sitemap.lastmod | date_to_xmlschema }}</lastmod>
<changefreq>{{ page.sitemap.changefreq }}</changefreq>
<priority>{{ page.sitemap.priority }}</priority>
</url>
{% endif %}
{% endfor %}
</urlset>

0 comments on commit a44c1ec

Please sign in to comment.