Skip to content

Commit

Permalink
fix: Add TOC control
Browse files Browse the repository at this point in the history
  • Loading branch information
MoxueF committed Feb 25, 2024
1 parent 0a90cae commit 8907077
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layout/_macro/sidebar.njk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% macro render(display_toc) %}
<aside class="sidebar">
{%- set display_toc = and page.etoc and display_toc %}
{%- set display_toc = page.etoc and display_toc %}
{%- if display_toc %}
{%- set toc = toc(page.content, {class: 'nav', list_number: page.toc.number, max_depth: page.toc.max_depth}) %}
{%- set display_toc = toc.length > 1 and display_toc %}
Expand Down

0 comments on commit 8907077

Please sign in to comment.