Skip to content

Commit

Permalink
deps: Add scalar package
Browse files Browse the repository at this point in the history
  • Loading branch information
m1sk9 committed Aug 18, 2024
1 parent 5b8ef41 commit 567884e
Show file tree
Hide file tree
Showing 7 changed files with 2,773 additions and 19 deletions.
8 changes: 7 additions & 1 deletion components/ScalarAPIReference.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@ import '@scalar/api-reference-react/style.css';
* @return The API reference component.
*/
export default function ScalarAPIReference() {
// https://github.com/scalar/scalar/blob/main/documentation/configuration.md
return (
<ApiReferenceReact
configuration={{
theme: 'none',
isEditable: false,
darkMode: true,
hideDarkModeToggle: true,
searchHotKey: 's',
theme: 'bluePlanet',
// TODO: Support testing the API reference with a staring server
spec: {
url: 'https://raw.githubusercontent.com/pulsate-dev/pulsate/main/resources/schema.json',
},
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"postinstall": "lefthook install"
},
"dependencies": {
"@scalar/api-reference-react": "^0.3.79",
"@scalar/nextjs-api-reference": "^0.4.79",
"next": "^14.2.5",
"nextra": "^2.13.4",
"nextra-theme-docs": "^2.13.4",
Expand Down
10 changes: 0 additions & 10 deletions pages/_meta.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,5 @@
"theme": {
"layout": "raw"
}
},
"other": {
"title": "Other",
"type": "menu",
"items": {
"api-reference": {
"title": "API Reference",
"href": "/api"
}
}
}
}
2 changes: 1 addition & 1 deletion pages/_meta.ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"type": "menu",
"items": {
"api-reference": {
"title": "API リファレンス",
"title": "Pulsate API Document",
"href": "/api"
}
}
Expand Down
3 changes: 0 additions & 3 deletions pages/api.en.mdx

This file was deleted.

Loading

0 comments on commit 567884e

Please sign in to comment.