Skip to content

Commit d9910ad

Browse files
committed
added 404 and link seo improvement
1 parent 38004ed commit d9910ad

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

layouts/404.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{{- define "main" -}}
2+
<div class="FourOhFourCentered">
3+
<h1>Page not found</h1>
4+
<p>Sorry, that page isn't on this site.</p>
5+
<p class="bottom">Please use the navigation menu above, or the <a href="/search">search</a> page to find another page.</p>
6+
</div>
7+
{{- end }}

layouts/partials/head.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
<head>
22
<meta charset="utf-8">
33
<meta name="viewport" content="width=device-width, initial-scale=1">
4-
<title>{{ .Title }}</title>
4+
<title>
5+
{{- if .IsHome -}}
6+
Home | {{ .Site.Title }}
7+
{{- else if .Page.Title -}}
8+
{{ .Page.Title }} | {{ .Site.Title }}
9+
{{- else -}}
10+
{{ .Site.Title }}
11+
{{- end -}}
12+
</title>
513
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
14+
<link rel="canonical" href="{{ .Permalink }}" />
615
{{ partial "style.html" . }}
716
</head>

0 commit comments

Comments
 (0)