diff options
author | amazingrise <8315221+AmazingRise@users.noreply.github.com> | 2021-05-14 12:43:01 +0300 |
---|---|---|
committer | amazingrise <8315221+AmazingRise@users.noreply.github.com> | 2021-05-14 12:43:01 +0300 |
commit | 785ad8425cbc1390e28180486c550f5e3a4232f6 (patch) | |
tree | 96360d3136a083008ab3d1129e04e1aa96af2449 /layouts | |
parent | a7921db8468668c981d89e1f5ea8991e94e67187 (diff) |
Add auto scroll for ToC.
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/toc.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html index ee6736e..16978d1 100644 --- a/layouts/partials/toc.html +++ b/layouts/partials/toc.html @@ -23,7 +23,11 @@ {{ end }} {{ if gt $next_heading $prev_heading }} {{ range seq (sub $next_heading $prev_heading) }} - <ul class="collapse" data-toggle="collapse"> + {{ if site.Params.enableAutoCollapse }} + <ul class="collapse" data-toggle="collapse"> + {{ else }} + <ul> + {{ end }} {{ end }} {{ end }} {{ $anchorId := (replaceRE ".* id=\"(.*?)\".*" "$1" $header ) }} |