Sécuriser et documenter les liens morts
Rend les liens supprimés non cliquables, améliore le rapport des liens morts et accélère la génération du site. Closes #2 Closes #3 Closes #4
This commit is contained in:
@@ -238,10 +238,14 @@
|
||||
<p class="article-origin-link-kicker">À lire avant mon commentaire</p>
|
||||
<p class="article-origin-link-hint">Ce billet n'est qu'une note de lecture. Lisez d'abord la source pour avoir le contexte complet.</p>
|
||||
<p class="article-origin-link-button">
|
||||
<a href="{{ $originURL }}" class="ui-button{{ if $originIsExternal }} link-external{{ end }}"{{ if $originIsExternal }} rel="noreferrer noopener"{{ end }} title="Lire la page d'origine">
|
||||
<span class="article-origin-link-button-label">{{ $originLabel }}</span>
|
||||
<span class="article-origin-link-button-url">{{ $originURL }}</span>
|
||||
</a>
|
||||
{{- $originLinkText := printf "<span class=\"article-origin-link-button-label\">%s</span><span class=\"article-origin-link-button-url\">%s</span>" $originLabel $originURL -}}
|
||||
{{- partial "render/link.html" (dict
|
||||
"Destination" $originURL
|
||||
"Title" "Lire la page d'origine"
|
||||
"Text" $originLinkText
|
||||
"Class" "ui-button article-origin-link-button-link"
|
||||
"Page" .
|
||||
) -}}
|
||||
</p>
|
||||
</section>
|
||||
{{- end -}}
|
||||
@@ -262,7 +266,7 @@
|
||||
{{- end -}}
|
||||
{{- with $coverAttribution -}}
|
||||
{{- $attribution := partial "media/parse-attribution.html" . -}}
|
||||
<p class="cover-attribution"><strong>Attribution:</strong> <span>{{- if index $attribution "isURL" -}}<a href="{{ index $attribution "url" }}" class="link-external" title="Lien externe" rel="noreferrer noopener">{{ index $attribution "label" }}</a>{{- else -}}{{ . | markdownify }}{{- end -}}</span></p>
|
||||
<p class="cover-attribution"><strong>Attribution:</strong> <span>{{- if index $attribution "isURL" -}}{{ partial "render/link.html" (dict "Destination" (index $attribution "url") "Page" $ "Text" (index $attribution "label")) }}{{- else -}}{{ . | markdownify }}{{- end -}}</span></p>
|
||||
{{- end -}}
|
||||
{{- with $coverPrompt -}}
|
||||
<details>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
{{- $url := "" -}}
|
||||
{{- $report := partial "external-links-report.html" (dict) -}}
|
||||
{{- $report := partialCached "external-links-report.html" (dict) "default" -}}
|
||||
{{- if reflect.IsMap . -}}
|
||||
{{- with index . "URL" -}}
|
||||
{{- $url = . -}}
|
||||
{{- end -}}
|
||||
{{- with index . "Report" -}}
|
||||
{{- $report = partial "external-links-report.html" (dict "Report" .) -}}
|
||||
{{- $report = . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $entries := default (dict) (index $report "entries") -}}
|
||||
{{- $deadLinks := default (slice) (index $report "links") -}}
|
||||
{{- $deadLinksMap := default (dict) (index $report "linksMap") -}}
|
||||
|
||||
{{- $host := "" -}}
|
||||
{{- with $url -}}
|
||||
@@ -39,11 +39,8 @@
|
||||
|
||||
{{- $deadInfo := dict -}}
|
||||
{{- range $lookupURLs -}}
|
||||
{{- if eq (len $deadInfo) 0 -}}
|
||||
{{- $matches := where $deadLinks "url" . -}}
|
||||
{{- if gt (len $matches) 0 -}}
|
||||
{{- $deadInfo = index $matches 0 -}}
|
||||
{{- end -}}
|
||||
{{- if and (eq (len $deadInfo) 0) (isset $deadLinksMap .) -}}
|
||||
{{- $deadInfo = index $deadLinksMap . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -54,6 +51,16 @@
|
||||
{{- $statusTone := "unknown" -}}
|
||||
{{- $statusLabel := "État inconnu" -}}
|
||||
{{- $statusTitle := "" -}}
|
||||
{{- $statusManual := false -}}
|
||||
|
||||
{{- with index $entry "manualMarked" -}}
|
||||
{{- $statusManual = . -}}
|
||||
{{- end -}}
|
||||
{{- if and (not $statusManual) (gt (len $deadInfo) 0) -}}
|
||||
{{- with index $deadInfo "manualMarked" -}}
|
||||
{{- $statusManual = . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if gt (len $entry) 0 -}}
|
||||
{{- with index $entry "status" -}}
|
||||
@@ -95,7 +102,11 @@
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if gt $statusCode 0 -}}
|
||||
{{- if $statusManual -}}
|
||||
{{- $statusTone = "dead" -}}
|
||||
{{- $statusLabel = "Supprimé" -}}
|
||||
{{- $statusTitle = "Lien marqué comme supprimé dans data/deletions.yaml" -}}
|
||||
{{- else if gt $statusCode 0 -}}
|
||||
{{- if lt $statusCode 400 -}}
|
||||
{{- $statusTone = "ok" -}}
|
||||
{{- $statusLabel = printf "OK %d" $statusCode -}}
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
{{- $report := partial "external-links-report.html" . -}}
|
||||
{{- $report := partialCached "external-links-report.html" (dict "WithLocations" true) "with-locations" -}}
|
||||
{{- $allPages := where site.Pages ".File" "!=" nil -}}
|
||||
{{- $replacements := default (dict) site.Data.replacements -}}
|
||||
{{- $sourceLinks := default (slice) $report.links -}}
|
||||
{{- $links := slice -}}
|
||||
{{- range $sourceLinks -}}
|
||||
{{- if eq (index $replacements .url) nil -}}
|
||||
{{- $manualMarked := false -}}
|
||||
{{- with index . "manualMarked" -}}
|
||||
{{- $manualMarked = . -}}
|
||||
{{- end -}}
|
||||
{{- if or $manualMarked (eq (index $replacements .url) nil) -}}
|
||||
{{- $links = $links | append . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $links = sort $links "url" -}}
|
||||
{{- $generatedLabel := "" -}}
|
||||
{{- with $report.generatedAt -}}
|
||||
{{- $generatedLabel = (time .).Format "02/01/2006" -}}
|
||||
@@ -33,7 +38,13 @@
|
||||
{{- range $links -}}
|
||||
<tr>
|
||||
<td>
|
||||
{{- $manualMarked := false -}}
|
||||
{{- with index . "manualMarked" -}}
|
||||
{{- $manualMarked = . -}}
|
||||
{{- end -}}
|
||||
{{- $locations := default (slice) .locations -}}
|
||||
{{- $seenLocations := dict -}}
|
||||
{{- $hasRenderedLocation := false -}}
|
||||
{{- if gt (len $locations) 0 -}}
|
||||
{{- range $locations -}}
|
||||
{{- $file := "" -}}
|
||||
@@ -66,22 +77,41 @@
|
||||
{{- $matchedPage = index $candidates 0 -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $locationKey := "unknown" -}}
|
||||
{{- if $matchedPage -}}
|
||||
<a href="{{ $matchedPage.RelPermalink }}">{{ $matchedPage.Title }}</a>
|
||||
{{- $locationKey = printf "page:%s" $matchedPage.Path -}}
|
||||
{{- else if $file -}}
|
||||
<code>{{ $file }}{{ if $line }}:{{ $line }}{{ end }}</code>
|
||||
{{- $locationKey = printf "file:%s" $file -}}
|
||||
{{- else if $pagePath -}}
|
||||
<code>{{ $pagePath }}</code>
|
||||
{{- else -}}
|
||||
<em>Emplacement inconnu</em>
|
||||
{{- $locationKey = printf "path:%s" $pagePath -}}
|
||||
{{- end -}}
|
||||
{{- if not (isset $seenLocations $locationKey) -}}
|
||||
{{- $seenLocations = merge $seenLocations (dict $locationKey true) -}}
|
||||
{{- $hasRenderedLocation = true -}}
|
||||
{{- if $matchedPage -}}
|
||||
<a href="{{ $matchedPage.RelPermalink }}">{{ $matchedPage.Title }}</a>
|
||||
{{- else if $file -}}
|
||||
<code>{{ $file }}{{ if $line }}:{{ $line }}{{ end }}</code>
|
||||
{{- else if $pagePath -}}
|
||||
<code>{{ $pagePath }}</code>
|
||||
{{- else -}}
|
||||
<em>Emplacement inconnu</em>
|
||||
{{- end -}}
|
||||
<br>
|
||||
{{- end -}}
|
||||
<br>
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- end -}}
|
||||
{{- if not $hasRenderedLocation -}}
|
||||
<em>Emplacements inconnus</em>
|
||||
{{- end -}}
|
||||
</td>
|
||||
<td><a href="{{ .url }}" rel="noreferrer noopener" target="_blank">{{ .url }}</a></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>
|
||||
{{- 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>
|
||||
{{- end -}}
|
||||
</td>
|
||||
<td>{{ with .code }}<code>{{ . }}</code>{{ end }}</td>
|
||||
<td>{{ with .statusText }}<code>{{ . }}</code>{{ end }}</td>
|
||||
</tr>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{{- $excludeInterestingLinks := false -}}
|
||||
{{- $groupBySubSections := false -}}
|
||||
{{- $subSections := slice -}}
|
||||
{{- $externalLinksReport := partial "external-links-report.html" (dict) -}}
|
||||
{{- $externalLinksReport := partialCached "external-links-report.html" (dict) "default" -}}
|
||||
{{- with $context -}}
|
||||
{{- if eq (strings.TrimSuffix "/" .RelPermalink) "/interets" -}}
|
||||
{{- $excludeInterestingLinks = true -}}
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
<div class="figure-media-meta-extra">
|
||||
{{- with $data.attribution -}}
|
||||
{{- $attribution := partial "media/parse-attribution.html" . -}}
|
||||
<p class="figure-attribution cover-attribution"><strong>Attribution :</strong> <span>{{- if index $attribution "isURL" -}}<a href="{{ index $attribution "url" }}" class="link-external" title="Lien externe" rel="noreferrer noopener">{{ index $attribution "label" }}</a>{{- else -}}{{ . | markdownify }}{{- end -}}</span></p>
|
||||
<p class="figure-attribution cover-attribution"><strong>Attribution :</strong> <span>{{- if index $attribution "isURL" -}}{{ partial "render/link.html" (dict "Destination" (index $attribution "url") "Page" $.Page "Text" (index $attribution "label")) }}{{- else -}}{{ . | markdownify }}{{- end -}}</span></p>
|
||||
{{- end -}}
|
||||
{{- with $data.prompt -}}
|
||||
<details>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{{- $destination := .Destination -}}
|
||||
{{- if hasPrefix $destination "~~" -}}
|
||||
{{- $destination = replaceRE "^~~" "" $destination -}}
|
||||
{{- $destination = replaceRE "~~([/?#]|$)" "$1" $destination -}}
|
||||
{{- if strings.Contains $destination "~~" -}}
|
||||
{{- $destination = replace $destination "~~" "" -}}
|
||||
{{- end -}}
|
||||
{{- $isExternal := or (strings.HasPrefix $destination "http://") (strings.HasPrefix $destination "https://") -}}
|
||||
{{- $host := "" -}}
|
||||
@@ -17,12 +16,41 @@
|
||||
{{- end -}}
|
||||
{{- $page := .Page -}}
|
||||
{{- $site := $page.Site -}}
|
||||
{{- $deletions := partialCached "deletions-lookup.html" (dict) "default" -}}
|
||||
{{- $replacements := default (dict) $site.Data.replacements -}}
|
||||
{{- $aff := index $site.Data.affiliates.sites $host -}}
|
||||
{{- $isAffiliated := false -}}
|
||||
{{- $newURL := $destination -}}
|
||||
{{- $replacementURL := index $replacements $destination -}}
|
||||
{{- $hasReplacement := ne $replacementURL nil -}}
|
||||
{{- $lookupURLs := slice $destination -}}
|
||||
{{- with $destination -}}
|
||||
{{- if strings.HasSuffix . "/" -}}
|
||||
{{- $withoutSlash := strings.TrimSuffix "/" . -}}
|
||||
{{- if ne $withoutSlash . -}}
|
||||
{{- $lookupURLs = $lookupURLs | append $withoutSlash -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- $lookupURLs = $lookupURLs | append (printf "%s/" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $isDeleted := false -}}
|
||||
{{- range $lookupURLs -}}
|
||||
{{- if and (not $isDeleted) (isset $deletions .) -}}
|
||||
{{- $isDeleted = true -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $replacementURL := "" -}}
|
||||
{{- $hasReplacement := false -}}
|
||||
{{- if not $isDeleted -}}
|
||||
{{- range $lookupURLs -}}
|
||||
{{- if not $hasReplacement -}}
|
||||
{{- $candidateReplacementURL := index $replacements . -}}
|
||||
{{- if ne $candidateReplacementURL nil -}}
|
||||
{{- $replacementURL = $candidateReplacementURL -}}
|
||||
{{- $hasReplacement = true -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $customClass := "" -}}
|
||||
|
||||
{{- if reflect.IsMap . -}}
|
||||
@@ -44,6 +72,18 @@
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $newHost := "" -}}
|
||||
{{- if and $isExternal (gt (len (findRE "^https?://[^[:space:]]+$" $newURL 1)) 0) -}}
|
||||
{{- $newParsed := urls.Parse $newURL -}}
|
||||
{{- $newHost = lower $newParsed.Host -}}
|
||||
{{- end -}}
|
||||
{{- $isArchiveLink := false -}}
|
||||
{{- if and $isExternal (ne $newHost "") -}}
|
||||
{{- if or (eq $newHost "archive.org") (strings.HasSuffix $newHost ".archive.org") -}}
|
||||
{{- $isArchiveLink = true -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $internalPage := "" -}}
|
||||
{{- $internalPageFound := false -}}
|
||||
{{- if not $isExternal -}}
|
||||
@@ -66,15 +106,22 @@
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $report := partial "external-links-report.html" (dict) -}}
|
||||
{{- $deadList := default (slice) (index $report "links") -}}
|
||||
{{- $report := partialCached "external-links-report.html" (dict) "default" -}}
|
||||
{{- $entriesMap := default (dict) (index $report "entries") -}}
|
||||
{{- $cacheEntry := index $entriesMap $destination -}}
|
||||
{{- $deadLinksMap := default (dict) (index $report "linksMap") -}}
|
||||
{{- $cacheEntry := dict -}}
|
||||
{{- range $lookupURLs -}}
|
||||
{{- if and (eq (len $cacheEntry) 0) (isset $entriesMap .) -}}
|
||||
{{- $cacheEntry = index $entriesMap . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $deadInfo := dict -}}
|
||||
{{- $isDeadLink := false -}}
|
||||
{{- with (first 1 (where $deadList "url" $destination)) -}}
|
||||
{{- $deadInfo = index . 0 -}}
|
||||
{{- $isDeadLink = true -}}
|
||||
{{- range $lookupURLs -}}
|
||||
{{- if and (not $isDeadLink) (isset $deadLinksMap .) -}}
|
||||
{{- $deadInfo = index $deadLinksMap . -}}
|
||||
{{- $isDeadLink = true -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $deadStatus := "" -}}
|
||||
{{- with (index $deadInfo "status") -}}
|
||||
@@ -89,6 +136,15 @@
|
||||
{{- if and $isDeadLink (eq $deadStatus "404") -}}
|
||||
{{- $isConfirmedDeadLink = true -}}
|
||||
{{- end -}}
|
||||
{{- $isMarkedDeadLink := false -}}
|
||||
{{- with (index $deadInfo "manualMarked") -}}
|
||||
{{- $isMarkedDeadLink = . -}}
|
||||
{{- end -}}
|
||||
{{- if not $isMarkedDeadLink -}}
|
||||
{{- with (index $cacheEntry "manualMarked") -}}
|
||||
{{- $isMarkedDeadLink = . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $titleParts := slice -}}
|
||||
{{- if $isAffiliated -}}
|
||||
@@ -96,6 +152,9 @@
|
||||
{{- else if $isExternal -}}
|
||||
{{- $titleParts = $titleParts | append "Lien externe" -}}
|
||||
{{- end -}}
|
||||
{{- if $isArchiveLink -}}
|
||||
{{- $titleParts = $titleParts | append "Internet Archive" -}}
|
||||
{{- end -}}
|
||||
{{- if and (not $isExternal) $internalPageFound -}}
|
||||
{{- $internalTitle := $internalPage.LinkTitle | default $internalPage.Title -}}
|
||||
{{- with $internalPage.Date -}}
|
||||
@@ -109,6 +168,9 @@
|
||||
{{- end -}}
|
||||
{{- if $isDeadLink -}}
|
||||
{{- $deadDetails := slice -}}
|
||||
{{- if $isMarkedDeadLink -}}
|
||||
{{- $deadDetails = $deadDetails | append "supprimé" -}}
|
||||
{{- end -}}
|
||||
{{- with (index $cacheEntry "checkedAt") -}}
|
||||
{{- $deadDetails = $deadDetails | append (printf "inaccessible depuis le %s" (time.Format "02/01/2006" (time .))) -}}
|
||||
{{- end -}}
|
||||
@@ -116,7 +178,10 @@
|
||||
{{- $deadDetails = $deadDetails | append (printf "raison %s" .) -}}
|
||||
{{- end -}}
|
||||
{{- with (index $deadInfo "status") -}}
|
||||
{{- $deadDetails = $deadDetails | append (printf "statut %v" .) -}}
|
||||
{{- $statusLabel := printf "%v" . -}}
|
||||
{{- if not (and $isMarkedDeadLink (or (eq $statusLabel "manual") (eq $statusLabel "deleted"))) -}}
|
||||
{{- $deadDetails = $deadDetails | append (printf "statut %s" $statusLabel) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if gt (len $deadDetails) 0 -}}
|
||||
{{- $titleParts = $titleParts | append (printf "(%s)" (delimit $deadDetails " ; ")) -}}
|
||||
@@ -134,11 +199,17 @@
|
||||
{{- if $isAffiliated -}}
|
||||
{{- $linkClasses = $linkClasses | append "link-affiliated" -}}
|
||||
{{- end -}}
|
||||
{{- if $isArchiveLink -}}
|
||||
{{- $linkClasses = $linkClasses | append "link-archive" -}}
|
||||
{{- end -}}
|
||||
{{- if $isDeadLink -}}
|
||||
{{- $linkClasses = $linkClasses | append "link-dead" -}}
|
||||
{{- if $isConfirmedDeadLink -}}
|
||||
{{- $linkClasses = $linkClasses | append "link-dead-404" -}}
|
||||
{{- end -}}
|
||||
{{- if $isMarkedDeadLink -}}
|
||||
{{- $linkClasses = $linkClasses | append "link-dead-marked" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- with $customClass -}}
|
||||
{{- range (split . " ") -}}
|
||||
@@ -148,4 +219,10 @@
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $classValue := delimit $linkClasses " " -}}
|
||||
<a href="{{- $newURL -}}"{{ with $classValue }} class="{{- . -}}"{{ end }}{{ with $titleValue }} title="{{- . -}}"{{ end }}{{ if $isExternal }} rel="noreferrer noopener"{{ end }}>{{- strings.TrimSpace .Text | safeHTML -}}</a>{{- "" -}}
|
||||
{{- 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>
|
||||
{{- else -}}
|
||||
<a href="{{- $newURL -}}"{{ with $classValue }} class="{{- . -}}"{{ end }}{{ with $titleValue }} title="{{- . -}}"{{ end }}{{ if $isExternal }} rel="noreferrer noopener"{{ end }}>{{- strings.TrimSpace .Text | safeHTML -}}</a>
|
||||
{{- end -}}{{- "" -}}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
{{- with $attribution -}}
|
||||
{{- $figureAttribution := partial "media/parse-attribution.html" . -}}
|
||||
<div class="figure-media-meta-extra">
|
||||
<p class="figure-attribution cover-attribution"><strong>Attribution :</strong> <span>{{- if index $figureAttribution "isURL" -}}<a href="{{ index $figureAttribution "url" }}" class="link-external" title="Lien externe" rel="noreferrer noopener">{{ index $figureAttribution "label" }}</a>{{- else -}}{{ . | markdownify }}{{- end -}}</span></p>
|
||||
<p class="figure-attribution cover-attribution"><strong>Attribution :</strong> <span>{{- if index $figureAttribution "isURL" -}}{{ partial "render/link.html" (dict "Destination" (index $figureAttribution "url") "Page" $.Page "Text" (index $figureAttribution "label")) }}{{- else -}}{{ . | markdownify }}{{- end -}}</span></p>
|
||||
</div>
|
||||
{{- end -}}
|
||||
</figcaption>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
{{- with $data.description -}}<p>{{ . | markdownify }}</p>{{- end -}}
|
||||
{{- with $data.attribution -}}
|
||||
{{- $attribution := partial "media/parse-attribution.html" . -}}
|
||||
<p><strong>Attribution :</strong> <em>{{- if index $attribution "isURL" -}}<a href="{{ index $attribution "url" }}" class="link-external" title="Lien externe" rel="noreferrer noopener">{{ index $attribution "label" }}</a>{{- else -}}{{ . | markdownify }}{{- end -}}</em></p>
|
||||
<p><strong>Attribution :</strong> <em>{{- if index $attribution "isURL" -}}{{ partial "render/link.html" (dict "Destination" (index $attribution "url") "Page" $.Page "Text" (index $attribution "label")) }}{{- else -}}{{ . | markdownify }}{{- end -}}</em></p>
|
||||
{{- end -}}
|
||||
</figcaption>
|
||||
{{- end -}}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<div class="figure-media-meta-extra">
|
||||
{{- with $data.attribution -}}
|
||||
{{- $attribution := partial "media/parse-attribution.html" . -}}
|
||||
<p class="figure-attribution cover-attribution"><strong>Attribution :</strong> <span>{{- if index $attribution "isURL" -}}<a href="{{ index $attribution "url" }}" class="link-external" title="Lien externe" rel="noreferrer noopener">{{ index $attribution "label" }}</a>{{- else -}}{{ . | markdownify }}{{- end -}}</span></p>
|
||||
<p class="figure-attribution cover-attribution"><strong>Attribution :</strong> <span>{{- if index $attribution "isURL" -}}{{ partial "render/link.html" (dict "Destination" (index $attribution "url") "Page" $.Page "Text" (index $attribution "label")) }}{{- else -}}{{ . | markdownify }}{{- end -}}</span></p>
|
||||
{{- end -}}
|
||||
{{- with $data.prompt -}}
|
||||
<details>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
{{- $recettesRoot := $site.GetPage "/interets/recettes" -}}
|
||||
{{- $collectionsRoot := $site.GetPage "/collections" -}}
|
||||
{{- $critiquesRoot := $site.GetPage "/critiques" -}}
|
||||
{{- $externalLinksReport := partial "external-links-report.html" (dict) -}}
|
||||
{{- $externalLinksReport := partialCached "external-links-report.html" (dict) "default" -}}
|
||||
|
||||
{{- partial "hero.html" . -}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user