Skip to content

Commit

Permalink
replace yyyy by YYYY
Browse files Browse the repository at this point in the history
  • Loading branch information
aloxe committed Sep 13, 2024
1 parent d4efba5 commit d1c0cdc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/layouts/macros/title.njk
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<a href="{{url}}">{{post.data.short or post.data.title}}</a>
{% endif %}
{% if post.data.date and url === post.data.date.split("-").join('') %} {# articles #}
{# .split("-").join('') | date("yyyy-MM") %} #}
{# .split("-").join('') | date("YYYY-MM") %} #}
<a href="/{{ post.data.title | slugify }}/">{{ post.data.title }}</a>
{% endif %}
{% endfor %}
Expand Down
10 changes: 5 additions & 5 deletions src/layouts/sitemap.njk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{%- for item in collections.article %}
<url>
<loc>{{ item.url | absoluteUrl(meta.url) }}</loc>
<lastmod>{{ item.date | date("yyyy-MM-dd")}}</lastmod>
<lastmod>{{ item.date | date("YYYY-MM-dd")}}</lastmod>
<changefreq>{{ item.data.sitemapChangefreq | default("monthly") }}</changefreq>
<priority>{{ item.data.sitemapPriority | default(0.8) }}</priority>
</url>
Expand All @@ -14,23 +14,23 @@
{%- if item.url.split("/")[1] === "" %}
<url>
<loc>{{ item.url | absoluteUrl(meta.url) }}</loc>
<lastmod>{{ item.date | date("yyyy-MM-dd")}}</lastmod>
<lastmod>{{ item.date | date("YYYY-MM-dd")}}</lastmod>
<changefreq>{{ item.data.sitemapChangefreq | default("weekly") }}</changefreq>
<priority>{{ item.data.sitemapPriority | default(0.8) }}</priority>
</url>
{%- endif -%}
{%- if item.url.split("/")[1] === "decouverte" %}
<url>
<loc>{{ item.url | absoluteUrl(meta.url) }}</loc>
<lastmod>{{ item.date | date("yyyy-MM-dd")}}</lastmod>
<lastmod>{{ item.date | date("YYYY-MM-dd")}}</lastmod>
<changefreq>{{ item.data.sitemapChangefreq | default("yearly") }}</changefreq>
<priority>{{ item.data.sitemapPriority | default(0.7) }}</priority>
</url>
{%- endif -%}
{%- if item.url.split("/")[1] === "liens" %}
<url>
<loc>{{ item.url | absoluteUrl(meta.url) }}</loc>
<lastmod>{{ item.date | date("yyyy-MM-dd")}}</lastmod>
<lastmod>{{ item.date | date("YYYY-MM-dd")}}</lastmod>
<changefreq>{{ item.data.sitemapChangefreq | default("monthly") }}</changefreq>
<priority>{{ item.data.sitemapPriority | default(0.5) }}</priority>
</url>
Expand All @@ -41,7 +41,7 @@
{%- set snipeturl = "/"+categoryUrl(item.slug) | trim %}
<url>
<loc>{{ snipeturl | absoluteUrl(meta.url) }}</loc>
<lastmod>{{ page.date | date("yyyy-MM-dd")}}</lastmod>
<lastmod>{{ page.date | date("YYYY-MM-dd")}}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.3</priority>
</url>
Expand Down

0 comments on commit d1c0cdc

Please sign in to comment.