templates: add title tags
Sun, 18 Dec 2022
5 files changed,
14 insertions(+),
0 deletions(-)
M
routes/routes.go
@@ -173,6 +173,7 @@ data := make(map[string]any)
data["name"] = name data["ref"] = ref data["desc"] = getDescription(path) + data["path"] = treePath d.showFile(contents, data, w) return
M
templates/file.html
@@ -1,6 +1,7 @@
{{ define "file" }} <html> {{ template "head" . }} + <title>{{.name }} — {{ .path }}</title> {{ template "repoheader" . }} <body>
M
templates/index.html
@@ -2,6 +2,10 @@ {{ define "index" }}
<html> {{ template "head" . }} + <title> + {{ .meta.Title }} + </title> + <header> <h1>{{ .meta.Title }}</h1> <h2>{{ .meta.Description }}</h2>
… and 2 more changed files not shown in this preview