Using section id instead of heading id for sub results #518
Replies: 3 comments
-
Apologies, missed this! I'll have a think for this — it definitely seems helpful to have, and in fact the search result data already contains every The hard part will be determining what text to show for that sub result, as it isn't trivially paired with the heading element to capture the text. Will have a ponder and get back to you 🙂 |
Beta Was this translation helpful? Give feedback.
-
No problem! I think I understand the difficulty. I appreciate your consideration of this. |
Beta Was this translation helpful? Give feedback.
-
Hi, Hope you're doing well. I was wondering if you've had time to consider my request above, we would really love to have these sub results for our search queries. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the great work with this search library! I'm very pleased with its ease of integration and good performance out of the box.
I recently integrated pagefind for our documentation. Unfortunately, I'm having an issue with sub results. I read that sub results are created for each heading that has an
id
attribute. My headings don't have anid
but thesection
tags wrapped around them do have anid
. We're using Sphinx to build our documentation with the ReadTheDocs theme, so making changes to the generated HTML is not really an option for us. It would be nice if the indexer could check for anid
on the parentsection
tag in case a heading doesn't have one.This would open up the possibility to show sub results in our search as well. As we have quite a large documentation, it could greatly improve the search experience.
Looking forward to hearing your thoughts on this.
Beta Was this translation helpful? Give feedback.
All reactions