Skip to content

Commit

Permalink
website: hasApi
Browse files Browse the repository at this point in the history
  • Loading branch information
ilg-ul committed Nov 19, 2024
1 parent b0ee21f commit 636bf5b
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 4 deletions.
2 changes: 0 additions & 2 deletions website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,3 @@ categories or groups.
[!NOTE]
There is also another plugin, `docusaurus-plugin-typedoc-api`, but
it is no longer maintained.

1
47 changes: 45 additions & 2 deletions website/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,46 @@ const config: Config = {
disableInDev: false,
},
],
[
'docusaurus-plugin-typedoc',
{
// https://typedoc-plugin-markdown.org/docs/options#display-options
blockTagsPreserveOrder: [
"@example"
],
categorizeByGroup: false, // Otherwise it fails to load the sidebar.
classPropertiesFormat: "list", // "table" not, it may have examples
entryPointStrategy: "resolve",
entryPoints: [
"../src/index.ts"
],
enumMembersFormat: "table",
excludeExternals: true,
excludeInternal: true,
expandObjects: true,
expandParameters: true,
indexFormat: "table",
interfacePropertiesFormat: "list", // "table" not, it may have examples
logLevel: "Verbose",
parametersFormat: "table",
plugin: [
"typedoc-plugin-markdown"
],
propertyMembersFormat: "table",
readme: "none",
skipErrorChecking: true,
sort: [
"instance-first",
"visibility"
],
tsconfig: '../tsconfig.json',
"tableColumnSettings": {
"leftAlignHeaders": true
},
typeDeclarationFormat: "table",
useCodeBlocks: false, // Nice, but it might be mistaken for examples.
}
],

// Local plugins.
'./src/plugins/SelectReleasesPlugin',
Expand Down Expand Up @@ -263,6 +303,11 @@ const config: Config = {
],
},
cliNavbar,
{
to: '/docs/api',
label: 'API Reference',
position: 'left',
},
{
type: 'dropdown',
to: '/blog',
Expand Down Expand Up @@ -384,6 +429,4 @@ const config: Config = {
customFields: customFields,
};

logger.info(config.baseUrl);

export default config;
1 change: 1 addition & 0 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"metadataDescription": "The xPack Component Manager command line tool",
"metadataKeywords": "xcdl, xpack, components, manager, cli, cdl, ecos",
"hasCli": "true",
"hasApi": "true",
"isInstallGlobally": "true",
"shareOnTwitter": "true",
"hasTopHomepageFeatures": "true",
Expand Down
12 changes: 12 additions & 0 deletions website/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Automatically generated from docusaurus-template-liquid/templates/docusaurus.

import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
import typedocSidebarItems from "./docs/api/typedoc-sidebar.cjs";
import cliSidebar from "./sidebar-cli";
import {userSidebarCategory} from "./sidebar-user";

Expand Down Expand Up @@ -78,6 +79,17 @@ const sidebars: SidebarsConfig = {
label: 'Maintainer Information'
},
],
typedocSidebar: [
{
type: "category",
label: "API Reference (TypeDoc)",
link: {
type: "doc",
id: "api/index",
},
items: typedocSidebarItems,
},
],
cliSidebar

};
Expand Down

0 comments on commit 636bf5b

Please sign in to comment.