-
Notifications
You must be signed in to change notification settings - Fork 921
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
Replace static Swagger-ui distribution with unpkg version #1604
Conversation
Sure, happy to help, looks good from a quick glance but agree we'll need to check it works - is there a reason why you can't test it in your own project? |
Currently don't have a local Docsy project running and got confused by |
Ah, gotcha - an easy way is to just look at the Netlify deploy preview as our docs use a huge range of Docsy features, but we don't have a Swagger UI page in the Docsy docs so the changes won't do anything in the site (other than confirm that they don't break anything else, that all seems fine....). My usual slightly clunky approach (which is what I'll do if I need to test this :) ) is to clone/use a clone of the Docsy Example site, make the local overrides to the theme, add a Swagger UI page with the Swagger test "pet store" API, and then run it either locally or with Netlify and see whether the page shows up properly. @chalin any thoughts? |
Seems to be working fine! To test this, I modified the following lines in the # hugo module configuration
[module]
# uncomment line below for temporary local development of module
replacements = "github.com/theletterf/docsy -> ../../docsy"
[module.hugoVersion]
extended = true
min = "0.110.0"
[[module.imports]]
path = "github.com/theletterf/docsy"
disable = false
[[module.imports]]
path = "github.com/google/docsy/dependencies"
disable = false The only thing that bothers me is that the version number of the spec appears with white background, which makes it hard to read. Would it make sense to add some CSS? |
@LisaFC Even though it's slightly out of scope, I've fixed the color issue and added a |
Oh that looks great! I see what you mean about the background contrast issue - @chalin what do you think? |
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.
Great, thanks! LGTM
@LisaFC - can you give your stamp of approval too? |
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.
LGTM now.
Can you rebase your PR to HEAD of main, please?
@deining Done |
Can't merge on my own! |
@LisaFC - still awaiting your approval here |
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.
Looks fantastic - sorry for the late review.
This PR removes the static assets for swagger-ui and adds unpkg includes instead. I've also edited the docs accordingly.