Skip to content

[#7] Strip Sphinx headerlink from indexed content#9

Open
joubu wants to merge 1 commit intoJacobCoffee:mainfrom
joubu:issue_7
Open

[#7] Strip Sphinx headerlink from indexed content#9
joubu wants to merge 1 commit intoJacobCoffee:mainfrom
joubu:issue_7

Conversation

@joubu
Copy link

@joubu joubu commented Feb 3, 2026

Description

Remove .headerlink anchor elements before extracting text from HTML headings and content blocks. This prevents Sphinx permalink icons () from polluting hierarchy titles and search results in Typesense.

Related Issue

Fixes #7

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring (no functional changes)
  • CI/CD changes
  • Dependencies update

Checklist

  • I have performed a self-review of my code
  • I have added/updated tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added a changelog entry (if applicable)
  • All CI checks pass
  • My changes generate no new warnings

Testing

I am not confident with the suggestion as it sounds too specific. A better approach would be to have the selectors defined in the config.
However I am not even sure it's correct: the class is not on the header
<h1>Acquisitions<a class="headerlink" href="#acquisitions" title="Link to this heading"></a></h1>

Remove `.headerlink` anchor elements before extracting text from HTML
headings and content blocks. This prevents Sphinx permalink icons ()
from polluting hierarchy titles and search results in Typesense.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Sphinx link icons indexed and not rendered correctly ()

1 participant