scientific-python / scientific-python-hugo-theme

Hugo theme based on the design for numpy.org
https://theme.scientific-python.org/
Other
18 stars 22 forks source link

#607: Pagefind Search #615

Closed brianhawthorne closed 1 week ago

brianhawthorne commented 4 months ago

Add proof-of-concept pagefind site search.

netlify[bot] commented 4 months ago

Deploy Preview for scientific-python-hugo-theme ready!

Name Link
Latest commit
Latest deploy log https://app.netlify.com/sites/scientific-python-hugo-theme/deploys/66eb407c558e39a4e02926d6
Deploy Preview https://deploy-preview-615--scientific-python-hugo-theme.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

brianhawthorne commented 1 month ago

@jarrodmillman and @stefanv , all PR comments resolved, ready for another review

stefanv commented 1 week ago

This looks great, @brianhawthorne. I see the search doesn't work on subpages, and will have to investigate why that is.

brianhawthorne commented 1 week ago

@stefanv , I can look into the problem with indexing subpages (good catch btw). Do you have an example keyword that should pull up a subpage in a search but doesn't?

stefanv commented 1 week ago

Ah, no, the problem is more obvious (on my build at least): the search dialog doesn't pop up when the button is clicked on subpages.

brianhawthorne commented 1 week ago

@stefanv , this ought to get the search working on every page: https://github.com/scientific-python/scientific-python-hugo-theme/pull/615/commits/49fea620affb7b1a4ee7c18b8d90b3fd1a5081a4

Let me know if anything else seems amiss.

stefanv commented 1 week ago

Strange Netlify error today:

11:26:32 AM: Started restoring cached Node.js version
11:26:32 AM: Finished restoring cached Node.js version
11:30:54 AM: Failed during stage 'Install dependencies': dependency_installation script returned non-zero exit code: 1
11:30:54 AM: Version '20' not found - try `nvm ls-remote` to browse available versions.
11:30:54 AM: Failed to install Node.js version '20'
11:30:54 AM: Failing build: Failed to install dependencies
brianhawthorne commented 1 week ago

Ugh, yeah saw that yesterday. Apparently having trouble installing node for one of the preliminary checks. Haven't had a chance to look deeply into it yet, but I think it's probably unrelated to the changes in this PR, since it was building fine before my last commit, which just moved a small chunk of template from one Hugo .html file to another.

I can take a stab at debugging. Was hoping it would be something you guys had seen before :/

stefanv commented 1 week ago

I agree, I think this is on Hugo's side; I'll retry the CI again, now that they've had a day to fix it.

stefanv commented 1 week ago

OK, latest rebuild worked; it won't report here, but it looks fine.

stefanv commented 1 week ago

https://66eb407c558e39a4e02926d6--scientific-python-hugo-theme.netlify.app/

LGTM!