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

关于VuePress集成Algolia不生效的咨询 #3107

Open
Peter-JXL opened this issue Dec 12, 2022 · 2 comments
Open

关于VuePress集成Algolia不生效的咨询 #3107

Peter-JXL opened this issue Dec 12, 2022 · 2 comments

Comments

@Peter-JXL
Copy link

Peter-JXL commented Dec 12, 2022

前言

大家好,我根据VuePress1.x的文档配置了Algolia,但是搜索时没有出现Algolia搜索框,还是原本的默认的搜索框,经过搜索文档、百度和Google、搜索本仓库的issue,在思否和掘金上提问,仍无果,现求助于各位开发者

复现

我复现的步骤如下:

  1. 登录Algolia控制台,可以看到已经有爬虫爬到网站数据了
  2. 根据官网文档配置了Algolia :默认主题配置 | VuePress
  3. 本地启动和部署到服务器上后,都没出现搜索框(还是默认的只能搜索h2等标题)
  4. 我的项目地址:vuepressblog: 个人博客, 由于我的博客配置较多,怀疑是不是主题导致的,因此单独创建了一个新的项目,没使用任何主题,仍不能使用Algolia的搜索功能 vuepress-starter

关键配置如下:

module.exports = {
  themeConfig: {
    algolia: {
      appId: 'HFCGE1I7YO',
      apikey: '557697d1f20e77362b502b71ecf41e2a',
      indexName: 'peterjxl'
    },
  }
}

配置文件地址:

  1. docs/.vuepress/config/themeConfig.ts · - Gitee.com
  2. docs/.vuepress/config.js · -Gitee.com

Algolia后台截图:能正常生成数据
image

三个参数就是和Algolia邮件里一样的,邮件截图:
image

已观察控制台和VuePress启动时的命令行,均无报错,请问是否有漏了哪一步?或者应该如何排查?看VuePress源码还是看Algolia的配置,

版本信息

node:v16.15.1
"vuepress": "^1.9.7",
Windows10专业版
Chrome浏览器

期待您的回复

@mountain2016
Copy link

请问这个问题解决了吗,我遇到了一样的问题

@Peter-JXL
Copy link
Author

请问这个问题解决了吗,我遇到了一样的问题

还无... 其他平台的提问也没人回复,我现在该用其他平台了,例如美丽云搜索(收费的)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants