Skip to content

Commit a865e71

Browse files
committed
fix: remove noisy pages from indexing
These pages are effectively indexes themselves, no need to include them. Signed-off-by: Mike Fiedler <[email protected]>
1 parent 2352138 commit a865e71

File tree

1 file changed

+5
-0
lines changed
  • pep_sphinx_extensions/pep_theme/templates

1 file changed

+5
-0
lines changed

pep_sphinx_extensions/pep_theme/templates/page.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,12 @@ <h1>Python Enhancement Proposals</h1>
4848
</header>
4949
{# Mobile search box - visible only on small screens #}
5050
<div id="mobile-search" class="mobile-search-container"></div>
51+
{# Exclude noisy non-PEP pages from Pagefind indexing #}
52+
{%- if pagename.startswith(("404", "numerical", "pep-0000", "topic")) %}
53+
<article>
54+
{%- else %}
5155
<article data-pagefind-body>
56+
{%- endif %}
5257
{# Add pagefind meta for the title to improve search result display #}
5358
<div data-pagefind-meta="title:{{ title }}" style="display:none;"></div>
5459
{{ body }}

0 commit comments

Comments
 (0)