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

Search is broken #95

Closed
craddm opened this issue Mar 6, 2023 · 4 comments
Closed

Search is broken #95

craddm opened this issue Mar 6, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@craddm
Copy link
Contributor

craddm commented Mar 6, 2023

Description

The search box doesn't work.

Expected behaviour

Typing in the search box should produce results instantly under the search box, with links to relevant website pages - see the [hugo-book demo](https://hugo-book-demo.netlify.app/ for an example

Actual behaviour

Nothing happens when you type in the search box.

It appears the search never finds anything. On the main branch of hugo-book, the search seems to work slightly differently from the v9 release, which our site is based on, in that it seems to generate a search index on first use of the search box. I tried updating the code locally, but it didn't seem to help.

May be related to a reported issue here, which is marked as closed, in which flexsearch ignores the base URL and can't handle search when the site is in a subdirectory. I tried the suggested fixes locally, but they didn't seem to work.

Screenshots

How to reproduce

Type anything in the search box.

Your personal setup

  • OS: MacOS 12.6.3
  • Hugo version: hugo v0.111.1+extended darwin/arm64
  • Logs

Tested on Chrome and Safari, on desktop and mobile browsers.

@craddm craddm added the bug Something isn't working label Mar 6, 2023
@JimMadge
Copy link
Member

JimMadge commented Mar 7, 2023

It works locally (and not on GitHub pages) for me, where BaseURL is http://localhost:1313/REG-handbook/.

The BaseURL in the config, for the production site, looks correct to me.

@edwardchalstrey1
Copy link

just noticed this also

@craddm
Copy link
Contributor Author

craddm commented Aug 2, 2023

Seems to be working now!

@craddm craddm closed this as completed Aug 2, 2023
@JimMadge
Copy link
Member

JimMadge commented Aug 3, 2023

Fixed itself 😕 . Maybe a Hugo update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants