Skip to content

Commit

Permalink
add api page
Browse files Browse the repository at this point in the history
  • Loading branch information
ToastedDev committed Nov 19, 2023
1 parent d17b677 commit b574a9c
Show file tree
Hide file tree
Showing 5 changed files with 1,436 additions and 11 deletions.
17 changes: 15 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ const config = {

presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
"docusaurus-preset-openapi",
/** @type {import('docusaurus-preset-openapi').Options} */
({
docs: {
sidebarPath: require.resolve("./sidebars.js"),
Expand All @@ -45,6 +45,10 @@ const config = {
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
api: {
path: "spec.yaml",
routeBasePath: "/api",
},
}),
],
],
Expand Down Expand Up @@ -83,6 +87,11 @@ const config = {
position: "right",
label: "Tutorial",
},
{
to: "/api",
label: "API",
position: "right",
},
],
},
footer: {
Expand All @@ -95,6 +104,10 @@ const config = {
label: "Tutorial",
to: "/",
},
{
label: "API",
to: "/api",
},
],
},
{
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
"@easyops-cn/docusaurus-search-local": "^0.36.0",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"docusaurus-preset-openapi": "^0.6.4",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"react-dom": "^17.0.2",
"url-loader": "^4.1.1"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.4.3",
Expand Down
Loading

0 comments on commit b574a9c

Please sign in to comment.