Installations
npm install hexo-generator-searchdb
Score
76.8
Supply Chain
93.8
Quality
78
Maintenance
100
Vulnerability
100
License
Developer
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
No
Node Version
18.11.0
NPM Version
8.19.2
Statistics
69 Stars
53 Commits
5 Forks
2 Watching
3 Branches
9 Contributors
Updated on 13 Nov 2024
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
532,656
Last day
6.7%
538
Compared to previous day
Last week
1%
2,909
Compared to previous week
Last month
4.1%
12,561
Compared to previous month
Last year
63.4%
151,191
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Dev Dependencies
2
hexo-generator-searchdb
Seach data generator plugin for Hexo.
This plugin is used for generating a search index file, which contains all the necessary data of your articles that you can use to write a local search engine for your blog. Supports both XML and JSON format output.
Install
1npm install hexo-generator-searchdb
Options
You can configure this plugin in your root _config.yml
. All the arguments are optional.
1search: 2 path: search.xml 3 field: post 4 content: true 5 format: html
- path - file path. By default is
search.xml
. If the file extension is.json
, the output format will be JSON. Otherwise XML format file will be exported. - field - the search scope you want to search, you can chose:
- post (Default) - will only cover all the posts of your blog.
- page - will only cover all the pages of your blog.
- all - will cover all the posts and pages of your blog.
- content - whether contains the whole content of each article. If
false
, the generated results only cover title and other meta info without mainbody. By default istrue
. - format - the form of the page contents, options are:
- html (Default) - original html string being minified.
- striptags - original html string being minified, and remove all the tags.
- raw - markdown text of each posts or pages.
FAQ
What's this plugin supposed to do?
This plugin is used for generating a xml / json file from your Hexo blog that provides data for searching.
Where's this file saved to?
After executing hexo g
you will get the generated result at your public folder.
How to use this plugin in my Hexo blog?
You have two choices:
-
you don't want to write search engine by yourself. There are many themes that take use this plugin for local searching that works out of box.
-
you are familiar with JavaScript and would like to write your own search engine. You can implement one by yourself according to the template code
search.js
. There is no documentation at present, but you can find its usage in the source code of the theme NexT. Generally there are 3 steps:- write a search view. This is the place for displaying a search form and search results;
- load the
search.js
script via CDN, for example:
1<script src="https://cdn.jsdelivr.net/npm/hexo-generator-searchdb@1.4.0/dist/search.js"></script>
A
LocalSearch
class is provided in thesearch.js
which tells the browser how to grab search data and filter out contents what we're searching;- write a search script, make use of the previous
LocalSearch
class.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
SAST tool detected but not run on all commits
Details
- Info: SAST configuration detected: CodeQL
- Warn: 3 commits out of 13 are checked with a SAST tool
Reason
Found 0/17 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/next-theme/hexo-generator-searchdb/codeql.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/next-theme/hexo-generator-searchdb/codeql.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/next-theme/hexo-generator-searchdb/codeql.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/next-theme/hexo-generator-searchdb/codeql.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/linter.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/next-theme/hexo-generator-searchdb/linter.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/linter.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/next-theme/hexo-generator-searchdb/linter.yml/main?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/linter.yml:15
- Info: 0 out of 6 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:16
- Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:17
- Warn: no topLevel permission defined: .github/workflows/codeql.yml:1
- Warn: no topLevel permission defined: .github/workflows/linter.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Score
3.9
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More