initial commit

This commit is contained in:
2025-02-19 00:16:57 +01:00
parent 1d9cd91fcd
commit d89698593b
1293 changed files with 55933 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
{{- $pageParam := index .page.Params .param }}
{{- $siteParam := index site.Params .param }}
{{- $applyErrorIgnore := .applyErrorIgnore | default true }}
{{- $errorlevel := or (and $pageParam $pageParam.errorlevel) (and $siteParam $siteParam.errorlevel) }}
{{- $errorignore := slice | append (.page.Params.errorignore | default slice ) | append (site.Params.errorignore | default slice ) }}
{{- if and (eq $errorlevel "warning") (partial "inline/show-error" (dict "errorignore" $errorignore "url" .url "applyErrorIgnore" $applyErrorIgnore)) }}
{{- warnf .msg }}
{{- else if and (eq $errorlevel "error") (partial "inline/show-error" (dict "errorignore" $errorignore "url" .url "applyErrorIgnore" $applyErrorIgnore)) }}
{{- errorf .msg }}
{{- end }}
{{- define "partials/inline/show-error" }}
{{- $ret := true }}
{{- if .applyErrorIgnore }}
{{- range .errorignore }}
{{- if findRE . $.url 1 }}
{{- $ret = false }}
{{- break }}
{{- end }}
{{- end }}
{{- end }}
{{- return $ret }}
{{- end }}