Adjusting the search results page: Links to headings under which results appear?

23 views
Skip to first unread message

Marcus Schmidt

unread,
Apr 15, 2020, 6:33:05 AM4/15/20
to sphinx-users
Is it possible to adjust the search results page so that not only the file names are listed, but also headings under which the results appear within these files?

It's definitely possible, because that is exactly what the Open API plugin does. 
The results look like this: 

open-api-example.PNG


All those results are on the same page, it just links directly to the headline. 


Can this be done with simple RST files or even raw html files as well?
We have some large files and it would be nice if you could offer links that lead directly to the headlines under which the corresponding content is located. 


Cheers and thanks for your help!
Marcus

Komiya Takeshi

unread,
Apr 18, 2020, 12:57:50 PM4/18/20
to sphinx...@googlegroups.com
>Is it possible to adjust the search results page so that not only the file names are listed, but also headings under which the results appear within these files?

Are these results are "file names"? It seems they are entrypoints of APIs.
I guess they are similar to the result of python-docs. They lists the
names of matched classes, functions and so on.
https://docs.python.org/3/search.html?q=int&check_keywords=yes&area=default

Thanks,
Takeshi KOMIYA

2020年4月15日(水) 19:33 Marcus Schmidt <marcus.sc...@gmail.com>:
>
> Is it possible to adjust the search results page so that not only the file names are listed, but also headings under which the results appear within these files?
>
> It's definitely possible, because that is exactly what the Open API plugin does.
> The results look like this:
>
>
> All those results are on the same page, it just links directly to the headline.
>
>
> Can this be done with simple RST files or even raw html files as well?
> We have some large files and it would be nice if you could offer links that lead directly to the headlines under which the corresponding content is located.
>
>
> Cheers and thanks for your help!
> Marcus
>
> --
> You received this message because you are subscribed to the Google Groups "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/db67f520-3af0-401f-ad98-57fb7b5d0508%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages