forked from leftypol/leftypol
New theme: XML sitemap generator
This commit is contained in:
parent
aadb57f2a2
commit
7e95e80c25
3 changed files with 100 additions and 0 deletions
19
templates/themes/sitemap/sitemap.xml
Normal file
19
templates/themes/sitemap/sitemap.xml
Normal file
|
@ -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 %}
|
Loading…
Add table
Add a link
Reference in a new issue