This repository has been archived by the owner on Oct 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 447
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added sitemap by template, fix get_http_url for channel
- Loading branch information
1 parent
9bd7557
commit e82340b
Showing
4 changed files
with
43 additions
and
34 deletions.
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
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{% macro render_item(item) %} | ||
<url> | ||
<loc>{{item.get_http_url()|safe}}</loc> | ||
<lastmod>{{item.available_at.strftime("%Y-%m-%d %H:%M:%S")}}</lastmod> | ||
<changefreq>daily</changefreq> | ||
<priority>0.2</priority> | ||
</url> | ||
{% endmacro %} | ||
|
||
<?xml version="1.0" encoding="UTF-8"?> | ||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | ||
{% for item in channels %} | ||
{{ render_item(item) }} | ||
{% endfor %} | ||
{% for item in contents %} | ||
{{ render_item(item) }} | ||
{% endfor %} | ||
</urlset> |
e82340b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1