Supprime les reliquats du dossier tools
This commit is contained in:
@@ -1,15 +1,4 @@
|
||||
{{- $defaultReportPath := "tools/cache/external_links.yaml" -}}
|
||||
{{- $reportPath := default $defaultReportPath .ReportPath -}}
|
||||
{{- $report := default (dict) .Report -}}
|
||||
{{- if or (eq (len $report) 0) (not (isset $report "links")) -}}
|
||||
{{- if fileExists $reportPath -}}
|
||||
{{- with readFile $reportPath -}}
|
||||
{{- $report = . | unmarshal -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- warnf "Rapport des liens morts introuvable (%s)" $reportPath -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $report := partial "external-links-report.html" . -}}
|
||||
{{- $allPages := where site.Pages ".File" "!=" nil -}}
|
||||
{{- $links := default (slice) $report.links -}}
|
||||
{{- $linkCount := len $links -}}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
{{- $site := $page.Site -}}
|
||||
{{- $aff := index $site.Data.affiliates.sites $host -}}
|
||||
{{- $isAffiliated := false -}}
|
||||
{{- $report := default (dict) (transform.Unmarshal (readFile "tools/cache/external_links.yaml")) -}}
|
||||
{{- $report := partial "external-links-report.html" (dict) -}}
|
||||
{{- $deadList := default (slice) (index $report "links") -}}
|
||||
{{- $entriesMap := default (dict) (index $report "entries") -}}
|
||||
{{- $cacheEntry := index $entriesMap .Destination -}}
|
||||
@@ -78,4 +78,4 @@
|
||||
{{- $relAttr = "noreferrer noopener" -}}
|
||||
{{- end -}}<a href="{{ $newURL }}" title="{{ $titleValue }}" {{- if gt (len $relAttr) 0 -}} rel="{{ $relAttr }}" {{- end
|
||||
-}} {{- if gt (len $classes) 0 -}} class="{{ delimit $classes ` ` }}" {{- end -}}>{{- .Text | safeHTML -}}</a>{{- /*
|
||||
*/ -}}
|
||||
*/ -}}
|
||||
|
||||
Reference in New Issue
Block a user