Skip to content

Commit

Permalink
Ensure we load stoplight css first so that base styles get overridden
Browse files Browse the repository at this point in the history
  • Loading branch information
GideonShils committed Oct 26, 2023
1 parent 632bc4d commit e4f3ebb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
5 changes: 5 additions & 0 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,11 @@ var siteSettings = {
},
{rel: 'icon', href: '/img/favicon.png', type: 'image/png'},
{rel: 'icon', href: '/img/favicon.svg', type: 'image/svg+xml'},
{
href: "https://unpkg.com/@stoplight/elements/styles.min.css",
type: "text/css",
crossorigin: "anonymous"
},
],
};

Expand Down
27 changes: 10 additions & 17 deletions website/src/components/stoplight/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,15 @@ export default function Stoplight({ version }) {
return null;
}
return (
<>
<link
href="https://unpkg.com/@stoplight/elements/styles.min.css"
type="text/css"
rel="stylesheet"
/>
<API
apiDescriptionUrl={
"https://raw.githubusercontent.com/dbt-labs/dbt-cloud-openapi-spec/master/openapi-" +
version +
".yaml"
}
platformUrl={useBaseUrl("/")}
basePath={useBaseUrl("/dbt-cloud/api-" + version) + "#"}
hideSchemas
/>
</>
<API
apiDescriptionUrl={
"https://raw.githubusercontent.com/dbt-labs/dbt-cloud-openapi-spec/master/openapi-" +
version +
".yaml"
}
platformUrl={useBaseUrl("/")}
basePath={useBaseUrl("/dbt-cloud/api-" + version) + "#"}
hideSchemas
/>
);
}

0 comments on commit e4f3ebb

Please sign in to comment.