content,internal: add canonical path keyboard shortcut
Adds the canonical path keyboard shorcut to the unit page.
Change-Id: I3f8882db0d779674471b94d90b25f651c5dd2527
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/259626
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
diff --git a/content/static/html/pages/unit.tmpl b/content/static/html/pages/unit.tmpl
index dff0b9e..a9fe55a 100644
--- a/content/static/html/pages/unit.tmpl
+++ b/content/static/html/pages/unit.tmpl
@@ -20,6 +20,7 @@
{{define "post_content"}}
<div class="js-canonicalURLPath" data-canonical-url-path="{{.CanonicalURLPath}}" hidden />
<script>
+ loadScript('/static/js/keyboard.js', {type: 'module', async: true, defer: true})
loadScript('/static/js/unit.js', {type: 'module', async: true, defer: true})
loadScript('/static/js/unit_fixed_header.js', {type: 'module', async: true, defer: true})
</script>
diff --git a/internal/middleware/secureheaders.go b/internal/middleware/secureheaders.go
index 8666681..b4a8295 100644
--- a/internal/middleware/secureheaders.go
+++ b/internal/middleware/secureheaders.go
@@ -29,7 +29,7 @@
"'sha256-32pObeU1KY/YOSORAAjek9Hs5q6IpyYCK2QnF08OwiY='",
"'sha256-uQODpjQEw2CWPIl6zEmpUU1uULk5RYVCofnBw59UOOw='",
// From content/static/html/pages/unit.tmpl
- "'sha256-w9JIp++N6M7QtDNJRXoowFUN84N5GWsJhUaoIDyMijk='",
+ "'sha256-hsHIJwO1h0Vzwa75j0l07kUfQ7MEZGI/HlSPB/8leZ0='",
// From content/static/html/pages/unit_details.tmpl
"'sha256-CFun5NgnYeEpye8qcbQPq5Ycwavi4IXuZiIzSMNqRUw='",
"'sha256-IHdniK/yZ8URNA2OYbc4R7BssOAe3/dFrSQW7PxEEfM='",