From acfd74f06d7a5956e0639b6be5fb492875b32b8a Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sat, 22 Nov 2025 23:36:20 -0500 Subject: [PATCH] Fix TOC to include h3 headings in article tags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update JavaScript selector in resource page TOCs to capture h3 headings nested inside article tags. Changed selector from: 'section h2, section h3' to: 'section h2, section h3, section article h3' This ensures individual entries (angel names, prophet names, etc.) appear in the table of contents as indented sub-items under their category headings. Updated templates: - biblical_angels.html - biblical_prophets.html - names_of_god.html - twelve_apostles.html - women_of_the_bible.html - parables.html 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- kjvstudy_org/templates/biblical_angels.html | 2 +- kjvstudy_org/templates/biblical_prophets.html | 2 +- kjvstudy_org/templates/names_of_god.html | 2 +- kjvstudy_org/templates/parables.html | 2 +- kjvstudy_org/templates/twelve_apostles.html | 2 +- kjvstudy_org/templates/women_of_the_bible.html | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kjvstudy_org/templates/biblical_angels.html b/kjvstudy_org/templates/biblical_angels.html index 764732a..4e089c2 100644 --- a/kjvstudy_org/templates/biblical_angels.html +++ b/kjvstudy_org/templates/biblical_angels.html @@ -213,7 +213,7 @@ document.addEventListener('DOMContentLoaded', function() { // Generate TOC from h2 and h3 headings const tocList = document.getElementById('toc-list'); - const headings = document.querySelectorAll('section h2, section h3'); + const headings = document.querySelectorAll('section h2, section h3, section article h3'); headings.forEach((heading, index) => { // Create an ID for the heading if it doesn't have one diff --git a/kjvstudy_org/templates/biblical_prophets.html b/kjvstudy_org/templates/biblical_prophets.html index 98e55ce..64f7c52 100644 --- a/kjvstudy_org/templates/biblical_prophets.html +++ b/kjvstudy_org/templates/biblical_prophets.html @@ -209,7 +209,7 @@ document.addEventListener('DOMContentLoaded', function() { // Generate TOC from h2 and h3 headings const tocList = document.getElementById('toc-list'); - const headings = document.querySelectorAll('section h2, section h3'); + const headings = document.querySelectorAll('section h2, section h3, section article h3'); headings.forEach((heading, index) => { // Create an ID for the heading if it doesn't have one diff --git a/kjvstudy_org/templates/names_of_god.html b/kjvstudy_org/templates/names_of_god.html index 908ed45..c4f2354 100644 --- a/kjvstudy_org/templates/names_of_god.html +++ b/kjvstudy_org/templates/names_of_god.html @@ -209,7 +209,7 @@ document.addEventListener('DOMContentLoaded', function() { // Generate TOC from h2 and h3 headings const tocList = document.getElementById('toc-list'); - const headings = document.querySelectorAll('section h2, section h3'); + const headings = document.querySelectorAll('section h2, section h3, section article h3'); headings.forEach((heading, index) => { // Create an ID for the heading if it doesn't have one diff --git a/kjvstudy_org/templates/parables.html b/kjvstudy_org/templates/parables.html index f8e30ca..3e61fbb 100644 --- a/kjvstudy_org/templates/parables.html +++ b/kjvstudy_org/templates/parables.html @@ -207,7 +207,7 @@ document.addEventListener('DOMContentLoaded', function() { // Generate TOC from h2 and h3 headings const tocList = document.getElementById('toc-list'); - const headings = document.querySelectorAll('section h2, section h3'); + const headings = document.querySelectorAll('section h2, section h3, section article h3'); headings.forEach((heading, index) => { // Create an ID for the heading if it doesn't have one diff --git a/kjvstudy_org/templates/twelve_apostles.html b/kjvstudy_org/templates/twelve_apostles.html index 3622eca..c480666 100644 --- a/kjvstudy_org/templates/twelve_apostles.html +++ b/kjvstudy_org/templates/twelve_apostles.html @@ -211,7 +211,7 @@ document.addEventListener('DOMContentLoaded', function() { // Generate TOC from h2 and h3 headings const tocList = document.getElementById('toc-list'); - const headings = document.querySelectorAll('section h2, section h3'); + const headings = document.querySelectorAll('section h2, section h3, section article h3'); headings.forEach((heading, index) => { // Create an ID for the heading if it doesn't have one diff --git a/kjvstudy_org/templates/women_of_the_bible.html b/kjvstudy_org/templates/women_of_the_bible.html index fd0d34e..6ff99b7 100644 --- a/kjvstudy_org/templates/women_of_the_bible.html +++ b/kjvstudy_org/templates/women_of_the_bible.html @@ -211,7 +211,7 @@ document.addEventListener('DOMContentLoaded', function() { // Generate TOC from h2 and h3 headings const tocList = document.getElementById('toc-list'); - const headings = document.querySelectorAll('section h2, section h3'); + const headings = document.querySelectorAll('section h2, section h3, section article h3'); headings.forEach((heading, index) => { // Create an ID for the heading if it doesn't have one