-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
fix(v2): allow search page swizzle #3280
Conversation
Deploy preview for docusaurus-2 ready! Built with commit b5c2ff6 |
@@ -128,6 +128,7 @@ const swizzleAllowedComponents = [ | |||
'SearchBar', | |||
'hooks/useTheme', | |||
'prism-include-languages', | |||
'SearchPage', |
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.
add it to search plugin itself.
module.exports.getSwizzleComponentList = () =>['SearchPage']
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.
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.
in docusaurus-theme-search-algolia/index.js
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.
@anshulrgoyal for now I think we should just allow swizzle, not recommend it, as it's likely we change a bit the implementation of this page, so not adding this array is fine
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.
But yes it shuld not be added to this list in the classic theme anyway
Motivation
To Improve SearchPage to make swizzle cli work on it.
Have you read the Contributing Guidelines on pull requests?
I Did it.
Test Plan
Naviagate to website directory and run:
npm run swizzle @docusaurus/theme-search-algolia SearchPage