feat(search): add snippetLength config for search results (#296)

This commit is contained in:
Dillon
2020-05-01 02:34:17 +08:00
committed by GitHub
parent 1af17ef1a3
commit 79df5c667e
7 changed files with 33 additions and 15 deletions

View File

@@ -227,6 +227,8 @@ Please open the code block below to view the complete sample configuration :(far
placeholder = ""
# {{< version 0.2.1 >}} max number of results length
maxResultLength = 10
# {{< version 0.2.3 >}} snippet length of the result
snippetLength = 30
# {{< version 0.2.1 >}} HTML tag name of the highlight part in results
highlightTag = "em"
[params.search.algolia]
@@ -979,6 +981,8 @@ Here is the search configuration in your [site configuration](#site-configuratio
placeholder = ""
# {{< version 0.2.1 >}} max number of results length
maxResultLength = 10
# {{< version 0.2.3 >}} snippet length of the result
snippetLength = 30
# {{< version 0.2.1 >}} HTML tag name of the highlight part in results
highlightTag = "em"
[params.search.algolia]

View File

@@ -232,6 +232,8 @@ Please open the code block below to view the complete sample configuration :(far
placeholder = ""
# {{< version 0.2.1 >}} max number of results length
maxResultLength = 10
# {{< version 0.2.3 >}} snippet length of the result
snippetLength = 30
# {{< version 0.2.1 >}} HTML tag name of the highlight part in results
highlightTag = "em"
[params.search.algolia]
@@ -984,6 +986,8 @@ Here is the search configuration in your [site configuration](#site-configuratio
placeholder = ""
# {{< version 0.2.1 >}} max number of results length
maxResultLength = 10
# {{< version 0.2.3 >}} snippet length of the result
snippetLength = 30
# {{< version 0.2.1 >}} HTML tag name of the highlight part in results
highlightTag = "em"
[params.search.algolia]

View File

@@ -228,9 +228,11 @@ hugo
contentLength = 4000
# 搜索框的占位提示语
placeholder = ""
# 最大结果数目
# {{< version 0.2.1 >}} 最大结果数目
maxResultLength = 10
# 搜索结果中高亮部分的 HTML 标签
# {{< version 0.2.3 >}} 结果内容片段长度
snippetLength = 50
# {{< version 0.2.1 >}} 搜索结果中高亮部分的 HTML 标签
highlightTag = "em"
[params.search.algolia]
index = ""
@@ -982,9 +984,11 @@ defaultContentLanguage = "zh-cn"
contentLength = 4000
# 搜索框的占位提示语
placeholder = ""
# 最大结果数目
# {{< version 0.2.1 >}} 最大结果数目
maxResultLength = 10
# 搜索结果中高亮部分的 HTML 标签
# {{< version 0.2.3 >}} 结果内容片段长度
snippetLength = 50
# {{< version 0.2.1 >}} 搜索结果中高亮部分的 HTML 标签
highlightTag = "em"
[params.search.algolia]
index = ""