Open wottpal opened 12 months ago
Looks awesome, also seems it can fix an issue of searching data from remote content and data fetched from getStaticProps
since the content is indexed from the directory of static HTML files (already built and not from raw md/mdx)
Looks awesome, also seems it can fix an issue of searching data from remote content and data fetched from
getStaticProps
since the content is indexed from the directory of static HTML files (already built and not from raw md/mdx)
It seems not support Chinese or other specialized languages for now.
https://pagefind.app/docs/multilingual/
Currently when indexing, Pagefind does not support stemming for specialized languages, but does support segmentation for words not separated by whitespace.
Pagefind does not yet support segmentation of the search query, so searching in the browser requires that words in the search query are separated by whitespace.
In practice, this means that on a page tagged as a
zh-
language,每个月都
will be indexed as the words每个
,月
, and都
.When searching in the browser, searching for
每个
,月
, or都
individually will work. Additionally, searching 每個 月 都 will return results containing each word in any order, and searching"每个 月 都"
in quotes will match每个月都
exactly.Searching for
每个月都
will return zero results, as Pagefind is not able to segment it into words in the browser. Work to improve this is underway and will hopefully remove this limitation in the future.
See: https://pagefind.app/
They just released v1 and it could give the Nextra search superpowers and removes complexity from its chore 🤔