diff --git a/config.toml b/config.toml index 59069f2..7b843dd 100644 --- a/config.toml +++ b/config.toml @@ -20,5 +20,5 @@ easydocs_logo_always_clickable = false # - This is not portable and only works with a specific local folder easydocs_uglyurls = false -# Controls how many headings are needed on a page before the headings show in the navigation on the left -easydocs_heading_threshold = 4 \ No newline at end of file +# Minimum number of headings needed on a page before the headings show in the navigation on the left. Defaults to 5. +easydocs_heading_threshold = 5 \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 0c96594..15c2af1 100644 --- a/templates/index.html +++ b/templates/index.html @@ -94,7 +94,15 @@ {% endfor -%} {# Output headers if above threshold #} - {% if header_count > config.extra.easydocs_heading_threshold -%} + {% if not config.extra.easydocs_heading_threshold -%} + {# Undefined or 0 unable to find a way to differnciate between 0 and undefined. + 1 is already including any headings so is not 0 not needed #} + {% set _threshold = 5 -%} + {% else %} + {% set _threshold = config.extra.easydocs_heading_threshold -%} + {% endif -%} + + {% if header_count >= _threshold -%}