File tree Expand file tree Collapse file tree 11 files changed +15044
-7718
lines changed
Expand file tree Collapse file tree 11 files changed +15044
-7718
lines changed Original file line number Diff line number Diff line change 3232 - name : Install dependencies
3333 run : pnpm install
3434
35+ - name : Build OpenAPI
36+ run : pnpm docusaurus gen-api-docs all
37+
3538 - name : Build
3639 run : pnpm build
37-
40+
3841 - name : Setup GitHub Pages
3942 uses : actions/configure-pages@v5
4043
Original file line number Diff line number Diff line change 77# Generated files
88.docusaurus
99.cache-loader
10+ /docs /rpc
1011
1112# Misc
1213.DS_Store
Original file line number Diff line number Diff line change 11---
22title : Setup
3- slug : /rpc- setup
3+ slug : /rpc/ setup
44---
55
66# RPC Setup
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11import type * as Preset from "@docusaurus/preset-classic" ;
22import type { Config } from "@docusaurus/types" ;
3+ import type * as OpenApiPlugin from "docusaurus-plugin-openapi-docs" ;
34import { themes as prismThemes } from "prism-react-renderer" ;
45
56const config : Config = {
@@ -23,13 +24,33 @@ const config: Config = {
2324 docs : {
2425 sidebarPath : "./sidebars.ts" ,
2526 routeBasePath : "" ,
27+ docItemComponent : "@theme/ApiItem" ,
2628 } ,
2729 theme : {
2830 customCss : "./src/css/custom.css" ,
2931 } ,
3032 } satisfies Preset . Options ,
3133 ] ,
3234 ] ,
35+ plugins : [
36+ [
37+ "docusaurus-plugin-openapi-docs" ,
38+ {
39+ id : "api" ,
40+ docsPluginId : "classic" ,
41+ config : {
42+ sage_rpc : {
43+ specPath : "src/openapi.json" ,
44+ outputDir : "docs/rpc/" ,
45+ sidebarOptions : {
46+ groupPathsBy : "tag" ,
47+ } ,
48+ } satisfies OpenApiPlugin . Options ,
49+ } ,
50+ } ,
51+ ] ,
52+ ] ,
53+ themes : [ "docusaurus-theme-openapi-docs" ] ,
3354 themeConfig : {
3455 navbar : {
3556 title : "xch.dev" ,
Original file line number Diff line number Diff line change 2020 "@docusaurus/preset-classic" : " 3.7.0" ,
2121 "@mdx-js/react" : " ^3.0.0" ,
2222 "clsx" : " ^2.0.0" ,
23+ "docusaurus-plugin-openapi-docs" : " ^4.5.1" ,
24+ "docusaurus-theme-openapi-docs" : " ^4.5.1" ,
2325 "prism-react-renderer" : " ^2.3.0" ,
2426 "react" : " ^19.0.0" ,
2527 "react-dom" : " ^19.0.0"
You can’t perform that action at this time.
0 commit comments