Compare commits
2 Commits
5395544f52
...
8070072d7a
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8070072d7a | ||
![]() |
0690c2a6ef |
4
atom.xml
@ -8,7 +8,7 @@
|
||||
<author>
|
||||
<name>Hito li</name>
|
||||
</author>
|
||||
<updated>2022-09-17T15:12:02.000Z</updated>
|
||||
<updated>2022-09-17T15:12:00.000Z</updated>
|
||||
<category term="hito" />
|
||||
<category term="無言" />
|
||||
<category term="博客" />
|
||||
@ -49,7 +49,7 @@
|
||||
</li>
|
||||
</ol>
|
||||
</content>
|
||||
<updated>2022-09-17T15:12:02.000Z</updated>
|
||||
<updated>2022-09-17T15:12:00.000Z</updated>
|
||||
</entry>
|
||||
<entry>
|
||||
<id>https://blog.jingxiyuan.cn/2022/09/16/chevereto%E5%9B%BE%E5%BA%8A%E5%AE%89%E8%A3%85/</id>
|
||||
|
@ -10,7 +10,7 @@
|
||||
"id": "https://blog.jingxiyuan.cn/2022/09/17/Hexo-Theme-Shoka-algolia%E6%90%9C%E7%B4%A2%E8%B8%A9%E5%9D%91-1/",
|
||||
"url": "https://blog.jingxiyuan.cn/2022/09/17/Hexo-Theme-Shoka-algolia%E6%90%9C%E7%B4%A2%E8%B8%A9%E5%9D%91-1/",
|
||||
"title": "Hexo + Theme.Shoka + algolia搜索踩坑",
|
||||
"date_published": "2022-09-17T15:12:02.000Z",
|
||||
"date_published": "2022-09-17T15:12:00.000Z",
|
||||
"content_html": "<h1 id=\"hexo-themeshoka安装\"><a class=\"anchor\" href=\"#hexo-themeshoka安装\">#</a> Hexo + Theme.Shoka 安装</h1>\n<p><a href=\"https://blog.jingxiyuan.cn/2022/09/14/Hexo%E5%AE%89%E8%A3%85%E6%91%B8%E7%B4%A2/\">安装介绍</a></p>\n<h1 id=\"algolia注册\"><a class=\"anchor\" href=\"#algolia注册\">#</a> algolia 注册</h1>\n<ol>\n<li>\n<p><span class=\"exturl\" data-url=\"aHR0cHM6Ly93d3cuYWxnb2xpYS5jb20vdXNlcnMvc2lnbl9pbg==\">algolia</span> 不支持国内邮箱注册,而 google 和 github 由于国内被墙也没法使用。所以只能先注册<span class=\"exturl\" data-url=\"aHR0cHM6Ly9hcHAubmV0bGlmeS5jb20v\"> netlify</span> 然后通过 netlify 注册 algolia。</p>\n</li>\n<li>\n<p>登录 algolia 后创建一个 index,名字随意记住既可。</p>\n<p><img data-src=\"https://file.jingxiyuan.cn/images/2022/09/17/2022-09-17-23-32-20.png\" alt=\"2022-09-17-23-32-20.png\" /></p>\n</li>\n<li>\n<p>点击右上角红点,弹出窗口点 settings 按钮。</p>\n<p><img data-src=\"https://file.jingxiyuan.cn/images/2022/09/17/2022-09-17-23-35-04.png\" alt=\"2022-09-17-23-35-04.png\" /></p>\n</li>\n<li>\n<p>点击 API KEYS,获取 appId 和 adminApiKey 填入 hexo 的_config.yml 中 apiKey 暂时不填。</p>\n</li>\n</ol>\n<figure class=\"highlight yml\"><figcaption data-lang=\"YAML\"></figcaption><table><tr><td data-num=\"1\"></td><td><pre><span class=\"token key atrule\">algolia</span><span class=\"token punctuation\">:</span></pre></td></tr><tr><td data-num=\"2\"></td><td><pre> <span class=\"token key atrule\">appId</span><span class=\"token punctuation\">:</span> <span class=\"token comment\">#Your appId</span></pre></td></tr><tr><td data-num=\"3\"></td><td><pre> <span class=\"token key atrule\">apiKey</span><span class=\"token punctuation\">:</span> <span class=\"token comment\">#Your apiKey</span></pre></td></tr><tr><td data-num=\"4\"></td><td><pre> <span class=\"token key atrule\">adminApiKey</span><span class=\"token punctuation\">:</span> <span class=\"token comment\">#Your adminApiKey</span></pre></td></tr><tr><td data-num=\"5\"></td><td><pre> <span class=\"token key atrule\">chunkSize</span><span class=\"token punctuation\">:</span> <span class=\"token number\">5000</span></pre></td></tr><tr><td data-num=\"6\"></td><td><pre> <span class=\"token key atrule\">indexName</span><span class=\"token punctuation\">:</span> blog <span class=\"token comment\">#\"shoka\"</span></pre></td></tr><tr><td data-num=\"7\"></td><td><pre> <span class=\"token key atrule\">fields</span><span class=\"token punctuation\">:</span></pre></td></tr><tr><td data-num=\"8\"></td><td><pre> <span class=\"token punctuation\">-</span> title <span class=\"token comment\">#必须配置</span></pre></td></tr><tr><td data-num=\"9\"></td><td><pre> <span class=\"token punctuation\">-</span> path <span class=\"token comment\">#必须配置</span></pre></td></tr><tr><td data-num=\"10\"></td><td><pre> <span class=\"token punctuation\">-</span> categories <span class=\"token comment\">#推荐配置</span></pre></td></tr><tr><td data-num=\"11\"></td><td><pre> <span class=\"token punctuation\">-</span> content<span class=\"token punctuation\">:</span>strip<span class=\"token punctuation\">:</span>truncate<span class=\"token punctuation\">,</span><span class=\"token number\">0</span><span class=\"token punctuation\">,</span><span class=\"token number\">2000</span></pre></td></tr><tr><td data-num=\"12\"></td><td><pre> <span class=\"token punctuation\">-</span> gallery</pre></td></tr><tr><td data-num=\"13\"></td><td><pre> <span class=\"token punctuation\">-</span> photos</pre></td></tr><tr><td data-num=\"14\"></td><td><pre> <span class=\"token punctuation\">-</span> tags</pre></td></tr></table></figure><ol start=\"5\">\n<li>\n<p>点击 All Api Keys - New Api key 创建一个 api key,Indices 选先前让记住的 index,ACL 选下面图片中的选项。</p>\n<p><img data-src=\"https://file.jingxiyuan.cn/images/2022/09/17/2022-09-17-23-47-50.png\" alt=\"2022-09-17-23-47-50.png\" /></p>\n</li>\n<li>\n<p>把第 5 步中新建的 api key 填入到第 4 步中的配置中,到此已经完成了百分之九十,只需要重新编译发布即可。不过编译步骤多了一步,在 hexo g 后需要再执行 hexo algolia,至此搜索功能就大功告成了。</p>\n</li>\n</ol>\n",
|
||||
"tags": []
|
||||
},
|
||||
|
BIN
images/Thumbs.db
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 125 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 126 KiB |
6
rss.xml
@ -10,8 +10,8 @@
|
||||
</author>
|
||||
<description>hito的博客</description>
|
||||
<language>zh-CN</language>
|
||||
<pubDate>Sat, 17 Sep 2022 23:12:02 +0800</pubDate>
|
||||
<lastBuildDate>Sat, 17 Sep 2022 23:12:02 +0800</lastBuildDate>
|
||||
<pubDate>Sat, 17 Sep 2022 23:12:00 +0800</pubDate>
|
||||
<lastBuildDate>Sat, 17 Sep 2022 23:12:00 +0800</lastBuildDate>
|
||||
<category term="hito" />
|
||||
<category term="無言" />
|
||||
<category term="博客" />
|
||||
@ -23,7 +23,7 @@
|
||||
<guid isPermalink="true">https://blog.jingxiyuan.cn/2022/09/17/Hexo-Theme-Shoka-algolia%E6%90%9C%E7%B4%A2%E8%B8%A9%E5%9D%91-1/</guid>
|
||||
<title>Hexo + Theme.Shoka + algolia搜索踩坑</title>
|
||||
<link>https://blog.jingxiyuan.cn/2022/09/17/Hexo-Theme-Shoka-algolia%E6%90%9C%E7%B4%A2%E8%B8%A9%E5%9D%91-1/</link>
|
||||
<pubDate>Sat, 17 Sep 2022 23:12:02 +0800</pubDate>
|
||||
<pubDate>Sat, 17 Sep 2022 23:12:00 +0800</pubDate>
|
||||
<description><![CDATA[ <h1 id="hexo-themeshoka安装"><a class="anchor" href="#hexo-themeshoka安装">#</a> Hexo + Theme.Shoka 安装</h1>
|
||||
<p><a href="https://blog.jingxiyuan.cn/2022/09/14/Hexo%E5%AE%89%E8%A3%85%E6%91%B8%E7%B4%A2/">安装介绍</a></p>
|
||||
<h1 id="algolia注册"><a class="anchor" href="#algolia注册">#</a> algolia 注册</h1>
|
||||
|