Replies: 2 comments
-
hey @bogminic The problem in your exemple is that you don't re-export the validateOptions, leading to your enhanced blog plugin options not be "normalized" and having undefined options while our default plugin provides default values. I've fixed your code and provided a runnable example for everyone to look at here: |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks a lot, @slorber ! Your guidance helped me fix the issue. Adding |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Docusaurus team,
I'm trying to extend the blog plugin to save all blog tags to
globalData
. I followed the approach suggested in #5856, but it's not working. I'm getting the following error:My Setup
I created a custom blog plugin (
blogPluginEnhanced.ts
) and registered it indocusaurus.config.ts
. The plugin extends the default blog plugin and addsblogTags
toglobalData
.📌 CodeSandbox Reproduction: https://codesandbox.io/p/devbox/musing-dhawan-h9r7lr
🔹 Docusaurus version:
3.7.0
🔹 Node version:
20
Here’s my enhanced blog plugin:
In
docusaurus.config.ts
, I register it like this:Issue
The site fails to reload with:
I suspect that something in the plugin options is causing
path
to beundefined
. Any ideas on how to fix this?Thanks in advance! 🚀
Beta Was this translation helpful? Give feedback.
All reactions