mirror of
https://github.com/m1k1o/neko.git
synced 2025-07-28 22:18:57 +02:00
add API reference.
This commit is contained in:
parent
a7287dca25
commit
5886d946b2
75 changed files with 9361 additions and 253 deletions
|
@ -1,6 +1,8 @@
|
|||
import {themes as prismThemes} from 'prism-react-renderer';
|
||||
import type {Config} from '@docusaurus/types';
|
||||
import type * as Preset from '@docusaurus/preset-classic';
|
||||
import type * as Plugin from "@docusaurus/types/src/plugin";
|
||||
import type * as OpenApiPlugin from "docusaurus-plugin-openapi-docs";
|
||||
|
||||
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
|
||||
|
||||
|
@ -33,6 +35,7 @@ const config: Config = {
|
|||
{
|
||||
docs: {
|
||||
sidebarPath: './sidebars.ts',
|
||||
docItemComponent: "@theme/ApiItem", // Derived from docusaurus-theme-openapi
|
||||
editUrl: 'https://github.com/m1k1o/neko/tree/main/docs/',
|
||||
lastVersion: 'current',
|
||||
versions: {
|
||||
|
@ -72,7 +75,7 @@ const config: Config = {
|
|||
items: [
|
||||
{
|
||||
type: 'docSidebar',
|
||||
sidebarId: 'tutorialSidebar',
|
||||
sidebarId: 'docsSidebar',
|
||||
position: 'left',
|
||||
label: 'Docs',
|
||||
},
|
||||
|
@ -167,6 +170,30 @@ const config: Config = {
|
|||
additionalLanguages: ['bash'],
|
||||
},
|
||||
} satisfies Preset.ThemeConfig,
|
||||
|
||||
plugins: [
|
||||
[
|
||||
"docusaurus-plugin-openapi-docs",
|
||||
{
|
||||
id: "openapi",
|
||||
docsPluginId: "classic",
|
||||
config: {
|
||||
api: {
|
||||
specPath: "../server/openapi.yaml",
|
||||
outputDir: "docs/api",
|
||||
downloadUrl: "https://raw.githubusercontent.com/m1k1o/neko/refs/heads/master/server/openapi.yaml",
|
||||
sidebarOptions: {
|
||||
groupPathsBy: "tag",
|
||||
categoryLinkSource: "tag",
|
||||
sidebarCollapsed: false,
|
||||
},
|
||||
} satisfies OpenApiPlugin.Options,
|
||||
} satisfies Plugin.PluginOptions,
|
||||
},
|
||||
],
|
||||
],
|
||||
|
||||
themes: ["docusaurus-theme-openapi-docs"],
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue