-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(v2): Add @theme-init components to user theme #3485
Conversation
Deploy preview for docusaurus-2 ready! Built without sensitive environment variables with commit 4a21e1f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's create a separate function for this purpose to avoid code duplicating?
@lex111 - I've put the full iterator logic into a separate function. |
thanks, LGTM |
* Add @theme-init components to user theme * Refactor loadThemeAlias duplicate code to function
Hi @slorber The documentation looks good to me. I even learn something new with |
thanks :) |
Motivation
Swizzled components currently do not have access to
@theme-init
components as it has been introduced in PR#2464 for Docusaurus components.Having access to initial theme components allows overriding default components without having to rewrite the entire component.
This PR extend the initial PR for providing access to
@theme-init
components for custom components.The point has been raised on the Discord channel #docusaurus-2-dogfooding.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Tested with a local instance and a custom code block:
Related PRs