Skip to content
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(theme): allow override redoc theme inside docusaurus.config file #129

Merged
merged 3 commits into from
Feb 25, 2022

Conversation

serut
Copy link
Contributor

@serut serut commented Feb 24, 2022

Hey !

I spent a little bit of time on your lib. It's cool, great work !

I added an attribute inside docusaurus.config file, named redocTheme, to allow deep modification of the redoc theme.
I'm open if you have something else in your mind for this var.

I also lint the project so the file /home/leo/CS/rs-dev/redocusaurus/packages/docusaurus-theme-redoc/src/theme/ServerStyle/index.tsx is also bringed by this PR.

Some notes

You should note that nodemon is used in your package.json but is not inside dev dependencies.
But anyway, the command yarn dev is not working on my side, I have no output...
image
When I hit Ctrl+C it shows the log :
image
Hopefully yarn build is OK.

I first tryed to develop this feature using my real Webapp with symlink to your modules, but it was hell 🔥. So I will wait you accept and publish this PR


Maintainer notes:
Closes #98

@changeset-bot
Copy link

changeset-bot bot commented Feb 24, 2022

🦋 Changeset detected

Latest commit: 717d36b

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Owner

@rohit-gohri rohit-gohri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This overall looks great! Thanks for the PR, this will actually close #98 I think.

Can you also update the readme of the theme package and add this new option there? Maybe with a warning that this might break dark theme overrides.

Thanks for pointing out the nodemon thing, I have it installed globally so didn't notice it. Will fix it.

* NOTE: Variables taken from infima
* @see https://github.com/facebookincubator/infima/blob/master/packages/core/styles/common/variables.pcss
*/
const LIGHT_THEME_OPTIONS: RedocThemeOverrides = {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice refactor! Good idea to separate font and colors

@rohit-gohri rohit-gohri added the enhancement New feature or request label Feb 25, 2022
@rohit-gohri rohit-gohri merged commit 9cae5f9 into rohit-gohri:main Feb 25, 2022
@github-actions github-actions bot mentioned this pull request Feb 25, 2022
@rohit-gohri
Copy link
Owner

Released as v0.8.0! Thank you for the PR

@serut
Copy link
Contributor Author

serut commented Feb 25, 2022

Thanks !

@rohit-gohri rohit-gohri mentioned this pull request Mar 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How do I configure redoc typography?
2 participants