@marcel91200 / caddy Mirror · read-only / commits / 130f6d1f
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 12, 22:00 UTC

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

Forza committed Oct 11, 2023 at 21:47 UTC 130f6d1f838900c12e1649e580aae817e8c2909e
1 file changed +1
modules/caddyhttp/fileserver/browse.html
+1
@@ -299,6 +299,7 @@
299 <html>
300 <head>
301 <title>{{html .Name}}</title>
302 + <link rel="canonical" href="{{.Path}}/" />
303 <meta charset="utf-8">
304 <meta name="color-scheme" content="light dark">
305 <meta name="viewport" content="width=device-width, initial-scale=1.0">