Skip to content

Commit

Permalink
Add reference landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
caesay committed Mar 3, 2024
1 parent d3f8d68 commit 23d51bf
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 9 deletions.
9 changes: 9 additions & 0 deletions docs/reference/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import DocCardList from '@theme/DocCardList';

# Library Reference
The documentation in this library reference is auto-generated from inline comments in the library code.

If there are inaccuracies here, please submit a PR to the code comments on the library repository itself
rather than to the docs repository.

<DocCardList />
27 changes: 18 additions & 9 deletions sidebars.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import type { SidebarsConfig, PropSidebarItemHtml, PropSidebarItemLink } from '@docusaurus/plugin-content-docs';

function link(label: string, href: string): PropSidebarItemLink {
function link(label: string, href: string, description?: string): PropSidebarItemLink {
return {
type: 'link',
label: label,
href: href,
description,
}
}

Expand Down Expand Up @@ -73,19 +74,27 @@ const sidebars: SidebarsConfig = {
auto("migrating", "Migrating", "Learn how to migrate your existing application to Velopack."),
],
referenceSidebar: [
title("Library Reference"),
auto("reference/cs", "C#", "The C# API reference for Velopack. See the available namespaces below."),
doc("reference/cpp/api", "C++"),
{
type: 'category',
label: "JS",
label: "Library Reference",
link: { type: 'doc', id: "reference/index" },
collapsed: false,
collapsible: false,
items: [
{ type: "autogenerated", dirName: "reference/js/classes" },
{ type: "autogenerated", dirName: "reference/js/enums" },
auto("reference/cs", "C#", "The C# API reference for Velopack. See the available namespaces below."),
doc("reference/cpp/api", "C++"),
{
type: 'category',
label: "JS",
items: [
{ type: "autogenerated", dirName: "reference/js/classes" },
{ type: "autogenerated", dirName: "reference/js/enums" },
],
link: { type: 'generated-index' },
},
link("Rust", "https://docs.rs/velopack", "Link to docs.rs/velopack"),
],
link: { type: 'generated-index' },
},
link("Rust", "https://docs.rs/velopack"),
]
};

Expand Down

0 comments on commit 23d51bf

Please sign in to comment.