Browse Source

fix: Book layout

Add anchor links from Docs layout
George Cushen 5 năm trước cách đây
mục cha
commit
64f921f141
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      layouts/partials/site_js.html

+ 1 - 1
layouts/partials/site_js.html

@@ -69,7 +69,7 @@
     {{ end }}
 
     {{/* Load hash anchors for documentation pages. */}}
-    {{ if eq .Type "docs" }}
+    {{ if in (slice "book" "docs") .Type }}
     {{ printf "<script src=\"%s\" integrity=\"%s\" crossorigin=\"anonymous\"></script>" (printf $js.anchor.url $js.anchor.version) $js.anchor.sri | safeHTML }}
     <script>
       anchors.add();