From 29c576c9306ce1b597ed95ddd361bda30ce7bd7a Mon Sep 17 00:00:00 2001 From: hyzen Date: Fri, 10 Apr 2026 18:58:38 +0530 Subject: [PATCH] Fix: TOC first line ### heading --- docs/css/custom.css | 9 +++++++++ static/css/custom.css | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/docs/css/custom.css b/docs/css/custom.css index 670083d..b56e588 100644 --- a/docs/css/custom.css +++ b/docs/css/custom.css @@ -1,3 +1,12 @@ +/* ── TOC: hide phantom empty bullet when post starts with ### (h3) ──────── */ +/* Hugo wraps orphaned h3s in a li>ul, leaving an empty li with no direct + anchor. This hides it without affecting any meaningful TOC entry. */ +#TableOfContents > ul > li:first-child:not(:has(> a)) { + list-style: none; + margin: 0; + padding: 0; +} + /* ── UniNotes ───────────────────────────────────────────────────────────── */ .uninotes-breadcrumbs { diff --git a/static/css/custom.css b/static/css/custom.css index 670083d..b56e588 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -1,3 +1,12 @@ +/* ── TOC: hide phantom empty bullet when post starts with ### (h3) ──────── */ +/* Hugo wraps orphaned h3s in a li>ul, leaving an empty li with no direct + anchor. This hides it without affecting any meaningful TOC entry. */ +#TableOfContents > ul > li:first-child:not(:has(> a)) { + list-style: none; + margin: 0; + padding: 0; +} + /* ── UniNotes ───────────────────────────────────────────────────────────── */ .uninotes-breadcrumbs {