Add Lunr.js for client-side search functionality and implement search results display
- Integrated Lunr.js library for indexing and searching content. - Created search.js to handle search queries and display results dynamically. - Implemented displayResults function to format and show search results. - Enhanced search functionality with boosted fields for title and content. - Added search.min.js for optimized production use.
This commit is contained in:
7
package-lock.json
generated
7
package-lock.json
generated
@@ -10,6 +10,7 @@
|
||||
"dependencies": {
|
||||
"autoprefixer": "^10.4.21",
|
||||
"cjs-loader": "^0.1.0",
|
||||
"lunr": "^2.3.9",
|
||||
"postcss": "^8.5.1",
|
||||
"postcss-cli": "^11.0.1"
|
||||
},
|
||||
@@ -415,6 +416,12 @@
|
||||
"url": "https://github.com/sponsors/antonk52"
|
||||
}
|
||||
},
|
||||
"node_modules/lunr": {
|
||||
"version": "2.3.9",
|
||||
"resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz",
|
||||
"integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.11",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
|
||||
|
||||
Reference in New Issue
Block a user