commit fonctionne ou pas ?

This commit is contained in:
val
2022-11-30 17:27:28 +01:00
commit e9dd38c3a8
3397 changed files with 593718 additions and 0 deletions
@@ -0,0 +1,31 @@
{% extends 'partials/base.html.twig' %}
{% block content %}
{% set language = grav.language %}
{% set lang = language.enabled ? (language.active ?: language.default) : null %}
{% set count = 1 %}
<table class="sitemap">
<thead>
<tr>
<th>#</th>
<th>{{ 'PLUGIN_SITEMAP.TITLE_TITLE'|t }}</th>
<th>{{ 'PLUGIN_SITEMAP.TITLE_LOCATION'|t }}</th>
<th>{{ 'PLUGIN_SITEMAP.TITLE_LASTMOD'|t }}</th>
</tr>
</thead>
<tbody>
{% for entry in sitemap %}
{% if lang is null or entry.lang == lang %}
<tr>
<td>{{ count }}</td>
<td><a href="{{ entry.location }}">{{ entry.title ?: 'PLUGIN_SITEMAP.UNTITLED'|t }}</a></td>
<td><a href="{{ entry.location }}">{{ entry.location }}</a></td>
<td>{{ entry.lastmod }}</td>
</tr>
{% set count = count + 1 %}
{% endif %}
{% endfor %}
</tbody>
</table>
{% endblock %}
@@ -0,0 +1 @@
{{ (sort_sitemap_entries_by_language()|json_encode|raw) }}
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="{{ uri.rootUrl }}/user/plugins/sitemap/sitemap.xsl"?>
<urlset xmlns="{{ config.plugins.sitemap.urlset }}"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
{% for entry in sitemap %}
<url>
<loc>{{ entry.location|e }}</loc>
{% for hreflang in entry.hreflangs %}
<xhtml:link rel="alternate" hreflang="{{ hreflang.hreflang }}" href="{{ hreflang.href }}" />
{% endfor %}
{% if entry.lastmod %}
<lastmod>{{ entry.lastmod }}</lastmod>
{% endif %}
{% if entry.changefreq %}
<changefreq>{{ entry.changefreq }}</changefreq>
{% endif %}
{% if entry.priority %}
<priority>{{ entry.priority|number_format(1) }}</priority>
{% endif %}
{% for image in entry.images %}
<image:image>
{% if image.loc %}
<image:loc>{{ url(image.loc, true) }}</image:loc>
{% endif %}
{% if image.caption %}
<image:caption>{{ image.caption }}</image:caption>
{% endif %}
{% if image.geoloc %}
<image:geo_location>{{ image.geoloc }}</image:geo_location>
{% endif %}
{% if image.title %}
<image:title>{{ image.title }}</image:title>
{% endif %}
{% if image.license %}
<image:license>{{ image.license }}</image:license>
{% endif %}
</image:image>
{% endfor %}
</url>
{% endfor %}
</urlset>