praveenn77 / docusaurus-lunr-search Goto Github PK
View Code? Open in Web Editor NEWLocal / Offline Search for docusaurus
Home Page: https://praveenn77.github.io/docusaurus-lunr-search-demo/
License: MIT License
Local / Offline Search for docusaurus
Home Page: https://praveenn77.github.io/docusaurus-lunr-search-demo/
License: MIT License
Hi,
I am using versioning in my docs. When I search some string f.ex. firewall, it displays results for all versions.
I have tried to exclude router for versions other then the newest with:
[
require.resolve('docusaurus-lunr-search'),
{
excludeRoutes: [
'docs/2.4.2/**/*',
'docs/2.4.1/**/*',
]
}
],
It would be nice to point only to the newest existing document. (It can happen that in new version, some documents are removed), or display version in search results.
Site being tested: https://optimistic-wilson-f4030f.netlify.app/
STR:
With Algolia, you can press Ctrl+K to handily open the search bar.
With docusaurus-lunr-search, there is no such hotkey available, to my knowledge.
Is this something that can be added? I guess it would just a bit of passive JavaScript that listens for this particular keystroke, and then puts the focus in the search bar.
Hi lelouch,
trying to use the lunr-search plugin on Docusaurus 2.0.0-beta.4 having docs in Czech language. The search engine ignores some Czech characters, e.g. the word "čas" (time) in our web pages https://help.4fastdevelopment.cz/docs/DXCAP/Lifecycle.
The same issue can be found in your demo web pages https://lelouch77.github.io/docusaurus-lunr-search-multilang/docs/doc3, the German word "können". You can copy it to search bar and you will see. But the another word with German characters "müssen" on the same page works fine.
Please could you check the search engine or just advise me what to set or change in docusaurus/plugin settings?
Thanks.
a little forgetfulness in the code:
module.exports = {
// ...
plugins: [[ require.resolve('docusaurus-lunr-search'), {
languages: ['en', 'de'] // language codes
}],
}
it should be:
module.exports = {
// ...
plugins: [[ require.resolve('docusaurus-lunr-search'), {
languages: ['en', 'de'] // language codes
}] ],
}
https://lelouch77.github.io/docusaurus-lunr-search-multilang/
When opening the developer tools (in google chrome) an displaying the demo On E.g. an Iphone 5/SE device the search bar will be displayed on a second row.
The official docusaurus instance does this a little bit better by seriously reducing the width
(They change display arround 752px width)
Hi @lelouch77,
I noticed that you copied (commit 9f7a0c9) almost the entire multi language search implementation from my library without any attribution or compliance with the license of my code. Please remove the offending code from your library or comply with the license.
Here's a list of code you copied from me:
It was a lot of work to understand and get multilingual search working.
Seeing you just copying all of that makes me sad and wonder what you'll copy next. 😕
There shouldn't have any console error when clicking the searchbar.
When hovering the searchbar, I get the following console error:
main.5fef3583.js:2 Uncaught TypeError: e.handleSearchBarToggle is not a function
at VM893 c4f5d8e4.e9d8ad2d.js:1
at Object.l (main.5fef3583.js:2)
at p (main.5fef3583.js:2)
at main.5fef3583.js:2
at b (main.5fef3583.js:2)
at lt (main.5fef3583.js:2)
at at (main.5fef3583.js:2)
at ut (main.5fef3583.js:2)
at mt (main.5fef3583.js:2)
at F (main.5fef3583.js:2)
However, it doesn't affect the searchbar behavior, everything works perfectly.
I simply modified src/theme/SearchBar/index.js
at line 69 with the following:
props.handleSearchBarToggle && props.handleSearchBarToggle(!props.isSearchBarExpanded);
I didn't go too deep to find the reason why handleSearchBarToggle wasn't defined at some point but my solution seems to fix the issue.
Maybe I should add a pull request for this ? Or maybe there is a better fix ?
Hi,
The search text in the search bar is not removed once we click the search result.
Unable to search through Chinese, I hope you can help to fix it
This happens only in the development context in current alpha of docusaurus. I don't try to search, i only moving or hovering with the mouse over the field throws the error.
2.0.0-alpha.69
2.1.9
Unhandled Rejection (TypeError): can't access property "forEach", serialised is undefined
before initAlgolia(searchDocs, searchIndex, DocSearch);
because empty array & object is causing the issues.
if(searchDocs.length === 0) {
return;
}
(I know an issue exists, but it has no context or information or response)
I followed the instructions in the readme file and I get
./src/theme/SearchBar/lib/lunar-search.js
Module not found: Can't resolve 'lunr' in '...\_work\docusaurus\my-website\src\theme\SearchBar\lib'chunk 32
32.bafed9d0.js
I used docusaurus init and created the sample project. FYI, I am on Windows.
Even when running in production mode, the search field never gets enabled and removes "Loading...". I see in SearchBar/index.js
that it depends on indexReady
getting toggled. What mechanism affects that? My docusaurus instance is behind a login, so Algolia won't be able to crawl it. I've been under the impression that this component doesn't depend on Algolia and will simply index it locally via lunr.js. Is this correct?
Shows with the following error messages after: npm run build
node_modules/webpack/lib/Compilation.js:3864:12
node_modules/webpack/lib/Cache.js:85:6
node_modules/webpack/lib/Cache.js:39:11
node_modules/webpack/lib/cache/IdleFileCachePlugin.js:66:9
node_modules/webpack/lib/Cache.js:88:6
node_modules/tapable/lib/HookCodeFactory.js:33:10), :30:1)
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
error building locale=en
Request for help, Please
From the README.md
Note: Docusaurus search information can only be generated from a production build. Local development is currently not supported.
It would be nice to have this working in the dev server, Maybe a niche use case but I use Docusaurus as a way to render local notes, and I only ever use the development server (live reloading etc) and never generate production builds.
I know I'm likely missing something as to why this isn't possible. In the meantime if this isn't a planned feature it might be nice to hide or visually disable the search box while in dev mode.
I am integrating local search into my companies DocusaurusV2 website and it seems that the more popular plugins for local search are yours and cmfcmf's. I love the default styling that Aglolia and your package provides, but the build process that cmfcmf implements is cleaner (using the docusaurus postBuild lifecycle to generate the search metadata). Have you considered implementing a similar build process vs the build-search-data.js
node script?
I'd be willing to contribute if you're interested!
A lot of editors respect the .editorconfig or have a plugin for that. It allows to adjust the setting based on folders.
I suggest to copy the .editorconfig from docusaurus
https://github.com/facebook/docusaurus/blob/master/.editorconfig
Site under test: https://optimistic-wilson-f4030f.netlify.app/
After typing in "Payload" and hitting enter, we're redirected to a "null" link :https://optimistic-wilson-f4030f.netlify.app/null
The slug of the page is set to "/" (it's a main page) so probably that's the issue here
Also the links displayed are "Payload#" instead of "Payload"
Some pages are using tabs to organize information. When we try searching for information that is in the tabs it does not always show in the search results, it might be that search results do come up for active tabs but not inactive ones.
Here is a CodeSandbox to reproduce the problem. Try to search for anything that is underneath a tab section and see that it does not show in the results (there are tabs in the Tab Bug section under tutorial)
I had first reported the issue to docusaurus here
Docusaurus supports Node.js version >= 10.15.1, but this package only supports Node.js version >= 12 after adding worker_threads, a Node.js 12 API. This should be clearly noted in the README.md.
I can't install this package on my docusaurus project with version ^2.0.0-beta.6.
Lunr doesn't index any files out of my docs
folder .md files
I have about 98 .md files in my docusaurus site:
> find docs/ -name '*.md' | wc -l
98
When I docusaurus build
the site. it shows:
[INFO] [en] Creating an optimized production build...
[...]
docusaurus-lunr-search:: Building search docs and lunr index file
docusaurus-lunr-search:: Start scanning documents in 16 threads
docusaurus-lunr-search:: Indexing time: 454.61ms
docusaurus-lunr-search:: indexed 0 documents out of 100
docusaurus-lunr-search:: writing search-doc.json
docusaurus-lunr-search:: writing search-doc-1644309064310.json
docusaurus-lunr-search:: writing lunr-index.json
docusaurus-lunr-search:: writing lunr-index-1644309064310.json
docusaurus-lunr-search:: End of process
I do have broken links in my Markdown files, could this affect lunr indexing?
[WARNING] Docusaurus found broken links!
I'm using the following versions
@docusaurus/[email protected]
[email protected]
My configuration in docusaurus.config.js
is simply:
// ...
plugins: [
[
'docusaurus-lunr-search', {
}
]
],
Any idea what could cause this? Let me know if you need more info to reproduce it.
Docusaurus swizzle
command fails to copy the SearchBar to src/theme/SearchBar.
npm i docusaurus-lunr-search --save
npm install
before the swizzle command to update, build, and link the packages.
2. Then run docusaurus swizzle
npm run swizzle docusaurus-lunr-search SearchBar -- --danger
The swizzle command works fine now.
npx @docusaurus/init@latest initi my-website classic
npm i docusaurus-lunr-search --save
npm run swizzle docusaurus-lunr-search SearchBar -- --danger
swizzle
success message:https://github.com/lelouch77/docusaurus-lunr-search.
If you skip this step, your site will not be enabled with the Lunr search box feature.
Hi @lelouch77 , really thanks for this awesome repogitory.
I found that If I'm using this repo with docs only mode of docusaurus, the root docs is not indexed.
Thanks.
i have a same problem with cmfcmf/docusaurus-search-local#12 for lang "ja"
TypeError: lunr.TinySegmenter is not a constructor
at ${dir}/node_modules/lunr-languages/lunr.ja.js:86:21
when i put the code below to node_modules/lunr-languages/lunr.ja.js
, build was successful.
require('./tinyseg.js')(lunr) // + add
var segmenter = new lunr.TinySegmenter() // インスタンス生成
thanks
Hello I added the plugin and did all the steps mentioned in the docs. However, the build fails with this error below. I'm using the latest version of docusaurus. Is there anything that I'm missing?
"@docusaurus/core": "^2.0.0-alpha.70",
"@docusaurus/preset-classic": "^2.0.0-alpha.70",
Client bundle compiled with errors therefore further build is impossible.
./src/theme/SearchBar/lib/lunar-search.js
Module not found: Error: Can't resolve '@generated/lunr.client' in '/Users/saugat/Code/docs/src/theme/SearchBar/lib'
@ ./src/theme/SearchBar/lib/lunar-search.js 1:0-41 1:41-45 1:216-220 1:391-395 1:471-475
@ ./src/theme/SearchBar/lib/DocSearch.js
@ ./src/theme/SearchBar/index.js
@ ./node_modules/@docusaurus/theme-classic/lib-next/theme/Navbar/index.js
@ ./node_modules/@docusaurus/theme-classic/lib-next/theme/Layout/index.js
@ ./node_modules/@docusaurus/theme-classic/lib-next/theme/NotFound.js
@ ./node_modules/@docusaurus/core/lib/client/exports/ComponentCreator.js
@ ./.docusaurus/routes.js
@ ./node_modules/@docusaurus/core/lib/client/clientEntry.js
@ multi ./node_modules/@docusaurus/core/lib/client/clientEntry.js
As in the question, how to customize the search bar?
It's seems not be changed. Thanks~~
Hi lelouch, How would it be possible for the search engine to also index the titles of the menus in the left bar?
I have tried with indexBaseUrl: true
but they don't appear.
thx
Hi, Docusaurus maintainer here
I'm testing the latest alpha 75 release (Webpack 5) on a few sites, and this one is failing to upgrade due to this plugin: nextauthjs/next-auth#1826
Error: Conflict: Multiple chunks emit assets to the same filename server.bundle.js (chunks 179 and 462)
at /Users/sebastienlorber/Desktop/projects/next-auth/www/node_modules/webpack/lib/Compilation.js:3864:12
at /Users/sebastienlorber/Desktop/projects/next-auth/www/node_modules/webpack/lib/Cache.js:85:6
at /Users/sebastienlorber/Desktop/projects/next-auth/www/node_modules/webpack/lib/Cache.js:39:11
at /Users/sebastienlorber/Desktop/projects/next-auth/www/node_modules/webpack/lib/cache/IdleFileCachePlugin.js:66:9
at /Users/sebastienlorber/Desktop/projects/next-auth/www/node_modules/webpack/lib/Cache.js:88:6
at eval (eval at create (/Users/sebastienlorber/Desktop/projects/next-auth/www/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:30:1)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
You have webpack optimizations here:
configureWebpack(config) {
const generatedFilesDir = config.resolve.alias['@generated']
languages = utils.generateLunrClientJS(generatedFilesDir, options.languages);
// Ensure that algolia docsearch css is its own chunk
return {
optimization: {
splitChunks: {
cacheGroups: {
algolia: {
name: 'algolia',
test: /algolia\.css$/,
chunks: `all`,
enforce: true,
// Set priority higher than docusaurus single-css extraction
priority: 60,
},
},
},
},
};
},
Removing these optimizations makes the plugin work again on alpha 75, so I suggest to remove those for now to ensure everybody can upgrade.
Not sure why this does not work anymore though, nor why we have this error message.
Was also wondering why you need this optimization, as the algolia code/plugin is already in a distinct package. Maybe it's a legacy optim?
Unrelated: the call to generateLunrClientJS
would probably be better in another lifecycle like contentLoaded()
(but in practice it is probably not very important).
The Algolia plugin also has, at the bottom of the search ('Click here to see the rest of the results (n....results)')
Clicking this takes you to
yoursite.com/search which is a more standard search page. Would it be possible to create a version of this that works with Lunr, because currently your search only shows 5 results and sometimes that's not enough.
Can this package be renamed from docusurus-lunr-search
to docusaurus-lunr-search
?
I follow the steps as they are in this repo, but I have the following errors:
yarn start
or npm run start
./src/theme/SearchBar/lib/lunar-search.js
Module not found: Can't resolve '@generated/lunr.client' in 'E:\AAAPLICACIONES\DOCUSAURUS\my-website\src\theme\SearchBar\lib'
yarn run build
or npm run build
:Client bundle compiled with errors therefore further build is impossible.
./src/theme/SearchBar/lib/lunar-search.js
Module not found: Error: Can't resolve '@generated/lunr.client' in 'E:\AAAPLICACIONES\DOCUSAURUS\my-website\src\theme\SearchBar\lib'
@ ./src/theme/SearchBar/lib/lunar-search.js 1:0-41 1:41-45 1:216-220 1:391-395 1:471-475
@ ./src/theme/SearchBar/lib/DocSearch.js
@ ./src/theme/SearchBar/index.js
@ ./src/theme/Navbar/index.js
@ ./src/theme/Layout/index.js
@ ./src/theme/NotFound.js
@ ./node_modules/@docusaurus/core/lib/client/exports/ComponentCreator.js
@ ./.docusaurus/routes.js
@ ./node_modules/@docusaurus/core/lib/client/clientEntry.js
@ multi ./node_modules/@docusaurus/core/lib/client/clientEntry.js
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\eloyf\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]~prebuild: [email protected]
6 info lifecycle [email protected]~build: [email protected]
7 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~build: PATH: C:\Users\eloyf\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;E:\AAAPLICACIONES\DOCUSAURUS\my-website\node_modules\.bin;C:\Python27\;C:\Python27\Scripts;C:\Python38\Scripts\;C:\Python38\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\Java\jdk1.8.0_211\bin;C:\Program Files (x86)\Yarn\bin\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Hugo\bin;C:\xampp\php;C:\composer;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\Users\eloyf\AppData\Local\Microsoft\WindowsApps;C:\Users\eloyf\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\eloyf\AppData\Local\Yarn\bin;C:\Users\eloyf\AppData\Local\Android\Sdk;C:\Users\eloyf\AppData\Local\Android\Sdk\platform-tools;C:\Users\eloyf\AppData\Roaming\npm;C:\Users\eloyf\AppData\Local\GitHubDesktop\bin;C:\Users\eloyf\AppData\Roaming\Composer\vendor\bin;C:\Users\eloyf\AppData\Local\Programs\Microsoft VS Code Insiders\bin
9 verbose lifecycle [email protected]~build: CWD: E:\AAAPLICACIONES\DOCUSAURUS\my-website
10 silly lifecycle [email protected]~build: Args: [ '/d /s /c', 'docusaurus build' ]
11 silly lifecycle [email protected]~build: Returned: code: 1 signal: null
12 info lifecycle [email protected]~build: Failed to exec build script
13 verbose stack Error: [email protected] build: `docusaurus build`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\eloyf\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\eloyf\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1051:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid [email protected]
15 verbose cwd E:\AAAPLICACIONES\DOCUSAURUS\my-website
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\eloyf\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
18 verbose node v14.3.0
19 verbose npm v6.14.7
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] build: `docusaurus build`
22 error Exit status 1
23 error Failed at the [email protected] build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
I followed the readme file.
But after building cannot find any Search Bar.
What am I missing?
The build throws an error in this line:
ref: select('.anchor', currentSection)?.properties.id,
Do you testing in netlify or build
folder? i have problem when using netlify and using build folder to own server for production.
Hi, just want to make sure: "Note: Docusaurus search information can only be generated from a production build. Local development is currently not supported."
Build your Docusaurus project
npm run build
Serve your application
npx http-server ./build
This makes the production build. I can see SearchBox but it is not searching. I am missing something?
Thanks.
At the moment, i overwrite the style, but the variables from docusaurus should be used like i do and the support is integrated and match the colors from the project.
This id far from perfect, but no a bright overlay anymore
html[data-theme='dark'] .algolia-docsearch-suggestion--category-header,
html[data-theme='dark'] .algolia-docsearch-suggestion--wrapper,
html[data-theme='dark'] .algolia-docsearch-footer {
background: var(--ifm-background-color);
color: var(--ifm-font-color-base);
}
html[data-theme='dark'] .algolia-docsearch-suggestion--title {
color: var(--ifm-font-color-base);
}
html[data-theme='dark'] .ds-cursor .algolia-docsearch-suggestion--wrapper {
background: var(--ifm-background-surface-color);
}
Get the following error when running command npm i docusaurus-lunr-search --save
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"^17.0.1" from the root project
npm ERR! peer react@"^16.8.4 || ^17.0.0" from @docusaurus/[email protected]
npm ERR! node_modules/@docusaurus/core
npm ERR! @docusaurus/core@"2.0.0-beta.3" from the root project
npm ERR! peer @docusaurus/core@"^2.0.0-alpha.60 || ^2.0.0" from [email protected]
npm ERR! node_modules/docusaurus-lunr-search
npm ERR! docusaurus-lunr-search@"2.1.14" from the root project
npm ERR! 1 more (react-dom)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.4" from [email protected]
npm ERR! node_modules/docusaurus-lunr-search
npm ERR! docusaurus-lunr-search@"2.1.14" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
Here is my package.json
:
{
"name": "developer-docs",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "2.0.0-beta.3",
"@docusaurus/preset-classic": "2.0.0-beta.3",
"@mdx-js/react": "^1.6.21",
"@svgr/webpack": "^5.5.0",
"clsx": "^1.1.1",
"file-loader": "^6.2.0",
"prism-react-renderer": "^1.2.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"url-loader": "^4.1.1"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^2.0.0-beta.3",
"@tsconfig/docusaurus": "^1.0.2",
"@types/react": "^17.0.14",
"@types/react-helmet": "^6.1.2",
"@types/react-router-dom": "^5.1.8",
"typescript": "^4.3.5"
}
}
Site under test:
https://optimistic-wilson-f4030f.netlify.app/
Try to search for a phrase present in the text of the documents, for example "A brief description" - text is not found
Please correct me if I'm doing something wrong, but searching in " " doesn't work too.
The search design (as seen on the official Docusaurus docs - https://v2.docusaurus.io/) has been Improved. Was wondering if there are any plans to update to this design? Thanks!
When I run npm run build
, I get an error like this:
algolia.css
URI malformed at decodeURI (<anonymous>)
I temporarily fixed this by replacing the background-image
property in the last declaration block .algolia-autocomplete .algolia-docsearch-footer--logo
in the algolia.css
file with this line:
.algolia-autocomplete .algolia-docsearch-footer--logo {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF8AAAAGCAYAAAClzULKAAAABHNCSVQICAgIfAhkiAAAACtJREFUSEtjZBgFAxYCjANm86jFDKOBP4CJYDTwRwN/AENgAK0eTfkDGPgAKC8ABxS+xFUAAAAASUVORK5CYII=');
...
While it works fine, but I wonder what the cause of the problem? And how to fix this error permanently?
Function.lunr.Pipeline.load
C:\Users\Karan\Desktop\TargeV2\rust-doc\node_modules\lunr\lunr.js:575
572 | lunr.Pipeline.load = function (serialised) {
573 | var pipeline = new lunr.Pipeline
574 |
575 | serialised.forEach(function (fnName) {
576 | var fn = lunr.Pipeline.registeredFunctions[fnName]
577 |
578 | if (fn) {
View compiled
Function.lunr.Index.load
C:\Users\Karan\Desktop\TargeV2\rust-doc\node_modules\lunr\lunr.js:2286
2283 | invertedIndex = Object.create(null),
2284 | serializedInvertedIndex = serializedIndex.invertedIndex,
2285 | tokenSetBuilder = new lunr.TokenSet.Builder,
2286 | pipeline = lunr.Pipeline.load(serializedIndex.pipeline)
| ^ 2287 |
2288 | if (serializedIndex.version != lunr.version) {
2289 | lunr.utils.warn("Version mismatch when loading serialised index. Current version of lunr '" + lunr.version + "' does not match serialized index '" + serializedIndex.version + "'")
View compiled
new LunrSearchAdapter
webpack-internal:///./src/theme/SearchBar/lib/lunar-search.js:3:266
new DocSearch
C:/Users/Karan/Desktop/TargeV2/rust-doc/src/theme/SearchBar/lib/DocSearch.js:141
138 | /**
139 | * Returns thesource
method to be passed to autocomplete.js. It will query
140 | * the Algolia index and call the callbacks with the formatted hits.
141 | * @function getAutocompleteSource
| ^ 142 | * @param {function} transformData An optional function to transform the hits
143 | * @param {function} queryHook An optional function to transform the query
144 | * @returns {function} Method to be passed as thesource
option of
Getting this error when following the guide help please
!!!!!!!!
This shows up after fixing #42.
Doesn't deploy to GitHub pages either. Is this a problem with lazy loading?
You cannot scroll the results, in the mobile version, instead the bottom page moves.
/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
title: 'My Site',
tagline: 'Dinosaurs are cool',
url: 'https://your-docusaurus-test-site.com',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.png',
organizationName: 'facebook', // Usually your GitHub org/user name.
projectName: 'docusaurus', // Usually your repo name.
themeConfig: {
colorMode: {
defaultMode: 'light',
disableSwitch: true
},
navbar: {
logo: {
alt: 'My Site Logo',
src: 'img/logo.png',
},
items: [
{
position: 'right',
href: "https://qq.com",
label: '联系客服',
},
{href: 'https://qq.com', label: '问题反馈', position: 'right'},
{to: '/', label: '操作说明', position: 'right'},
{to: '/', label: ' ', position: 'right', className: 'ssp_user'},
],
},
},
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
routeBasePath: '/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
[require.resolve('docusaurus-lunr-search'), {}]
],
};
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.