Skip to content

Commit 333817f

Browse files
committed
Merge branch 'master' of https://github.com/Cecilapp/Cecil
2 parents a9f0bab + e5df854 commit 333817f

File tree

5 files changed

+94
-8
lines changed

5 files changed

+94
-8
lines changed

config/base.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@
5959
'excluded' => true,
6060
'multilingual' => false,
6161
],
62+
'xsl/sitemap' => [
63+
'path' => 'xsl/sitemap',
64+
'layout' => 'sitemap',
65+
'output' => 'xsl',
66+
'uglyurl' => true,
67+
'published' => true,
68+
'excluded' => true,
69+
],
6270
'xsl/atom' => [
6371
'path' => 'xsl/atom',
6472
'layout' => 'feed',

resources/layouts/_default/sitemap.xml.twig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
1+
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2+
{%- if site.page('xsl/sitemap') ~%}
3+
<?xml-stylesheet type="text/xsl" href="{{ url('xsl/sitemap') }}" media="all"?>
4+
{%- endif ~%}
25
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
36
xmlns:xhtml="http://www.w3.org/1999/xhtml"
47
xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9" version="3.0">
3+
<xsl:output method="html" version="1.0" encoding="utf-8" indent="yes" />
4+
<xsl:template match="/">
5+
<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ site.language }}">
6+
<head>
7+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8+
<meta name="viewport" content="width=device-width" />
9+
<title>Sitemap - {{ site.title }}</title>
10+
<style type="text/css">
11+
html {
12+
margin: 0;
13+
padding: 0;
14+
}
15+
body {
16+
margin: 1rem auto;
17+
padding: 1rem;
18+
max-width: 40rem;
19+
background-color: #EFF0F4;
20+
color: #586069;
21+
font-family: Helvetica, Arial, sans-serif;
22+
font-size: 1rem;
23+
line-height: 1.5rem;
24+
}
25+
input {
26+
min-width: 100%;
27+
margin-left: .2rem;
28+
padding-left: .2rem;
29+
padding-right: .2rem;
30+
}
31+
ol {
32+
margin-left: -1.5rem;
33+
}
34+
li {
35+
margin: 0;
36+
}
37+
a {
38+
color: #0366d6;
39+
text-decoration: none;
40+
}
41+
@media (min-width: 768px) {
42+
input {
43+
min-width: 20rem;
44+
}
45+
}
46+
</style>
47+
</head>
48+
<body>
49+
{%- set url -%}
50+
<a href="{{ url(site.home, {'canonical': true}) }}">{{ site.title }}</a>
51+
{%- endset ~%}
52+
<h1>{% trans %}List of URLs for %url%:{% endtrans %}</h1>
53+
<form>
54+
<label for="feed-url">{% trans %}Sitemap URL:{% endtrans %}</label>
55+
<input id="feed-url" onClick="this.select();">
56+
<xsl:attribute name="type">url</xsl:attribute>
57+
<xsl:attribute name="url">URL</xsl:attribute>
58+
<xsl:attribute name="spellcheck">false</xsl:attribute>
59+
<xsl:attribute name="value">{{ url('sitemap.xml', {'canonical': true}) }}</xsl:attribute>
60+
</input>
61+
</form>
62+
<ol>
63+
<xsl:for-each select="sitemap:urlset/sitemap:url">
64+
<li><code><xsl:value-of select="sitemap:loc" /></code> (<xsl:value-of select="sitemap:lastmod" />)</li>
65+
</xsl:for-each>
66+
</ol>
67+
</body>
68+
</html>
69+
</xsl:template>
70+
</xsl:stylesheet>
136 Bytes
Binary file not shown.

resources/translations/messages.fr.po

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
msgid ""
22
msgstr ""
33
"Project-Id-Version: \n"
4-
"POT-Creation-Date: 2024-12-01 03:32+0100\n"
5-
"PO-Revision-Date: 2024-12-01 03:32+0100\n"
6-
"Last-Translator: Arnaud Ligny <arnaud@ligny.org>\n"
4+
"POT-Creation-Date: 2025-10-15 13:53+0200\n"
5+
"PO-Revision-Date: 2025-10-15 13:53+0200\n"
6+
"Last-Translator: Arnaud Ligny <arnaud@ligny.fr>\n"
77
"Language-Team: \n"
88
"Language: fr\n"
99
"MIME-Version: 1.0\n"
@@ -47,7 +47,7 @@ msgstr "Entrées du flux"
4747
msgid "Feed generated by %generated_by%"
4848
msgstr "Flux généré par %generated_by%"
4949

50-
#: _default/page.html.twig:171
50+
#: _default/page.html.twig:184
5151
msgid "Powered by %powered_by%"
5252
msgstr "Propulsé par %powered_by%"
5353

@@ -59,13 +59,18 @@ msgstr "Redirection…"
5959
msgid "Click here if you are not redirected."
6060
msgstr "Cliquez ici si vous n'êtes pas redirigé automatiquement."
6161

62+
#: _default/sitemap.xsl.twig:52
63+
msgid "List of URLs for %url%:"
64+
msgstr "Liste des URL pour %url% :"
65+
66+
#: _default/sitemap.xsl.twig:54
67+
msgid "Sitemap URL:"
68+
msgstr "URL du Sitemap :"
69+
6270
#: partials/paginator.html.twig:5 partials/paginator.html.twig:7
6371
msgid "Previous"
6472
msgstr "Précédent"
6573

6674
#: partials/paginator.html.twig:10 partials/paginator.html.twig:12
6775
msgid "Next"
6876
msgstr "Suivant"
69-
70-
#~ msgid "What is a feed? (a.k.a. RSS)"
71-
#~ msgstr "Qu’est-ce qu’un flux ? (alias RSS)"

0 commit comments

Comments
 (0)