Hexo-theme-next: Algolia search 不會 popup-trigger

Created on 18 Oct 2016  ·  13Comments  ·  Source: iissnan/hexo-theme-next

希望有人能幫我看下 我的blog , 不知道爲何就是不會 popup-trigger.

Most helpful comment

@thyeun 可以試試以下順序:

  1. hexo clean
  2. hexo algolia
  3. hexo g

我剛先執行第三步驟,再執行第二步驟,也遇到 index 為零的問題。

All 13 comments

可能你并未 enable 起来,我没找到 Algolia 的样式和脚本

我有把 enable 放在這裏
/themes/next/_config.yml
algolia_search:
enable: true

修改你的主题目录下面的layout/_partials/header.swig,修改两个位置

一行为{% set hasSearch = theme.swiftype_key || theme.algolia_search.enable || theme.tinysou_Key || config.search%} 改为{% set hasSearch = theme.swiftype_key || theme.algolia_search.enable || theme.tinysou_Key || config.search || theme.algolia_search.enable %}
一行为{% elseif config.search %},将它改为{% elseif config.search || theme.algolia_search.enable %}

我的blog, 現在會popup-trigger, 但是還不能search, 也看不到algolia的logo

嗯...有两个问题:

  1. 样式是旧的,Algolia 的图片并未存在
  2. 你的 Algolia Index 没有数据

更细 Algolia Index ,这个步骤是否正常:
http://theme-next.iissnan.com/third-party-services.html#algolia-search

第一个问题,执行下 hexo clean,再 deploy

thyeun@thyeun-laptop:/home/user/che/workspaces/Git/hexo$ hexo algolia
INFO Start processing
INFO [Algolia] Identified 0 posts to index.
INFO [Algolia] Clearing index...
INFO [Algolia] Index cleared.
INFO [Algolia] Starting indexation...
INFO [Algolia] Import done.

我只有一個post, 以上數據對嗎?

做了5天都做不成, 很灰心!!!

還是不能。。大概是要我放棄了。。。

跪求, 有人能把你手上work 得 algolia search上傳給我嗎?(打包整個給我, 請你抹掉admin key), 謝謝

@thyeun 不行就先用 hexo-generator-searchdb

算了。。。放棄。。

@thyeun 可以試試以下順序:

  1. hexo clean
  2. hexo algolia
  3. hexo g

我剛先執行第三步驟,再執行第二步驟,也遇到 index 為零的問題。

@mcknote, 我已經做好了。。哈哈。。。, 我在另一篇文章裏有說了。。。但是還是要謝謝你的關心, 下次有其它問題, 希望你也能幫我。。。

謝謝你!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

YorksonChang picture YorksonChang  ·  3Comments

ifyour picture ifyour  ·  4Comments

blueyi picture blueyi  ·  5Comments

syscca picture syscca  ·  4Comments

LionWY picture LionWY  ·  3Comments