Skip to content

Commit

Permalink
docs cleanup to only protos
Browse files Browse the repository at this point in the history
  • Loading branch information
mgild committed May 21, 2024
1 parent 4a1f7f6 commit 629e7c8
Show file tree
Hide file tree
Showing 17 changed files with 3,837 additions and 1,056 deletions.
106 changes: 53 additions & 53 deletions plugins/docusaurus-plugin-api-docs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,11 @@ export default function apiDocsPlugin(
const sortedTypedocItems = sidebarItems[version].sort(sortPackages);
const protoSidebarItems = protobufSidebarItems[version] ?? [];
const versionSidebarItems: PropSidebarItem[] = [
{
type: "link",
label: "Overview",
href: normalizeUrl(["/api"]),
},
// {
// type: "link",
// label: "Overview",
// href: normalizeUrl(["/api"]),
// },
{
type: "html",
value: '<div class="sidebar-buffer" />',
Expand All @@ -378,54 +378,54 @@ export default function apiDocsPlugin(
type: "html",
value: '<div class="sidebar-buffer" />',
},
{
type: "html",
className: "heading_icon__typescript",
value: " <b>Typescript</b>",
},
{
type: "html",
value: '<hr class="dropdown-separator">',
},
...sortedTypedocItems,
{
type: "html",
value: '<div class="sidebar-buffer" />',
},
{
type: "html",
className: "heading_icon__rust",
value: " <b>Rust</b>",
},
{
type: "html",
value: '<hr class="dropdown-separator">',
},
{
type: "link",
label: "switchboard-common",
href: "https://docs.rs/switchboard-common/latest/switchboard_common/",
},
{
type: "link",
label: "switchboard-evm",
href: "https://docs.rs/switchboard-evm/latest/switchboard_evm/",
},
{
type: "link",
label: "switchboard-solana",
href: "https://docs.rs/switchboard-solana/latest/switchboard_solana/",
},
{
type: "link",
label: "switchboard-utils",
href: "https://docs.rs/switchboard-utils/latest/switchboard_utils/",
},
{
type: "link",
label: "[deprecated ]switchboard-v2",
href: "https://docs.rs/switchboard-v2/latest/switchboard_v2/",
},
// {
// type: "html",
// className: "heading_icon__typescript",
// value: " <b>Typescript</b>",
// },
// {
// type: "html",
// value: '<hr class="dropdown-separator">',
// },
// ...sortedTypedocItems,
// {
// type: "html",
// value: '<div class="sidebar-buffer" />',
// },
// {
// type: "html",
// className: "heading_icon__rust",
// value: " <b>Rust</b>",
// },
// {
// type: "html",
// value: '<hr class="dropdown-separator">',
// },
// {
// type: "link",
// label: "switchboard-common",
// href: "https://docs.rs/switchboard-common/latest/switchboard_common/",
// },
// {
// type: "link",
// label: "switchboard-evm",
// href: "https://docs.rs/switchboard-evm/latest/switchboard_evm/",
// },
// {
// type: "link",
// label: "switchboard-solana",
// href: "https://docs.rs/switchboard-solana/latest/switchboard_solana/",
// },
// {
// type: "link",
// label: "switchboard-utils",
// href: "https://docs.rs/switchboard-utils/latest/switchboard_utils/",
// },
// {
// type: "link",
// label: "[deprecated ]switchboard-v2",
// href: "https://docs.rs/switchboard-v2/latest/switchboard_v2/",
// },
// {
// type: "html",
// value: '<div class="sidebar-buffer" />',
Expand Down
22 changes: 11 additions & 11 deletions plugins/docusaurus-plugin-api-docs/src/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import { normalizeUrl } from "@docusaurus/utils";

/** Map of category label to sort priority */
export const SIDEBAR_PRIORITY: Map<string, number> = new Map([
["Overview", 1],
["@switchboard-xyz/cli", 5],
["@switchboard-xyz/common", 10],
["@switchboard-xyz/oracle", 11],
["@switchboard-xyz/aptos.js", 21],
["@switchboard-xyz/evm.js", 31],
// skip 10, evm might be popular
["@switchboard-xyz/near.js", 51],
["@switchboard-xyz/solana.js", 61],
["@switchboard-xyz/starknet.js", 71],
["@switchboard-xyz/sui.js", 81],
// ["Overview", 1],
// ["@switchboard-xyz/cli", 5],
// ["@switchboard-xyz/common", 10],
// ["@switchboard-xyz/oracle", 11],
// ["@switchboard-xyz/aptos.js", 21],
// ["@switchboard-xyz/evm.js", 31],
// // skip 10, evm might be popular
// ["@switchboard-xyz/near.js", 51],
// ["@switchboard-xyz/solana.js", 61],
// ["@switchboard-xyz/starknet.js", 71],
// ["@switchboard-xyz/sui.js", 81],
]);

export const sortPackages = (a: PropSidebarItem, b: PropSidebarItem) => {
Expand Down
Loading

0 comments on commit 629e7c8

Please sign in to comment.