You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, @bglw and all the good people at CloudCannon!
I am building a small site for documenting WooCommerce action hooks and filter hooks. The pages are named after the hook they document, and they have titles like this:
woocommerce_init
woocommerce_loaded
woocommerce_ajax_get_endpoint
etc.
So, the site has a page titled woocommerce_init as well as a page titled woocommerce_loaded. But when I search for init or loaded, Pagefind finds nothing:
When I search using the full title of the page, e.g., woocommerce_init or woocommerce_loaded, Pagefind finds the pages. It also finds the pages when I search using the full title without the underscores, e.g., woocommerce init or woocommerce loaded:
If I rename the page titles to use hyphens instead of underscores (e.g., rename woocommerce_loaded to woocommerce-loaded) and reindex the site, Pagefind gives me the results I expect:
Do you know why this happens or if it’s something I can fix on my end?
In case it matters, the site is built with Astro. It is live and the pages in my examples can be accessed here:
Interesting! Going to your link I can see the same behavior. I'm unsure why, I'll need to look into that.
Searching for loaded should indeed match woocommerce_loaded — and we have integration tests that ensure that — so there must be some confounding factor with this content in particular. I'll take a look soon 👀
Hello, @bglw and all the good people at CloudCannon!
I am building a small site for documenting WooCommerce action hooks and filter hooks. The pages are named after the hook they document, and they have titles like this:
So, the site has a page titled woocommerce_init as well as a page titled woocommerce_loaded. But when I search for init or loaded, Pagefind finds nothing:
When I search using the full title of the page, e.g., woocommerce_init or woocommerce_loaded, Pagefind finds the pages. It also finds the pages when I search using the full title without the underscores, e.g., woocommerce init or woocommerce loaded:
If I rename the page titles to use hyphens instead of underscores (e.g., rename woocommerce_loaded to woocommerce-loaded) and reindex the site, Pagefind gives me the results I expect:
Do you know why this happens or if it’s something I can fix on my end?
In case it matters, the site is built with Astro. It is live and the pages in my examples can be accessed here:
Cheers!
The text was updated successfully, but these errors were encountered: