Remove newlines and show the actual hostname in the embed in error page

This commit is contained in:
BBaoVanC 2021-09-25 15:24:29 -05:00
parent 36351cba70
commit f13cd0ba64
1 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,7 @@
{{ $code := placeholder "http.error.status_code" }}
{{ $text := placeholder "http.error.status_text" }}
{{ $img_url := (printf "https://errors.boba.best/%s.jpg" $code) }}
{{ $code := placeholder "http.error.status_code" -}}
{{ $text := placeholder "http.error.status_text" -}}
{{ $host := placeholder "http.request.host" -}}
{{ $img_url := (printf "https://errors.boba.best/%s.jpg" $code) -}}
<html>
<head>
<title>{{ $code }} {{ $text }}</title>
@ -11,7 +12,7 @@
<meta property="og:title" content="{{ $code }} {{ $text }}" />
<meta property="og:description" content="{{ $code }} {{ $text }}" />
<meta property="og:image" content="{{ $img_url }}"/>
<meta property="og:site_name" content="boba.best" />
<meta property="og:site_name" content="{{ $host }}" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:image" content="{{ $img_url }}"/>