ivoa / ivoa-web

ivoa.net website static web pages
Creative Commons Attribution Share Alike 4.0 International
3 stars 2 forks source link

Add search capability #89

Open gmantele opened 2 weeks ago

gmantele commented 2 weeks ago

This PR aims to add an indexing capability using PageFile and then to add somewhere in the IVOA pages the search form and results.

Fixes #88

gmantele commented 2 weeks ago

Currently, PageFind is all configured. The Makefile has been adapted to index pages after their generation (PageFind indexes HTML files). This works well with the preview and the new html targets.

Left to do:

Questions to answer:

Two examples of search capabilities with PageFind:

gmantele commented 1 week ago

For the moment, the current prototype uses the CSS and JS of the same feature on the CDS website. They have been slightly adapted, but they should be completely adapted to the desired features and style of the IVOA website.

Anyway, the search capability is fully working here. You can already test it if you want, although it may be even more interesting while we will have the newsletters (which contain a lot of content).

Currently, the search capability is only available on a single dedicated page (/search/ ; a link is visible, temporarily at first position, in the top navigation bar). We have to decide where how we would like to trigger this search capability. A dedicated page like now or a modal dialog available on all pages when clicking on search button/icon?

gmantele commented 1 week ago

I have not yet adapted the CI, so you will have to test this feature on your local repository ; it does not work yet on https://webtest.ivoa.info/v/iss88-search-index//search/ as PageFind is not installed and run.

To do that locally on your machine, you will have to:

  1. Checkout this branch
  2. Run make preview ; this will install PageFind, generate the search index and open the generated website in your web browser.

Only running the Hugo command is no more enough if you want to use the search capability.

JeremyMcCormick commented 6 days ago

This looks great!

Is this ready to be merged? Or do you have more changes planned?

I'm starting to think the version sites are problemmatic to fully support. If this update would work on main, then I am okay merging it even if it doesn't function on the version/branch site.

gmantele commented 4 days ago

As I said, it is not yet ready to be merged. I still have few style things to do, and tuning of the search engine.

And, we also have to decide

molinaro-m commented 3 days ago

I checked out and tried the solution on my laptop and it worked seamlessly (even before I realised it had finished). We have to remember to discuss Grégory's questions in the comment above at our next vconf/meeting.

My preference: nice to have, dialog-wise, as a "lens" at the right end of the nav-bar.

JeremyMcCormick commented 3 days ago

As I said, it is not yet ready to be merged.

My apologies, I see this is marked as draft.

JeremyMcCormick commented 3 days ago

Questions to answer:

I have no problem to defer most of these questions until a later update in order to just get the search functionality enabled and working on the site first; I don't think we need to make all of those decisions now. From my perspective, you can do whatever you think is best for the initial implementation and then we can go from there. CDS website search functionality looks nice to me, personally, so I would have no issue if you just copied that for this PR.

My only preference is that we have a box that says "Search" in a prominent place in the upper right of the index page, mainly for accessibility purposes.