Skip to content

Commit

Permalink
Fix table of contents not showing
Browse files Browse the repository at this point in the history
If the URL ends with "/docs.html", the TOC will show up, but with just "/docs", it doesn't show up.
Fixes #256
  • Loading branch information
C-Ezra-M authored and LeaVerou committed Mar 8, 2024
1 parent 256c447 commit 9df4f28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ $$("section h1").forEach(function(h1) {
}
});

if (/\/docs\.html$/.test(location.pathname)) {
if (/\/docs(?:\.html)?$/.test(location.pathname)) {
// Table of Contents
var tocList = $("#toc ol");

Expand Down

0 comments on commit 9df4f28

Please sign in to comment.