Affichage des liens morts
This commit is contained in:
@@ -62,6 +62,19 @@
|
||||
{{- $deadInfo = index . 0 -}}
|
||||
{{- $isDeadLink = true -}}
|
||||
{{- end -}}
|
||||
{{- $deadStatus := "" -}}
|
||||
{{- with (index $deadInfo "status") -}}
|
||||
{{- $deadStatus = printf "%v" . -}}
|
||||
{{- end -}}
|
||||
{{- if eq $deadStatus "" -}}
|
||||
{{- with (index $cacheEntry "status") -}}
|
||||
{{- $deadStatus = printf "%v" . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $isConfirmedDeadLink := false -}}
|
||||
{{- if and $isDeadLink (eq $deadStatus "404") -}}
|
||||
{{- $isConfirmedDeadLink = true -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $titleParts := slice -}}
|
||||
{{- if $isAffiliated -}}
|
||||
@@ -104,6 +117,12 @@
|
||||
{{- if $isAffiliated -}}
|
||||
{{- $linkClasses = $linkClasses | append "link-affiliated" -}}
|
||||
{{- end -}}
|
||||
{{- if $isDeadLink -}}
|
||||
{{- $linkClasses = $linkClasses | append "link-dead" -}}
|
||||
{{- if $isConfirmedDeadLink -}}
|
||||
{{- $linkClasses = $linkClasses | append "link-dead-404" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- with $customClass -}}
|
||||
{{- range (split . " ") -}}
|
||||
{{- if ne . "" -}}
|
||||
|
||||
Reference in New Issue
Block a user