🌌 Fast, dependency-free, full-text and vector search engine with typo tolerance, filters, facets, stemming, and more. Works with any JavaScript runtime, browser, server, service!
When I attempt to start my Docusaurus site with a configuration that has blogs disabled the Orama Docusarus plugin throws an error.
The config file docusaurus.config.js contains this line to disable the blog functionality
blog: false,
This is the error I receive
[ERROR] TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at /Users/user-redacted/Dev/github/GitHub/repo-redacted/node_modules/@orama/plugin-docusaurus-v3/lib/index.js:73:43
at Array.forEach (<anonymous>)
at Object.allContentLoaded (/Users/user-redacted/Dev/github/GitHub/repo-redacted/node_modules/@orama/plugin-docusaurus-v3/lib/index.js:52:24)
at /Users/user-redacted/Dev/github/GitHub/repo-redacted/node_modules/@docusaurus/core/lib/server/plugins/plugins.js:91:22
at async /Users/user-redacted/Dev/github/GitHub/repo-redacted/node_modules/@docusaurus/core/lib/server/plugins/plugins.js:108:76
at async Promise.all (index 4)
at async /Users/user-redacted/Dev/github/GitHub/repo-redacted/node_modules/@docusaurus/core/lib/server/plugins/plugins.js:106:9
at async /Users/user-redacted/Dev/github/GitHub/repo-redacted/node_modules/@docusaurus/core/lib/server/plugins/plugins.js:146:40
at async loadSite (/Users/user-redacted/Dev/github/GitHub/repo-redacted/node_modules/@docusaurus/core/lib/server/site.js:127:45)
at async createReloadableSite (/Users/user-redacted/Dev/github/GitHub/repo-redacted/node_modules/@docusaurus/core/lib/commands/start/utils.js:46:16)
at async Command.start (/Users/user-redacted/Dev/github/GitHub/repo-redacted/node_modules/@docusaurus/core/lib/commands/start/start.js:22:28)
If I enable blog with this line it works
blog: { }, // Blog needs to be enabled for search to work
To Reproduce
Install Docusaurus
Disable the blog via the Docusaurus config blog: false
Install DOcusaurus Orama plugin
Start site
Expected behavior
I expect the plugin to skip the blog feature if it is disabled.
Describe the bug
When I attempt to start my Docusaurus site with a configuration that has blogs disabled the Orama Docusarus plugin throws an error.
The config file
docusaurus.config.js
contains this line to disable the blog functionalityThis is the error I receive
If I enable blog with this line it works
To Reproduce
blog: false
Expected behavior
I expect the plugin to skip the blog feature if it is disabled.
Environment Info
Affected areas
Search
Additional context
Remove these lines from
node_modules/@orama/plugin-docusaurus-v3/lib/index.js
"fixes" the issue in my case as I don't use blog functionality.