1

Correction pour validation HTML + CSS + RSS

This commit is contained in:
2026-04-04 23:27:51 +02:00
parent fdc3b58ce0
commit 7b288f6bc2
32 changed files with 496 additions and 229 deletions

View File

@@ -225,7 +225,7 @@
<p class="article-publication">
{{ with $page.Date }}
{{- $timePart := . | time.Format "15:04:05" -}}
<time datetime="{{ . }}">
<time datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}">
{{- if eq $timePart "00:00:00" -}}
{{ . | time.Format "02/01/2006" }}
{{- else -}}

View File

@@ -156,7 +156,7 @@
{{- if $showInterestingLinksMeta -}}
<footer class="external-link-meta">
<p>
{{- with $page.Date -}}<time datetime="{{ . }}">{{ . | time.Format "02/01/2006" }}</time>{{- end -}}
{{- with $page.Date -}}<time datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}">{{ . | time.Format "02/01/2006" }}</time>{{- end -}}
{{- if and $page.Date $originHost -}}<span>·</span>{{- end -}}
{{- with $originHost -}}
{{- if $originLink -}}
@@ -168,13 +168,13 @@
</p>
<p>
<strong data-state="{{ $statusTone }}"{{ with $statusTitle }} title="{{ . }}"{{ end }}>{{ $statusLabel }}</strong>
{{- with $statusChecked -}}<span>·</span><time datetime="{{ . }}">Vérifié {{ . | time.Format "02/01/2006" }}</time>{{- end -}}
{{- with $statusChecked -}}<span>·</span><time datetime="{{ time.Format "2006-01-02T15:04:05Z07:00" (time .) }}">Vérifié {{ . | time.Format "02/01/2006" }}</time>{{- end -}}
</p>
</footer>
{{- else -}}
<p>
{{- with $page.Date -}}
<time datetime="{{ . }}">{{ . | time.Format "02/01/2006" }}</time>
<time datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}">{{ . | time.Format "02/01/2006" }}</time>
{{- end -}}
{{- if $showSection -}}
{{- with $page.Parent -}}

View File

@@ -107,9 +107,9 @@
</td>
<td>
{{- if $manualMarked -}}
<del class="link-dead link-dead-marked"><span class="link-dead link-dead-marked" title="URL d'origine : {{ .url }}" aria-label="Lien supprimé. URL d'origine : {{ .url }}">{{ .url }}</span></del>
<del class="link-dead link-dead-marked"><span class="link-dead link-dead-marked" title="URL d'origine : {{ .url }}">{{ .url }}</span></del>
{{- else -}}
<span class="link-dead{{ if eq (printf "%v" .status) "404" }} link-dead-404{{ end }}" title="URL d'origine : {{ .url }}" aria-label="Lien mort. URL d'origine : {{ .url }}">{{ .url }}</span>
<span class="link-dead{{ if eq (printf "%v" .status) "404" }} link-dead-404{{ end }}" title="URL d'origine : {{ .url }}">{{ .url }}</span>
{{- end -}}
</td>
<td>{{ with .code }}<code>{{ . }}</code>{{ end }}</td>

View File

@@ -1,6 +1,6 @@
<p>
{{ with .Date }}
<time datetime="{{ . }}">{{ . | time.Format "02/01/2006" }}</time>
<time datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}">{{ . | time.Format "02/01/2006" }}</time>
{{ end }}
{{ if ge .ReadingTime 5 }}
<span>{{ .ReadingTime }} min de lecture</span>

View File

@@ -221,8 +221,7 @@
{{- $classValue := delimit $linkClasses " " -}}
{{- if $isMarkedDeadLink -}}
{{- $deadTitleValue := printf "URL d'origine : %s" $destination -}}
{{- $deadAriaLabel := printf "Lien supprimé. URL d'origine : %s" $destination -}}
<del class="link-dead link-dead-marked"><span{{ with $classValue }} class="{{- . -}}"{{ end }} title="{{- $deadTitleValue -}}" aria-label="{{- $deadAriaLabel -}}">{{- strings.TrimSpace .Text | safeHTML -}}</span></del>
<del class="link-dead link-dead-marked"><span{{ with $classValue }} class="{{- . -}}"{{ end }} title="{{- $deadTitleValue -}}">{{- strings.TrimSpace .Text | safeHTML -}}</span></del>
{{- else -}}
<a href="{{- $newURL -}}"{{ with $classValue }} class="{{- . -}}"{{ end }}{{ with $titleValue }} title="{{- . -}}"{{ end }}{{ if $isExternal }} rel="noreferrer noopener"{{ end }}>{{- strings.TrimSpace .Text | safeHTML -}}</a>
{{- end -}}{{- "" -}}

View File

@@ -35,7 +35,7 @@
<span>{{ .Title }}</span>
<span>
{{- with .Date -}}
<time datetime="{{ . }}">{{ . | time.Format "02/01/2006" }}</time>
<time datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}">{{ . | time.Format "02/01/2006" }}</time>
{{- end -}}
{{- if $showSection -}}
{{- with .Parent -}}
@@ -59,7 +59,7 @@
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
<p>
{{- with .Date -}}
<time datetime="{{ . }}">{{ . | time.Format "02/01/2006" }}</time>
<time datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}">{{ . | time.Format "02/01/2006" }}</time>
{{- end -}}
{{- if $showSection -}}
{{- with .Parent -}}

View File

@@ -58,7 +58,7 @@
<header>
<p>
{{- with $page.Date -}}
<time datetime="{{ . }}">{{ . | time.Format "02/01/2006" }}</time>
<time datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}">{{ . | time.Format "02/01/2006" }}</time>
{{- end -}}
</p>
{{- with $dossierFirstPage -}}

View File

@@ -6,7 +6,7 @@
{{- if $video -}}
{{- $hasMeta := or $data.title (or $data.description (or $data.attribution $data.prompt)) -}}
<figure class="figure-media{{ if $hasMeta }} figure-media-with-meta{{ else }} figure-media-without-meta{{ end }}">
<video controls preload="metadata" width="100%">
<video controls preload="metadata">
<source src="{{ $video.RelPermalink }}" type="video/mp4">
Votre navigateur ne prend pas en charge la lecture des videos.
</video>

View File

@@ -204,7 +204,7 @@
{{- end -}}
{{- end -}}
<a href="{{ $page.RelPermalink }}">{{ $page.Title }}</a>
{{- with $page.Date -}}<time datetime="{{ . }}">{{ . | time.Format "02/01/2006" }}</time>{{- end -}}
{{- with $page.Date -}}<time datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}">{{ . | time.Format "02/01/2006" }}</time>{{- end -}}
</li>
{{- end -}}
</ul>
@@ -346,7 +346,7 @@
{{- end -}}
<footer>
<p>
{{- with $page.Date -}}<time datetime="{{ . }}">{{ . | time.Format "02/01/2006" }}</time>{{- end -}}
{{- with $page.Date -}}<time datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}">{{ . | time.Format "02/01/2006" }}</time>{{- end -}}
{{- if and $page.Date $originHost -}}<span>·</span>{{- end -}}
{{- with $originHost -}}
{{- if $originLink -}}
@@ -358,7 +358,7 @@
</p>
<p>
<strong data-state="{{ $statusTone }}"{{ with $statusTitle }} title="{{ . }}"{{ end }}>{{ $statusLabel }}</strong>
{{- with $statusChecked -}}<span>·</span><time datetime="{{ . }}">Vérifié {{ . | time.Format "02/01/2006" }}</time>{{- end -}}
{{- with $statusChecked -}}<span>·</span><time datetime="{{ time.Format "2006-01-02T15:04:05Z07:00" (time .) }}">Vérifié {{ . | time.Format "02/01/2006" }}</time>{{- end -}}
</p>
</footer>
</div>

View File

@@ -40,20 +40,22 @@
<language>{{ site.Language.LanguageCode }}</language>{{ with $authorEmail }}
<managingEditor>{{.}}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with $authorEmail }}
<webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with .Site.Copyright }}
<copyright>{{ . }}</copyright>{{ end }}{{ if gt (len $pages) 0 }}
<copyright>{{ . | htmlUnescape }}</copyright>{{ end }}{{ if gt (len $pages) 0 }}
<lastBuildDate>{{ (index $pages 0).PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{- with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end }}
{{- range $pages }}
{{- $readMoreLink := printf `<p><a href="%s">Continuer la lecture sur mon blog</a></p>` .Permalink -}}
{{- $summary := partial "head/description.html" . -}}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{- with $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }}
<guid>{{ .Permalink }}</guid>
<description>{{ printf "%s%s" .Summary $readMoreLink | transform.XMLEscape | safeHTML }}</description>
{{- with $summary }}
<description>{{ . | transform.XMLEscape | safeHTML }}</description>
{{- end }}
</item>
{{- end }}
</channel>