73 lines
2.6 KiB
Smarty
73 lines
2.6 KiB
Smarty
{*
|
|
* 2023 Anvanto
|
|
*
|
|
* NOTICE OF LICENSE
|
|
*
|
|
* This source file is subject to the Academic Free License (AFL 3.0)
|
|
*
|
|
* @author Anvanto <anvantoco@gmail.com>
|
|
* @copyright 2023 Anvanto
|
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
|
*}
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
{if isset($anblogsitemap.sitemapLinks)}
|
|
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
{foreach from=$anblogsitemap.sitemapLinks item=$linkMap}
|
|
<sitemap>
|
|
<loc><![CDATA[{$linkMap|escape:'htmlall':'UTF-8'}]]></loc>
|
|
</sitemap>
|
|
{/foreach}
|
|
</sitemapindex>
|
|
{/if}
|
|
{if isset($anblogsitemap.posts) && isset($anblogsitemap.categories)}
|
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
|
|
<url>
|
|
<link>{$anblogsitemap.linkSiteMap|escape:'htmlall':'UTF-8'}</link>
|
|
<priority>1.0</priority>
|
|
<changefreq>daily</changefreq>
|
|
</url>
|
|
{foreach from=$anblogsitemap.posts item=$post}
|
|
<url>
|
|
<loc><![CDATA[{$post.link|escape:'htmlall':'UTF-8'}]]></loc>
|
|
<priority>0.9</priority>
|
|
<lastmod>{$anblogsitemap.lastmod|escape:'htmlall':'UTF-8'}</lastmod>
|
|
<changefreq>daily</changefreq>
|
|
{if $post.preview_url !== ''}
|
|
<image:image>
|
|
<image:loc>
|
|
<![CDATA[{$post.preview_url|escape:'htmlall':'UTF-8'}]]>
|
|
</image:loc>
|
|
<image:caption>
|
|
<![CDATA[{$post.title|escape:'htmlall':'UTF-8'}]]>
|
|
</image:caption>
|
|
<image:title>
|
|
<![CDATA[{$post.title|escape:'htmlall':'UTF-8'}]]>
|
|
</image:title>
|
|
</image:image>
|
|
{/if}
|
|
</url>
|
|
{/foreach}
|
|
{foreach from=$anblogsitemap.categories item=$category}
|
|
<url>
|
|
<loc><![CDATA[{$category.category_link|escape:'htmlall':'UTF-8'}"]]></loc>
|
|
<priority>0.8</priority>
|
|
<lastmod>{$anblogsitemap.lastmod|escape:'htmlall':'UTF-8'}</lastmod>
|
|
<changefreq>daily</changefreq>
|
|
{if $category.thumb !== ''}
|
|
<image:image>
|
|
<image:loc>
|
|
<![CDATA[{$category.thumb|escape:'htmlall':'UTF-8'}"]]>
|
|
</image:loc>
|
|
<image:caption>
|
|
<![CDATA[{$category.title|escape:'htmlall':'UTF-8'}"]]>
|
|
</image:caption>
|
|
<image:title>
|
|
<![CDATA[{$category.title|escape:'htmlall':'UTF-8'}"]]>
|
|
</image:title>
|
|
</image:image>
|
|
{/if}
|
|
</url>
|
|
{/foreach}
|
|
</urlset>
|
|
{/if} |