mirror of
https://github.com/amehime/hexo-theme-shoka.git
synced 2026-04-05 10:42:51 +08:00
fix
This commit is contained in:
@@ -161,6 +161,25 @@ autoprefixer:
|
||||
|
||||
缺少这个插件,首页卡片翻转效果在部分浏览器中无法正确显示。
|
||||
|
||||
## algolia配置建议
|
||||
|
||||
```yml
|
||||
algolia:
|
||||
appId: #Your appId
|
||||
apiKey: #Your apiKey
|
||||
adminApiKey: #Your adminApiKey
|
||||
chunkSize: 5000
|
||||
indexName: #"shoka"
|
||||
fields:
|
||||
- categories
|
||||
- content:strip:truncate,0,2000
|
||||
- gallery
|
||||
- path
|
||||
- photos
|
||||
- tags
|
||||
- title
|
||||
```
|
||||
|
||||
## feed配置建议
|
||||
|
||||
```yml
|
||||
|
||||
@@ -407,8 +407,8 @@ const algoliaSearch = function(pjax) {
|
||||
container: '#search-hits',
|
||||
templates: {
|
||||
item: function(data) {
|
||||
var cats = data.categories.join('<i class="ic i-angle-right"></i>')
|
||||
return '<a href="' + CONFIG.root + data.path +'"><span>'+cats+'</span>'+data._highlightResult.title.value+'</a>';
|
||||
var cats = data.categories ? '<span>'+data.categories.join('<i class="ic i-angle-right"></i>')+'</span>' : '';
|
||||
return '<a href="' + CONFIG.root + data.path +'">'+cats+data._highlightResult.title.value+'</a>';
|
||||
},
|
||||
empty: function(data) {
|
||||
return '<div id="hits-empty">'+
|
||||
|
||||
Reference in New Issue
Block a user