diff --git a/themes/2026/layouts/_partials/dossier-first-page.html b/layouts/partials/dossier-first-page.html similarity index 100% rename from themes/2026/layouts/_partials/dossier-first-page.html rename to layouts/partials/dossier-first-page.html diff --git a/themes/2026/layouts/_partials/external-link-status.html b/layouts/partials/external-link-status.html similarity index 100% rename from themes/2026/layouts/_partials/external-link-status.html rename to layouts/partials/external-link-status.html diff --git a/themes/2026/layouts/_partials/is-dossier-lead.html b/layouts/partials/is-dossier-lead.html similarity index 100% rename from themes/2026/layouts/_partials/is-dossier-lead.html rename to layouts/partials/is-dossier-lead.html diff --git a/themes/2026/layouts/_partials/media/parse-attribution.html b/layouts/partials/media/parse-attribution.html similarity index 100% rename from themes/2026/layouts/_partials/media/parse-attribution.html rename to layouts/partials/media/parse-attribution.html diff --git a/themes/2026/layouts/_partials/media/process-image.html b/layouts/partials/media/process-image.html similarity index 100% rename from themes/2026/layouts/_partials/media/process-image.html rename to layouts/partials/media/process-image.html diff --git a/themes/2026/layouts/_partials/external-links-report.html b/themes/2026/layouts/_partials/external-links-report.html deleted file mode 100644 index 5c2c3ba3..00000000 --- a/themes/2026/layouts/_partials/external-links-report.html +++ /dev/null @@ -1,74 +0,0 @@ -{{- $reportPath := "data/external_links.yaml" -}} -{{- $report := dict -}} - -{{- if reflect.IsMap . -}} - {{- with index . "ReportPath" -}} - {{- $reportPath = . -}} - {{- end -}} - {{- with index . "Report" -}} - {{- $report = . -}} - {{- end -}} -{{- else if . -}} - {{- $report = . -}} -{{- end -}} - -{{- if eq (len $report) 0 -}} - {{- if eq $reportPath "data/external_links.yaml" -}} - {{- with index site.Data "external_links" -}} - {{- $report = . -}} - {{- end -}} - {{- else if fileExists $reportPath -}} - {{- $report = transform.Unmarshal (readFile $reportPath) -}} - {{- end -}} -{{- end -}} - -{{- $sourceLinks := slice -}} -{{- with index $report "deadLinks" -}} - {{- $sourceLinks = . -}} -{{- end -}} -{{- if and (eq (len $sourceLinks) 0) (isset $report "links") -}} - {{- $sourceLinks = default (slice) (index $report "links") -}} -{{- end -}} - -{{- $links := slice -}} -{{- range $sourceLinks -}} - {{- $code := "" -}} - {{- if isset . "code" -}} - {{- $rawCode := index . "code" -}} - {{- if ne $rawCode nil -}} - {{- $code = printf "%v" $rawCode -}} - {{- end -}} - {{- end -}} - {{- $statusText := "" -}} - {{- with index . "statusText" -}} - {{- $statusText = printf "%v" . -}} - {{- end -}} - {{- if eq $statusText "" -}} - {{- with index . "status" -}} - {{- $statusText = printf "%v" . -}} - {{- end -}} - {{- end -}} - {{- $status := "" -}} - {{- with $code -}} - {{- $status = . -}} - {{- end -}} - {{- if and (eq $status "") (ne $statusText "") -}} - {{- $status = $statusText -}} - {{- end -}} - - {{- $links = $links | append (dict - "url" (default "" (index . "url")) - "code" $code - "statusText" $statusText - "status" $status - "locations" (default (slice) (index . "locations")) - "errorType" (default "" (index . "errorType")) - "checkedAt" (default "" (index . "checkedAt")) - ) -}} -{{- end -}} - -{{- return (dict - "generatedAt" (default "" (index $report "generatedAt")) - "entries" (default (dict) (index $report "entries")) - "links" $links -) -}}