Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…js/toc-highlight.js to highlight TOC items when scrolling
  • Loading branch information
yihui committed Sep 12, 2023
1 parent 70c2c8a commit aba7a3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/foot_custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{{ template "_internal/google_analytics.html" . }}

{{ if .IsPage }}
<script src="https://cdn.jsdelivr.net/combine/npm/@xiee/utils/js/number-sections.min.js,npm/@xiee/utils/js/toc.min.js,npm/@xiee/utils/js/sidenotes.min.js,npm/@xiee/utils/js/right-quote.min.js,npm/@xiee/utils/js/center-img.min.js,npm/@xiee/utils/js/fix-pandoc.min.js,npm/@xiee/utils/js/heading-anchor.min.js" defer></script>
<script src="https://cdn.jsdelivr.net/combine/npm/@xiee/utils/js/number-sections.min.js,npm/@xiee/utils/js/toc.min.js,npm/@xiee/utils/js/toc-highlight.min.js,npm/@xiee/utils/js/sidenotes.min.js,npm/@xiee/utils/js/right-quote.min.js,npm/@xiee/utils/js/center-img.min.js,npm/@xiee/utils/js/fix-pandoc.min.js,npm/@xiee/utils/js/heading-anchor.min.js" defer></script>
{{ end }}

{{ if and (not .Params.disable_highlight) (in (string .Content) "</pre>") }}
Expand Down
1 change: 1 addition & 0 deletions static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ blockquote {
#TOC .numbered li { list-style: none; }
#TOC .numbered { padding-left: 0; }
#TOC .numbered ul { padding-left: 1em; }
#TOC .active { font-weight: bold; }
.side-title { width: 3em; }
.side-title h1 { border: none; }
.post-card .side-title h1 a, .post-card .spacer-right, .appendix h3 { color: lightslategray; }
Expand Down

0 comments on commit aba7a3e

Please sign in to comment.