From 5ea51b696aa23a65cbda40f8af31625e774e7bd5 Mon Sep 17 00:00:00 2001 From: avikam03 Date: Tue, 23 Jul 2024 15:54:27 -0400 Subject: [PATCH 1/4] enable toc for index page --- _config.yml | 1 + _includes/toc-date.html | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/_config.yml b/_config.yml index 90af63a571..29d27becf1 100644 --- a/_config.yml +++ b/_config.yml @@ -18,6 +18,7 @@ remote_theme: sighingnow/jekyll-gitbook toc: enabled: true + enabled_index: false h_min: 1 h_max: 3 diff --git a/_includes/toc-date.html b/_includes/toc-date.html index c56f077bbf..1da8420a6d 100644 --- a/_includes/toc-date.html +++ b/_includes/toc-date.html @@ -39,6 +39,11 @@ {{ site.title | escape }} + {% if site.toc.enabled %} + {% if page.url == "/" and site.toc.enabled_index %} + {% include toc.html html=content h_min=site.toc.h_min h_max=site.toc.h_max %} + {% endif %} + {% endif %}
  • From 6597a49767595bffb75bfecccdedd3eedc771a8a Mon Sep 17 00:00:00 2001 From: avikam03 Date: Tue, 23 Jul 2024 15:56:12 -0400 Subject: [PATCH 2/4] fix spacing --- _config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_config.yml b/_config.yml index 29d27becf1..77f82f14d2 100644 --- a/_config.yml +++ b/_config.yml @@ -17,10 +17,10 @@ rss: RSS remote_theme: sighingnow/jekyll-gitbook toc: - enabled: true - enabled_index: false - h_min: 1 - h_max: 3 + enabled: true + enabled_index: true + h_min: 1 + h_max: 3 # customize the link favicon in header, will be {{site.baseurl}}/{{site.favicon_path}} favicon_path: /assets/gitbook/images/favicon.ico From c6ba0750c4d08da7f0abf5144c0b55091a4d285d Mon Sep 17 00:00:00 2001 From: avikam03 Date: Tue, 23 Jul 2024 16:14:06 -0400 Subject: [PATCH 3/4] remove condition --- _includes/toc-date.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/toc-date.html b/_includes/toc-date.html index 1da8420a6d..06a926b9f4 100644 --- a/_includes/toc-date.html +++ b/_includes/toc-date.html @@ -40,7 +40,7 @@ {{ site.title | escape }} {% if site.toc.enabled %} - {% if page.url == "/" and site.toc.enabled_index %} + {% if site.toc.enabled_index %} {% include toc.html html=content h_min=site.toc.h_min h_max=site.toc.h_max %} {% endif %} {% endif %} From 10a770b34f2c52cb904cd10a316b4c5e2f41dc3a Mon Sep 17 00:00:00 2001 From: avikam03 Date: Tue, 23 Jul 2024 16:22:45 -0400 Subject: [PATCH 4/4] remove enabled_index from config --- _config.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/_config.yml b/_config.yml index 77f82f14d2..f4c1c9c7a2 100644 --- a/_config.yml +++ b/_config.yml @@ -17,10 +17,9 @@ rss: RSS remote_theme: sighingnow/jekyll-gitbook toc: - enabled: true - enabled_index: true - h_min: 1 - h_max: 3 + enabled: true + h_min: 1 + h_max: 3 # customize the link favicon in header, will be {{site.baseurl}}/{{site.favicon_path}} favicon_path: /assets/gitbook/images/favicon.ico