-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
How to use theme with standalone tag #1248
Comments
Redoc tag is a regular html tag. It is not web-component. When Redoc js loads it binds to this tag. So you can pass only string via attributes. You can pass the theme as a JSON string:
Alternatively, you can init Redoc manually using |
@RomanHotsiy setting theme on the standalone tag seems doesn't seem to work. Using your example:
I've checked Note I have included |
Oh, my bad, try passing it as a valid json string (not js), use double-quotes.
|
Also having no luck, even with the JSON string. Looking at the source, I'm not sure how it would work - it doesn't look like the theme is parsed before it gets passed to |
@mknaw yes, looks like you are right. I will fix that. |
Redoc contains a list of customizable options in its options object (https://github.com/Redocly/redoc#redoc-options-object). This commit enables that customization inside Javalin's DSL. For each type of object, a builder was created to ease Java's usage, as the language doesn't support default arguments yet. An important point to verify here is that the Theme option, although configurable, won't work with the standalone version currently, due to a bug in Redoc itself (Redocly/redoc#1248). If it gets fixed, the code from this commit will automatically work with it. Closes #1097 Closes #
Just bumping this since the theme is holding me back from being able to use it. |
bump |
1 similar comment
bump |
Since still broken on this redoc version, this guy forked the code to make it work: https://github.com/langhabel/redoc. His simple commit is a few lines above: |
Fixed in #1492 The new version will be published later this week. Thanks for bumping everyone 🙌 ! |
This is still not working on my end. I cannot change the sidebar color no matter what I do. I've even tried overriding the CSS rules but I can't figure out where the sidebar color is even coming from so that's a dead end. Is anyone else still experiencing issues with this using the standalone version? Edit: |
@hheavener-kyd Accoding to https://github.com/Redocly/redoc/pull/1491/files#diff-3b0d0fd534132dcc7f29e23eacce87bb8960ef97b849de3616fab48113f017dfR25 it's working like this:
|
Hi, I am currently using the redoc tag in a Vuejs project. How can I get themes to work with the tag? Do I need to pass it as an Object? A string?
Here is an example:
Any help would be much appreciated. Thanks!
The text was updated successfully, but these errors were encountered: