集成服务搜索
Algolia 搜索
将 Solitude 4 搜索界面连接到 Hexo Algolia 索引。
先创建 Algolia 应用,并通过 Hexo Algolia 插件上传索引。索引凭据写在 Hexo _config.yml:
algolia:
appId: your-app-id
apiKey: your-search-only-key
indexName: your-index-name在 _config.solitude.yml 中启用主题界面:
search:
enable: true
type: algolia
tags: [Solitude, Hexo]
algolia:
hits:
per_page: 6生成页面只能使用只读搜索 Key,绝不能暴露 Admin API Key。上传索引后打开搜索框,检查分页和从结果进入页面的 PJAX 导航。
