소스 검색

fix: Book layout

Add anchor links from Docs layout
George Cushen 5 년 전
부모
커밋
64f921f141
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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();