kuizuo / blog

A Blog on Customizing Docusaurus
https://kuizuo.cn
MIT License
231 stars 141 forks source link

大佬这个algolia搜索功能是每上传一个blog文件就要运行一次抓取的嘛 #161

Closed onewhitethreee closed 1 year ago

onewhitethreee commented 1 year ago

好麻烦哦,有没有啥解决方法啊🥲

kuizuo commented 1 year ago

我目前algolia搜索功能是Docsearch每周定时爬一次,但是也可以手动到管理面板让Docsearch爬取一次,但是需要申请会比较麻烦,前提需要项目开源。

image

如果不申请的话就只能自己创建爬虫配置文件与环境,然后开始爬取。我当时就是封装了npm scripts然后每次部署的时候在执行一遍命令

"scripts": {
  "index": "docker run -it --env-file=.env -e \"CONFIG=$(cat docsearch.json | jq -r tostring)\" algolia/docsearch-scraper"
},
onewhitethreee commented 1 year ago

好⑧,谢谢