load the toc js conditionally

This commit is contained in:
Xavier Valls Pla 2020-06-24 19:03:02 +02:00
parent 763a218011
commit 136f700b91
1 changed files with 3 additions and 1 deletions

View File

@ -37,6 +37,8 @@
{{ end }}
{{ define "scripts" }}
<script src="/js/table-of-contents.js"></script>
{{ if or .Params.toc .Site.Params.toc }}
<script src="/js/table-of-contents.js"></script>
{{ end }}
<script src="https://unpkg.com/prismjs@^1.2"></script>
{{ end }}