-
Notifications
You must be signed in to change notification settings - Fork 1
/
sitemap-img.xml
31 lines (31 loc) · 1.22 KB
/
sitemap-img.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
layout: null
sitemap:
exclude: 'yes'
og:
exclude: 'yes'
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
{% assign thres = "1455656400" %}
{% for post in site.posts %}
{% unless post.published == false %}
{% capture posttime %}{{ post.date | date: '%s'}}{% endcapture %}
<url>
<loc>{{ site.url }}{{ post.url }}</loc>
<image:image>
{% if posttime < thres %}
<image:loc>https://res.cloudinary.com/dxfoto-ru/t_large/{{post.date | date: "%Y"}}/{{post.date | date: "%m"}}/{{post.date | date: "%Y-%m-%d"}}.jpg</image:loc>
{% else %}
<image:loc>https://img.dxfoto.ru/l/{{post.date | date: "%Y"}}/{{post.date | date: "%m"}}/{{post.date | date: "%Y-%m-%d"}}.jpg</image:loc>
{% endif %}
<image:caption>{{ post.content | markdownify | strip_html }}</image:caption>
<image:geo_location>{{ post.location }}</image:geo_location>
<image:title>{{ post.title }}</image:title>
<image:license>https://creativecommons.org/licenses/by/4.0/</image:license>
</image:image>
</url>
{% endunless %}
{% endfor %}
</urlset>