{"_id":"@aleen42/gitbook-plugin-lunr","name":"@aleen42/gitbook-plugin-lunr","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@aleen42/gitbook-plugin-lunr","description":"Index book in a lunr index accessible from the search plugin","main":"index.js","version":"1.0.0","engines":{"gitbook":">=3.0.0-pre.0"},"dependencies":{"gitbook-plugin-search":"*","html-entities":"1.2.0","lunr":"0.5.12"},"homepage":"https://github.com/GitbookIO/plugin-lunr","repository":{"type":"git","url":"git+https://github.com/GitbookIO/plugin-lunr.git"},"license":"Apache-2.0","bugs":{"url":"https://github.com/GitbookIO/plugin-lunr/issues"},"gitbook":{"properties":{"maxIndexSize":{"type":"number","title":"Limit size for the index","default":1000000},"ignoreSpecialCharacters":{"type":"boolean","title":"Ignore special characters in words","default":false}}},"scripts":{"prepublish":"cp node_modules/lunr/lunr.min.js ./assets/lunr.min.js"},"gitHead":"0503c3ca9a20fd81b38938fe55b0d9ce3db26932","_id":"@aleen42/gitbook-plugin-lunr@1.0.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-kdzEZkfBji4JVxdY8mUtAm6ZXY7wiwZDW6f30R8Dm9h4bX/6Ys0PSWt65zT+yukRsy18RGL+URLIgkYzHwXRNg==","shasum":"ff916f37d50dbbd004639e3b111f2ab1182984aa","tarball":"https://registry.npmjs.org/@aleen42/gitbook-plugin-lunr/-/gitbook-plugin-lunr-1.0.0.tgz","fileCount":12,"unpackedSize":24691,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDt8mzjfhSIH1gn2oAZ/x95wXjaR5D11w1dn04Gmo7+AQIgBOzQSKFhmc/eLC9OH2pEk1157qDfEle+rb9GvJOSWZ8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi3jI2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoCgxAAnNgmaCMfGLikLoukeqAJdJ4NKAf4TFQUquP1CYlyBs4kBlqa\r\ntkHHFE4gdJMia9i8B4OORd5zgtY9l0lyRm+2F78Al3YlP3u+HQiizCEDD9Gm\r\npksyXoo6s8dVCyQOryS2p3CqGe4nZM0vtxavYNResP+J6IZnAlWjRxgenipg\r\n4Zvj6j08lgn0MjlWKtSr19FpdpQenXJSzjLw8UZ4DpPahl+14nnzRGOTA1R2\r\nkOMQpDr2mJezkRwlLYB+by4TTsqCmK+s8dalgzNWY2bmyJuYNzIeX3Nso5LU\r\n/c2+rddSo4TytT/0VdSlBd5yEptqBHs66MJvK2ndomwuAx2Y8d2h8x86TYlR\r\nOSKv9oOH6kAkTrChKvClz/Ui2D8J2ZK3qV/kJgtVqli3ElOS7H833aKC2UY0\r\nekm3qGNEN6QPeyfEbpwR+2MwazCfkzvBzUhOL5cHvKWPd6IBSGBvBmnOo03i\r\naESoXFHWMKf3rj+dmg82LCIR+3x6USItrT++5g1krvJSu2fo7rH+sHtgOjlU\r\nuicMnD065Kk4MpO6hBpqszYfu8axWNRkCuhRPMuNLxVm6gKNm5EHGT+fqWS1\r\n/7GHzixX0LXywjgzueF+0hMMgJRh4NSfRc3n5fuOw6sFd/xPx+6fAvEOLmw+\r\npf90vqT6I6E9Jmo68CnGBuDuEh98APFMqqg=\r\n=GMH/\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aleen42","email":"aleen42@vip.qq.com"},"directories":{},"maintainers":[{"name":"aleen42","email":"aleen42@vip.qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gitbook-plugin-lunr_1.0.0_1658729014440_0.7719028457851211"},"_hasShrinkwrap":false}},"time":{"created":"2022-07-25T06:03:34.385Z","1.0.0":"2022-07-25T06:03:34.637Z","modified":"2022-07-25T06:03:34.782Z"},"maintainers":[{"name":"aleen42","email":"aleen42@vip.qq.com"}],"description":"Index book in a lunr index accessible from the search plugin","homepage":"https://github.com/GitbookIO/plugin-lunr","repository":{"type":"git","url":"git+https://github.com/GitbookIO/plugin-lunr.git"},"bugs":{"url":"https://github.com/GitbookIO/plugin-lunr/issues"},"license":"Apache-2.0","readme":"# lunr\n\nThis plugin provides a backend for the [search](https://github.com/GitbookIO/plugin-search) plugin.\n\nThis plugin is a default plugin.\n\n### Disable this plugin\n\nThis is a default plugin and it can be disabled using a `book.json` configuration:\n\n```js\n{\n    \"plugins\": [\"-lunr\"]\n}\n```\n\n### Limitations\n\nLunr can't index a huge book, by default the index size is limited at ~100ko.\n\nYou can change this limit by settings the configuration `maxIndexSize`:\n\n```js\n{\n    \"pluginsConfig\": {\n        \"lunr\": {\n            \"maxIndexSize\": 200000\n        }\n    }\n}\n```\n\n### Adding keywords to a page\n\nYou can specify explicit keywords for any page. When searching for these keywords, the page will rank higher in the results.\n\n```md\n---\nsearch:\n    keywords: ['keyword1', 'keyword2', 'etc.']\n\n---\n\n# My Page\n\nThis page will rank better if we search for 'keyword1'.\n```\n\n### Disabling indexing of a page\n\nYou can disable the indexing of a specific page by adding a YAML header to the page:\n\n```md\n---\nsearch: false\n---\n\n# My Page\n\nThis page is not indexed in Lunr.\n```\n\n### Ignoring special characters\n\nBy default, special characters will be taken into account, to allow special searches like \"C++\" or \"#word\". You can disable this if your text is essentially English prose with the `ignoreSpecialCharacters` option:\n\n\n```js\n{\n    \"pluginsConfig\": {\n        \"lunr\": {\n            \"ignoreSpecialCharacters\": true\n        }\n    }\n}\n```\n","readmeFilename":"README.md"}