diff options
| author | Michael Foster <savetheinternet@tinyboard.org> | 2013-07-17 10:17:28 -0400 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-07-17 10:17:28 -0400 |
| commit | 7e95e80c25e2f35b8a49ebd73f95671b0233be6f (patch) | |
| tree | cd0c872480a4bba8d35e2a9005bfbb6bb8368401 /templates/themes/sitemap/sitemap.xml | |
| parent | aadb57f2a2db9210468f25d7dcd45d561ef6ad54 (diff) | |
New theme: XML sitemap generator
Diffstat (limited to 'templates/themes/sitemap/sitemap.xml')
| -rw-r--r-- | templates/themes/sitemap/sitemap.xml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/templates/themes/sitemap/sitemap.xml b/templates/themes/sitemap/sitemap.xml new file mode 100644 index 00000000..733da607 --- /dev/null +++ b/templates/themes/sitemap/sitemap.xml @@ -0,0 +1,19 @@ +{% filter remove_whitespace %} +<?xml version="1.0" encoding="UTF-8"?> +<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> + {% for board in boards %} + <url> + <loc>{{ settings.url ~ (config.board_path | format(board)) ~ config.file_index }}</loc> + </url> + {% endfor %} + {% for board, thread_list in threads %} + {% for thread in thread_list %} + <url> + <loc>{{ settings.url ~ (config.board_path | format(board)) ~ config.dir.res ~ (config.file_page | format(thread.thread_id)) }}</loc> + <lastmod>{{ thread.lastmod | date('%Y-%m-%dT%H:%M:%S') }}{{ timezone() }}</lastmod> + <changefreq>{{ settings.changefreq }}</changefreq> + </url> + {% endfor %} + {% endfor %} +</urlset> +{% endfilter %}
\ No newline at end of file |
