Added a ' - <repo-name>' to the title of html documents, so tabs in web browsers have a unique name

This commit is contained in:
m455 2022-12-14 10:25:24 -05:00
parent f4f877357a
commit f433a6b28a

View file

@ -21,7 +21,7 @@
) )
(define CLONE-URL (or (get-environment-variable "REPO2HTML_CLONE_URL") "git://git.example.com")) (define CLONE-URL (or (get-environment-variable "REPO2HTML_CLONE_URL") "git://git.example.com"))
(define TITLE (or (get-environment-variable "REPO2HTML_TITLE") "my git repositories")) (define TITLE (or (get-environment-variable "REPO2HTML_TITLE") "git.example.com"))
(define DESCRIPTION (or (get-environment-variable "REPO2HTML_DESCRIPTION") "my git repositories")) (define DESCRIPTION (or (get-environment-variable "REPO2HTML_DESCRIPTION") "my git repositories"))
(define H1 (or (get-environment-variable "REPO2HTML_H1") "git.example.com")) (define H1 (or (get-environment-variable "REPO2HTML_H1") "git.example.com"))
@ -120,7 +120,7 @@
(define-values (_ _ _ _ relative-root) (pathparts source-file)) (define-values (_ _ _ _ relative-root) (pathparts source-file))
`(html (@ lang en) `(html (@ lang en)
(head (head
(title ,TITLE) (title ,(string-append TITLE " - " repository-name))
(meta (@ charset utf-8)) (meta (@ charset utf-8))
(meta (@ (name viewport) (content "width=device-width, initial-scale-1.0, user-scalable=yes"))) (meta (@ (name viewport) (content "width=device-width, initial-scale-1.0, user-scalable=yes")))
(link (@ (rel icon) (href "data:,"))) (link (@ (rel icon) (href "data:,")))