Skip to content
Open
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d3e883b
Integrate 'Scalar' openapi plugin to render Real Device Access API
si-net Nov 4, 2025
e103306
Update ref
si-net Nov 4, 2025
973e566
change route
bahrimootaz Nov 4, 2025
0d4c8a5
disable show navLink and include it in themeConfig to avoid having br…
bahrimootaz Nov 4, 2025
f958a1b
onBroken links ignore
bahrimootaz Nov 4, 2025
5bbcffb
Revert "onBroken links ignore"
si-net Nov 4, 2025
06f0a44
Revert "disable show navLink and include it in themeConfig to avoid h…
si-net Nov 4, 2025
bb57ee3
Revert "change route"
si-net Nov 4, 2025
2f5e173
Attempt to fix pre-preview builds
si-net Nov 4, 2025
90fb44d
Define base url so that scalar picks it up
si-net Nov 4, 2025
c037705
onBroken links ignore
bahrimootaz Nov 4, 2025
b79a744
use latest version of @scalar/docusaurus plugin
bahrimootaz Nov 4, 2025
5fb8b27
Force install plugin
si-net Nov 4, 2025
ae332c9
Temporarily force installs for previews to get around version conflicts
si-net Nov 4, 2025
8aeb2d4
More debugging for previews
si-net Nov 4, 2025
a4825af
more debugging
si-net Nov 4, 2025
ac35d59
Print the html of the scalar and link build dir explicitly
si-net Nov 4, 2025
36aafd8
Remove unwanted changes
si-net Nov 4, 2025
6a30369
Merge branch 'main' into integrate-openapi-plugin
si-net Nov 4, 2025
6c99ccb
linebreak
si-net Nov 4, 2025
583bf48
Merge branch 'refs/heads/main' into integrate-openapi-plugin
bahrimootaz Nov 4, 2025
6cf02f7
Change config to allow multiple api references under one heading
si-net Nov 5, 2025
0c185b1
Add temporary link for open api doc
si-net Nov 5, 2025
c8a036b
Revert "Add temporary link for open api doc"
si-net Nov 6, 2025
fa0b879
Merge branch 'main' into integrate-openapi-plugin
bahrimootaz Nov 12, 2025
abf6868
Temporarily add translation of insights API
si-net Nov 12, 2025
e9ffe43
fix inlining
si-net Nov 12, 2025
ef4694e
Try to make PR previews work
si-net Nov 12, 2025
56bdc2d
Simplify
si-net Nov 12, 2025
9adc8e0
temp commit
si-net Nov 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/deploy-pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ jobs:
CLOUDSDK_PYTHON: ${{ env.pythonLocation }}/python

- name: Set Preview Path
run: echo "PREVIEW_PATH=pr-preview/pr-${{ github.event.number }}" >> "$GITHUB_ENV"
run: |
PREVIEW_PATH="pr-preview/pr-${{ github.event.number }}"
echo "PREVIEW_PATH=$PREVIEW_PATH" >> "$GITHUB_ENV"
echo "BASE_URL=/$PREVIEW_PATH/" >> "$GITHUB_ENV"

- name: Install Dependencies
if: github.event.action != 'closed' # Skip if the PR was closed
Expand Down
26 changes: 24 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ if (typeof unwrapJsx !== 'function') {
throw new Error('unwrapJsx plugin is not a function');
}
// Enabling PR previews
let siteBaseUrl = '/';
if (process.env.PREVIEW_PATH) siteBaseUrl += process.env.PREVIEW_PATH;
// Docusaurus will read the BASE_URL env var set in the CI.
// We fall back to '/' for local development.
let siteBaseUrl = process.env.BASE_URL || '/';

const docusaurusConfig = {
title: 'Sauce Labs Documentation',
Expand Down Expand Up @@ -174,6 +175,27 @@ const docusaurusConfig = {
],
],
themes: ['docusaurus-theme-github-codeblock'],
plugins: [
[
'@scalar/docusaurus',
{
id: 'api-reference',
label: 'API Reference',
route: '/api-reference',
showNavLink: true,
configuration: {
sources: [
{
// This title will appear in the top left dropdown within Scalar API doc.
title: 'Real Device Access API',
url: 'https://raw.githubusercontent.com/saucelabs/real-device-api/6b34c94ae9be3af027cad344bcfd01f319ef270d/open_api_specification.yaml',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert previous commit

},
// Append this list to show additional API specifications.
],
},
},
],
],
};

if (!process.env.SAUCE_DOCS_DEV) {
Expand Down
150 changes: 150 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"dependencies": {
"@docusaurus/core": "^3.7.0",
"@docusaurus/preset-classic": "^3.7.0",
"@scalar/docusaurus": "^0.7.21",
"clsx": "^2.1.1",
"docusaurus-theme-github-codeblock": "^2.0.2",
"react": "^19.2.0",
Expand Down