Remove source files in search on <https://copier.readthedocs.io>
Actual Situation
I was searching in copier docs and found that source code of the copier is included.
I didn't expect that. I thought https://copier.readthedocs.io is just a website for showcasing the copier and documentation. Is this expected behavior?
I've read docs of many packages on readthedocs.io and I never found a package that would include source code in the search results.
Desired Situation
Either:
- Say that this is desired behavior -- I'm not pushing, it's totally your choice.
- Or remove source code from search results. As an alternative there is already GitHub
Proposed solution
No response
Thanks for the report @InAnYan. It might be possible to exclude source code blocks from search by setting a data-search-exclude HTML attribute on the right elements: https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-search/#search-exclusion.
Do you mean you literally searched for copier on the docs? Can you post a screenshot of the source code you saw in the search results? Just to make sure I understand correctly.
(Marks mean that I, as a user, expected this)
While my issue description contains subjective opinion, here is just in case an objective objection 😄 :
- FULL source code of a file is included in the results. Every statement! Source file can be quite big. What if it hides some real and useful search result?
Thanks!
FULL source code of a file is included in the results. Every statement! Source file can be quite big.
Yeah that's not good 😄 In this case it's a single (big) class, but yeah, it shouldn't appear there, especially since there are contents before it in the relevant page.