-
Notifications
You must be signed in to change notification settings - Fork 138
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(api-reference): cdn custom header example #1775
base: main
Are you sure you want to change the base?
Conversation
|
15ab53f
to
33b116d
Compare
@@ -25,6 +25,6 @@ | |||
var apiReference = document.getElementById('api-reference') | |||
apiReference.dataset.configuration = JSON.stringify(configuration) | |||
</script> | |||
<script src="http://localhost:5053/@scalar/fastify-api-reference/js/browser.js"></script> | |||
<script src="http://localhost:5053/reference/@scalar/fastify-api-reference/js/browser.js"></script> |
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.
This seems to have been broken at some point.
#2321 Bundle Size — 1.78MiB (~+0.01%).Bundle metrics
|
Current #2321 |
Baseline #2310 |
|
---|---|---|
Initial JS | 1.78MiB (~+0.01% ) |
1.78MiB |
Initial CSS | 0B |
0B |
Cache Invalidation | 100% |
0% |
Chunks | 1 |
1 |
Assets | 1 |
1 |
Modules | 1091 |
1091 |
Duplicate Modules | 0 |
0 |
Duplicate Code | 0% |
0% |
Packages | 152 |
152 |
Duplicate Packages | 0 |
0 |
Bundle analysis report Branch brynn/doc-1640-cdn-custom-header... Project dashboard
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.
Shouldn't we ALWAYS be flexin?
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.
This is great! When testing it like this:
pnpm --filter @scalar-examples/cdn-api-reference dev
http://127.0.0.1:3173/api-reference-local-header.html
I see double scrollbars, though. That’s not how it’s supposed to look, is it?
33b116d
to
6e34c59
Compare
Preview deployed to https://59a5457b-83d5-4dc7-90ef-e8fcf81d945a--scalar-deploy-preview.netlify.app |
Another swing at making it easier to add a header to the CDN references. The main change here is that we add
display: flex;
andmin-height: 0;
to the injected references container which should make it easier to add elements around it and shouldn't break anyones layouts.