Skip to content

Instantly share code, notes, and snippets.

@mpstenson
Forked from MHerbst/sitemap.lens
Created September 23, 2013 16:50
Show Gist options
  • Save mpstenson/6673483 to your computer and use it in GitHub Desktop.
Save mpstenson/6673483 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<!-- dirty trick -->
<koken:include file="_includes/sitemappart.html" />
<!-- the included file (in this example sitemappart.html) contains just one line
<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
-->
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" 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">
<koken:load source="essays">
<koken:loop>
<url>
<loc>{{ essay.url }}</loc>
<lastmod>{{ essay.modified_on.timestamp date_format="Y-m-d"}}</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
</koken:loop>
</koken:load>
<koken:load source="pages">
<koken:loop>
<url>
<loc>{{ page.url }}</loc>
<lastmod>{{ page.modified_on.timestamp date_format="Y-m-d"}}</lastmod>
<changefreq>weekly</changefreq>
<priority>0.6</priority>
</url>
</koken:loop>
</koken:load>
<koken:load source="albums">
<koken:loop>
<url>
<loc>{{ album.url }}</loc>
<lastmod>{{ album.created_on.timestamp date_format="Y-m-d"}}</lastmod>
<changefreq>weekly</changefreq>
<priority>0.6</priority>
<koken:load source="album" filter:id="{{ album.id }}">
<koken:loop>
<image:image>
<image:loc>{{ content.presets.large.url }}</image:loc>
<image:caption>{{ content.caption | content.title }}</image:caption>
</image:image>
</koken:loop>
</koken:load>
</url>
</koken:loop>
</koken:load>
</urlset>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment