Back to Hugo

Hugo Server: Error

tpl/tplimpl/embedded/templates/_server/error.html

0.161.1674 B
Original Source

{{ $codeStyle := "dracula" }} {{ highlight .Error "apl" (printf "linenos=false,noclasses=true,style=%s" $codeStyle ) }}


{{ range $i, $e := .Files }} {{ if not .ErrorContext }} {{ continue }} {{ end }} {{ $params := printf "noclasses=true,style=%s,linenos=table,hl_lines=%d,linenostart=%d" $codeStyle (add .ErrorContext.LinesPos 1) (sub .Position.LineNumber .ErrorContext.LinesPos) }} {{ $lexer := .ErrorContext.ChromaLexer | default "go-html-template" }} {{ with .Position }} {{ printf "%s:%d:%d" .Filename .LineNumber .ColumnNumber }}: {{ end }} {{ highlight (delimit .ErrorContext.Lines "\n") $lexer $params }}


{{ end }}

{{ .Version }}

Reload Page