From 6017ab1fd821e37e6a40db5c39da4607cb1cd7de Mon Sep 17 00:00:00 2001 From: Arista Indrajaya Date: Wed, 13 Mar 2024 15:57:08 +0700 Subject: [PATCH] docs: Update API reference documentation to incorporate scalar implementation This commit introduces enhancements to the API reference documentation by implementing a scalar feature. The changes encompass both the user interface (UI) and functionality aspects, ensuring better clarity and usability for users interacting with the API documentation. --- docs/docusaurus.config.js | 16 ++++++++++++++-- docs/package.json | 1 + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 43334c988..f414c4b26 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -113,7 +113,19 @@ const config = { ], //To input custom Plugin - path.resolve(__dirname, 'plugins', 'changelog-plugin'), + // path.resolve(__dirname, 'plugins', 'changelog-plugin'), + [ + '@scalar/docusaurus', + { + label: '', + route: '/api-reference', + configuration: { + spec: { + url: 'https://aindrajaya.github.io/openapi-spec/openapi.json', + }, + }, + } + ], ], // The classic preset will relay each option entry to the respective sub plugin/theme. @@ -160,7 +172,7 @@ const config = { specs: [ { spec: "openapi/jan.yaml", // can be local file, url, or parsed json object - route: "/api-reference/", // path where to render docs + route: "/api-reference-old/", // path where to render docs }, ], theme: { diff --git a/docs/package.json b/docs/package.json index 2764786ba..7967a9bb9 100644 --- a/docs/package.json +++ b/docs/package.json @@ -26,6 +26,7 @@ "@heroicons/react": "^2.0.18", "@mdx-js/react": "^3.0.0", "@redocly/cli": "^1.4.1", + "@scalar/docusaurus": "^0.1.1", "autoprefixer": "^10.4.16", "axios": "^1.5.1", "clsx": "^1.2.1",