목차 SCRIPT document.addEventListener(“DOMContentLoaded”, function() { const tocList = document.getElementById(“tocList”); const headers = document.querySelectorAll(“.entry-content h2, .entry-content h3”); headers.forEach(function(header, index) { if (!header.id) { header.id = “toc-heading-” + (index + 1); } const li = document.createElement(“li”); const aTag = document.createElement(“a”); aTag.setAttribute(“href”, “#” + header.id); aTag.textContent = header.textContent.trim(); if (header.tagName.toLowerCase() === “h3”) { li.style.marginLeft = “20px”; } li.appendChild(aTag); […]