惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

雷峰网
雷峰网
宝玉的分享
宝玉的分享
I
InfoQ
P
Privacy International News Feed
V
V2EX
IT之家
IT之家
S
SegmentFault 最新的问题
D
Darknet – Hacking Tools, Hacker News & Cyber Security
V2EX - 技术
V2EX - 技术
C
CERT Recently Published Vulnerability Notes
C
Check Point Blog
The Register - Security
The Register - Security
爱范儿
爱范儿
博客园 - 三生石上(FineUI控件)
AWS News Blog
AWS News Blog
M
MIT News - Artificial intelligence
C
Cyber Attacks, Cyber Crime and Cyber Security
F
Fortinet All Blogs
B
Blog
N
Netflix TechBlog - Medium
B
Blog RSS Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Last Week in AI
Last Week in AI
T
Threatpost
Forbes - Security
Forbes - Security
U
Unit 42
A
Arctic Wolf
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
P
Palo Alto Networks Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Recorded Future
Recorded Future
L
Lohrmann on Cybersecurity
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
月光博客
月光博客
Spread Privacy
Spread Privacy
MongoDB | Blog
MongoDB | Blog
Jina AI
Jina AI
I
Intezer
V
Visual Studio Blog
阮一峰的网络日志
阮一峰的网络日志
The Hacker News
The Hacker News
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
L
LangChain Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
博客园_首页
MyScale Blog
MyScale Blog
腾讯CDC
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
量子位

Icarus

Getting Started with Icarus Icarus User Guide - Configuring the Theme FAQ Cyberpunk Theme Variant Upgrade Guide Custom Hexo Tag Helpers 自定义Hexo标签插件 Hexo Built-in Tag Helpers Icarus User Guide - CDN Providers Icarus User Guide - Comment Plugins Icarus User Guide - Donation Buttons Icarus User Guide - Other Plugins Icarus User Guide - Share Buttons Icarus User Guide - Web Analytics Plugins Icarus User Guide - Widgets Icarus快速上手 Icarus用户指南 - 主题配置 常见问题 升级指南
Icarus User Guide - Search Plugin
PPOffice · 2017-01-31 · via Icarus

This article covers search plugin configurations supported by Icarus 5.

The following search plugins are provided by ppoffice/hexo-component-inferno. Please refer to it for a complete list of supported plugins and their configuration details.

Algolia

  1. Install the hexo-algolia plugin under the root directory of your Hexo site.

  2. Register and log into Algolia. Click the “Create Index” button on the dashboard when you log in for the first time. Then, enter the name of the index and click the “Create” button to complete index creation.

    Create Index - Algolia
  3. Next, click “API Keys” on the left navigation bar, copy “Application ID” and “Search-Only API Key” on the page. Open site configuration file _config.yml under the root directory of your Hexo site and fill in the above information to the hexo-algolia plugin configurations.

    API Keys - Algolia

    For example, the following Aloglia index information:

    Algolia Index Information
    1
    2
    3
    Algolia Index Name: My-Hexo-Site
    Application ID: ABCDEFGHIJKL
    Search-Only API Key: 7b08fca7d42412cee901a25643124221

    maps to the following plugin configuration:

    _config.yml
    1
    2
    3
    4
    algolia:
    applicationID: My-Hexo-Site
    indexName: ABCDEFGHIJKL
    apiKey: 7b08fca7d42412cee901a25643124221
  4. Go back to the “API Keys” page from the Algolia dashboard and switch to the “All API Keys” tab. Click the “New API Key” button. On the popup “Create API Key” dialog, select the index you created in the last step in “Indices” select box. Then, add addObject, deleteObject, listIndexes, deleteIndex to the “ACL” field. Click the “Create” button to finish key creation. Copy the API key you just created, e.g., 727fbd8c998fe419318fa350db6793ca.

    Create API Key - Algolia
  5. Open a Windows Command Prompt (CMD) or Linux/macOS terminal and change the working directory to the root directory of your Hexo site. Set the HEXO_ALGOLIA_INDEXING_KEY environment variable to the API key you created in the last step. This variable is used by hexo-algolia when uploading indices to Algolia.

    On Windows:

    Windows Command Prompt (CMD)
    1
    2
    C:\Users\you> cd path/to/your/hexo/site
    C:\Users\you> set HEXO_ALGOLIA_INDEXING_KEY=727fbd8c998fe419318fa350db6793ca

    On Linux/macOS:

    Linux/macOS Terminal
    1
    2
    $ cd path/to/your/hexo/site
    $ export HEXO_ALGOLIA_INDEXING_KEY="727fbd8c998fe419318fa350db6793ca"

    Then, run the following commands to clean up your site and upload indices to Algolia:

    Windows Command Prompt or Linux/macOS Terminal
    1
    2
    $ hexo clean
    $ hexo algolia
  6. Finally, set the search engine to Algolia in your theme configurations:

    _config.icarus.yml
    1
    2
    search:
    type: algolia

Installation Guide

  1. Open theme configuration file and set search engine to Baidu:

    _config.icarus.yml
    1
    2
    search:
    type: baidu

Google Custom Search Engine (CSE)

  1. Log into your Google account and visit Google CSE to create a CSE. Type in the URL of your site (without http:// or https://) in the “Sites to Search” field. Select the correct language from the “Language” select box. Then, fill in the “Name of the search engine”. Click the “Create” button to finish engine creation.

    Create Custom Search - Google CSE
  2. Then, click the “Get code” button on the right side of “Add it to your site”. Copy the value of cx to the search settings in your theme’s configurations.

    Get Code - Google CSE

    For example, the following HTML code:

    Google CSE HTML code
    1
    2
    <script async src="https://cse.google.com/cse.js?cx=012345601234560123456:abcdefghijklmn"></script>
    <div class="gcse-search"></div>

    maps to the following theme configuration:

    _config.icarus.yml
    1
    2
    3
    search:
    type: google_cse
    cx: 012345601234560123456:abcdefghijklmn

Insight

Installation Guide

  1. Insight is the default search engine of this site. You can enable it using the following theme configuration:

    _config.icarus.yml
    1
    2
    3
    search:
    type: insight
    include_pages: true

Something wrong with this article? Click here to submit your revision.