Set Up Search
Theme Cupertino uses Pagefind for searching. Search features are disabled initially because it requires to be set up.
Enable in configuration
search: trueInstall Pagefind
npm install pagefindAdd script
{
"scripts": {
"index": "pagefind --site public"
}
}Build index
npm run build
npm run indexYou have to build before indexing, or there will be nothing to index. You should also adjust your deployment commands or CI/CD.
Create search page
npm exec hexo new page 'search'---
type: search
---Done! Now your search page is ready at /search.