Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to implement dynamic search in new website? #203

Closed
kelle opened this issue Mar 13, 2018 · 4 comments
Closed

How to implement dynamic search in new website? #203

kelle opened this issue Mar 13, 2018 · 4 comments
Labels

Comments

@kelle
Copy link
Member

kelle commented Mar 13, 2018

We have some great mockups for a new website (#200) and a great new sphinx infrastructure (#153) but how will they work together? What is the actual code or plugins which can be used to make the dynamic search work within the sphinx generated pages?

@MananAgarwal
Copy link
Contributor

Hey @kelle,
Glad that you liked the mockups. I looked into the integration with Sphinx infrastructure. Here are two options that we can consider:

  • sphinx-bootstrap-theme: This is a configurable, extensible and mobile-friendly theme that integrates Bootstrap CSS/JS framework with various layout options.

  • Sphinx has a feature that allows us to create custom themes. It provides support for changing the appearance of its HTML output.

For the implementation of filters, we can use tags for different categories like 'material type', 'Astropy packages', 'non-astropy packages' etc.

The dynamic search can be implemented using either of these options:

  • Using the get_search_results() function of the WebSupport class in the Sphinx API. It takes a query as an argument and returns the search results along with the context. An extended version of this, are SearchAdapters which are implemented using BaseSearch class. These provide for more customized search results.

  • Using a library, Whoosh. It is a fast, featureful full-text indexing and searching library implemented in pure Python that allows us to easily add dynamic search features to websites.

@thelittlewonder
Copy link

@kelle
Sorry for getting on this late. I was sick and recovery took quite some time. Apologies :-)

What is the actual code or plugins which can be used to make the dynamic search work within the sphinx generated pages?

I'd suggest using Sphinx inbuilt JavaScript utility for the full-text search, searchtools.js. Pytorch uses the same for searching through its Sphinx generated docs.

@eblur
Copy link
Contributor

eblur commented Mar 20, 2018

Hi all, this is a reminder to please put your landing pages and at least the beginning of your implementation into a pull request so that we can see the source code.

Also let us know when you have opened your GSOC application on the GSOC website. We will be able to see them and could give you feedback.

See the Astropy GSOC 2018 Guidelines page for more info.

@kelle
Copy link
Member Author

kelle commented Mar 27, 2018

Thank you for your well thought out proposals! Now that they are in, I'm gonna close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants