Syfony Simple Sitemap
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
<?xml version="1.0" encoding="UTF-8"?> | |
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | |
{% for url in urls %} | |
<url>{# check if hostname is not alreay in url#} | |
<loc>http://{%if url.loc|replace({hostname:''}) == url.loc%}{{hostname}}{{url.loc}}{%else%}{{url.loc}}{%endif%}</loc> | |
{% if url.lastmod is defined %} | |
<lastmod>{{url.lastmod}}</lastmod> | |
{% endif %} | |
{% if url.changefreq is defined %} | |
<changefreq>{{url.changefreq}}</changefreq> | |
{% endif %} | |
{% if url.priority is defined %} | |
<priority>{{url.priority}}</priority> | |
{% endif %} | |
</url> | |
{% endfor %} | |
</urlset> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment