-
Notifications
You must be signed in to change notification settings - Fork 163
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
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
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?
![Screenshot 2024-06-19 at 17 07 35](https://private-user-images.githubusercontent.com/1577992/341125793-bef007d5-491d-4f6d-95fe-93d7a897fcc5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ2Mzg0MzgsIm5iZiI6MTcyNDYzODEzOCwicGF0aCI6Ii8xNTc3OTkyLzM0MTEyNTc5My1iZWYwMDdkNS00OTFkLTRmNmQtOTVmZS05M2Q3YTg5N2ZjYzUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjZUMDIwODU4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YmIzY2ExZjYxY2RjNTM3ZTQ5MmZjYWUxYzI4OTAxZjVlZTYxNTBkOTMwZjU3N2MzNmNiZDY4NjFmNTdhNzFiOCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.s3H2BvzHZxY2rtzJBqvcbTOw4H6-aOT8NSocLYHF9qg)
33b116d
to
6e34c59
Compare
Preview deployed to https://59a5457b-83d5-4dc7-90ef-e8fcf81d945a--scalar-deploy-preview.netlify.app |
closed in favour of #2198 |
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.