mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00
Docs: use docsearch (#391)
Signed-off-by: Carson Yang <yangchuansheng33@gmail.com>
This commit is contained in:
@@ -110,8 +110,8 @@ defaultContentLanguage = 'zh-cn'
|
||||
listDescTrunc = 100 # Number of characters by which to truncate the list card description
|
||||
|
||||
[params.flexsearch] # Parameters for FlexSearch
|
||||
enabled = true
|
||||
tokenize = "full"
|
||||
# enabled = true
|
||||
# tokenize = "full"
|
||||
# optimize = true
|
||||
# cache = 100
|
||||
# minQueryChar = 3 # default is 0 (disabled)
|
||||
@@ -119,9 +119,9 @@ defaultContentLanguage = 'zh-cn'
|
||||
# searchSectionsIndex = []
|
||||
|
||||
[params.docsearch] # Parameters for DocSearch
|
||||
# appID = "O2QIOCBDAK" # Algolia Application ID
|
||||
# apiKey = "fdc60eee76a72a35d739b54521498b77" # Algolia Search-Only API (Public) Key
|
||||
# indexName = "prod_lotusdocs.dev" # Index Name to perform search on (or set env variable HUGO_PARAM_DOCSEARCH_indexName)
|
||||
appID = "5BEWEMH0YA" # Algolia Application ID
|
||||
apiKey = "14834e919a87217d919d6d881fcacac3" # Algolia Search-Only API (Public) Key
|
||||
indexName = "fastgpt" # Index Name to perform search on (or set env variable HUGO_PARAM_DOCSEARCH_indexName)
|
||||
|
||||
[params.analytics] # Parameters for Analytics (Google, Plausible)
|
||||
# plausibleURL = "/docs/s" # (or set via env variable HUGO_PARAM_ANALYTICS_plausibleURL)
|
||||
|
@@ -19,6 +19,15 @@
|
||||
[search_no_results]
|
||||
other = "没有结果:"
|
||||
|
||||
[search_no_recent_searches]
|
||||
other = "没有最近搜索"
|
||||
|
||||
[search_try_search]
|
||||
other = "试试搜索"
|
||||
|
||||
[search_search_by]
|
||||
other = "搜索提供"
|
||||
|
||||
[feedback_yes]
|
||||
other = "Yes"
|
||||
|
||||
|
39
docSite/layouts/partials/docs/footer/docsearch.html
Normal file
39
docSite/layouts/partials/docs/footer/docsearch.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<script>
|
||||
window.addEventListener('DOMContentLoaded', function() {
|
||||
// DocSearch Config
|
||||
docsearch({
|
||||
container: '#docsearch',
|
||||
appId: '{{ .Site.Params.docsearch.appID }}',
|
||||
apiKey: '{{ .Site.Params.docsearch.apiKey }}',
|
||||
indexName: '{{ .Site.Params.docsearch.indexName }}',
|
||||
placeholder: '{{ i18n "search_title" }}',
|
||||
translations: {
|
||||
button: {
|
||||
buttonText: '{{ i18n "search_title" }}',
|
||||
buttonAriaLabel: '{{ i18n "search_title" }}',
|
||||
},
|
||||
modal: {
|
||||
startScreen: {
|
||||
noRecentSearchesText: '{{ i18n "search_no_recent_searches" }}',
|
||||
},
|
||||
footer: {
|
||||
selectText: '{{ i18n "search_select" }}',
|
||||
selectKeyAriaLabel: 'Enter key',
|
||||
navigateText: '{{ i18n "search_navigate" }}',
|
||||
navigateUpKeyAriaLabel: 'Arrow up',
|
||||
navigateDownKeyAriaLabel: 'Arrow down',
|
||||
closeText: '{{ i18n "search_close" }}',
|
||||
closeKeyAriaLabel: 'Escape key',
|
||||
searchByText: '{{ i18n "search_search_by" }}',
|
||||
},
|
||||
noResultsScreen: {
|
||||
noResultsText: '{{ i18n "search_no_results" }}',
|
||||
suggestedQueryText: '{{ i18n "search_try_search" }}',
|
||||
reportMissingResultsText: 'Believe this query should return results?',
|
||||
reportMissingResultsLinkText: 'Let us know.',
|
||||
},
|
||||
},
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
Reference in New Issue
Block a user