-
Notifications
You must be signed in to change notification settings - Fork 110
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
Is it possible to override theme
in redocOptions?
#16
Comments
Not in If you want then I can export the |
That's okay, I had some suggestions for making the theming more consistent with Docusaurus but I'm realizing it's probably better for me to submit those as pull requests here rather than customizing my own. |
That would be great |
@joshtemple any luck with the PR? I saw you had a PR moving the font weight around but not about overriding the theme. @rohit-gohri You seem to be stripping the "theme" property from the redocOptions in "/docusaurus-theme-redoc/src/index.ts". Is there a way to make it optional for the user to either specify the "primaryColor" or provide a baseTheme object? I just spent hours trying to set things up on my machine to create a PR but failed miserably to setup my environment (quite a noob when it comes to TS, node, and docusaurus). (trying to implement something similar to https://davidgoss.co/blog/api-documentation-redoc-docusaurus/) |
You can already override redocusaurus/example/docusaurus.config.js Lines 27 to 30 in 4f36105
|
Let me know if this solves your problem @bash83, if not then I'll try to add a |
@rohit-gohri I’m actually trying to override the font but figured why not allow user to override any value (I know this might complicate things with dark/light theme but it’s on user to sort it out) |
If you want to override all the values you can just swizzle the component and customize everything, it's just a React component:
Let me know if you face any problems with that. You can also just directly specify your own component with the |
Swizzle now works without JSX Component: yarn docusaurus swizzle docusaurus-theme-redoc Redoc TSX Component: yarn docusaurus swizzle docusaurus-theme-redoc Redoc --typescript I have abstracted away the theme merging logic out of the component, so customizing them should be more straightforward now:
You get two theme configs from plugin data: |
No description provided.
The text was updated successfully, but these errors were encountered: