fileserver: Set canonical URL on browse template (#5867)

* Browse.html: Add canonical URL and home-link

When contents are equal, but maybe just a sort order is different, it is good to add `<link rel="canonical" href="base-path/" />`. This helps search engines propeely index the page.

I also added a link to the home page with the name of `{{.Host}}` just above the bread crumbs to make the page clearer.

https://paste.tnonline.net/files/28Wun5CQZiqA_Screenshot_20231007_134435_Opera.png

* Update browse.html
This commit is contained in:
Forza 2023-10-11 21:47:38 +02:00 committed by GitHub
parent 289934f3d1
commit 130f6d1f83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -299,6 +299,7 @@
<html> <html>
<head> <head>
<title>{{html .Name}}</title> <title>{{html .Name}}</title>
<link rel="canonical" href="{{.Path}}/" />
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="color-scheme" content="light dark"> <meta name="color-scheme" content="light dark">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">