From c9b7ca264b3cb47676bc72def93c6bb0f0b59f9f Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Mon, 13 Oct 2025 10:18:01 -0400 Subject: [PATCH] Add link to Pelican PR #3512 for upstream TOC filtering --- .../2025-10-11-pelican-theme-upgrade-right-sidebar-toc.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/2025-10-11-pelican-theme-upgrade-right-sidebar-toc.rst b/content/2025-10-11-pelican-theme-upgrade-right-sidebar-toc.rst index 26de490..4ccaf1c 100644 --- a/content/2025-10-11-pelican-theme-upgrade-right-sidebar-toc.rst +++ b/content/2025-10-11-pelican-theme-upgrade-right-sidebar-toc.rst @@ -93,6 +93,10 @@ ReStructuredText automatically generates anchor links in section headings when a To solve this, we created a Pelican plugin that provides a ``strip_anchors`` Jinja2 filter. This filter removes TOC divs and ``toc-backref`` anchor links from article summaries before they're rendered on the homepage. +**Update:** We submitted `Pull Request #3512 `_ to add this functionality directly to Pelican core. Once merged, this will work automatically without needing the plugin or template filter. + +.. TODO: Remove lib/strip_toc_summary.py plugin and strip_anchors filter from index.html template when PR #3512 is merged into Pelican upstream. + **The Plugin** The plugin (``lib/strip_toc_summary.py``) uses regex to strip problematic HTML: