Skip to content

Commit

Permalink
开启next: local_search功能
Browse files Browse the repository at this point in the history
  • Loading branch information
kaierwen committed Aug 15, 2024
1 parent 93bd5e5 commit 44d0cd2
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _config.next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ algolia_search:
# Local Search
# Dependencies: https://github.com/next-theme/hexo-generator-searchdb
local_search:
enable: false
enable: true
# If auto, trigger search by changing input.
# If manual, trigger search by pressing enter key or search button.
trigger: auto
Expand Down
9 changes: 9 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,12 @@ theme: next
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
type:
# Search
# 配置本地搜索,主站配置 hexo config
# 需要安装插件:$ npm install hexo-generator-searchdb --save
# 详细配置请参考:https://theme-next.js.org/docs/third-party-services/search-services.html#Local-Search
# search:
# path: search.xml
# field: post
# content: true
# format: html
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"hexo-generator-archive": "^2.0.0",
"hexo-generator-category": "^2.0.0",
"hexo-generator-index": "^4.0.0",
"hexo-generator-searchdb": "^1.4.1",
"hexo-generator-tag": "^2.0.0",
"hexo-renderer-ejs": "^2.0.0",
"hexo-renderer-marked": "^6.3.0",
Expand Down
9 changes: 8 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,13 @@ hexo-generator-index@^4.0.0:
dependencies:
hexo-pagination "3.0.0"

hexo-generator-searchdb@^1.4.1:
version "1.4.1"
resolved "https://registry.npmjs.org/hexo-generator-searchdb/-/hexo-generator-searchdb-1.4.1.tgz"
integrity sha512-7m8IBpZbI6iKb2jRYxs4pghD6Ln8ylQSRGl6MIC4G9wws21vYSXSD8rvC3MoCO+pWBHs6E/mTA/rjG+p2AZfVg==
dependencies:
nunjucks "^3.2.2"

hexo-generator-tag@^2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/hexo-generator-tag/-/hexo-generator-tag-2.0.0.tgz"
Expand Down Expand Up @@ -1116,7 +1123,7 @@ normalize-path@^3.0.0, normalize-path@~3.0.0:
resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz"
integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==

nunjucks@^3.2.3:
nunjucks@^3.2.2, nunjucks@^3.2.3:
version "3.2.4"
resolved "https://registry.npmjs.org/nunjucks/-/nunjucks-3.2.4.tgz"
integrity sha512-26XRV6BhkgK0VOxfbU5cQI+ICFUtMLixv1noZn1tGU38kQH5A5nmmbk/O45xdyBhD1esk47nKrY0mvQpZIhRjQ==
Expand Down

0 comments on commit 44d0cd2

Please sign in to comment.