diff --git a/website/src/components/LeftSidebar/ReferenceSidebar.astro b/website/src/components/LeftSidebar/ReferenceSidebar.astro index 24551388c..1ae3fc822 100644 --- a/website/src/components/LeftSidebar/ReferenceSidebar.astro +++ b/website/src/components/LeftSidebar/ReferenceSidebar.astro @@ -25,8 +25,11 @@ let currentPageMatch = currentPage.slice(BASE_URL.length, currentPage.endsWith(' { docs .filter(({ tags }) => !tags?.find((t) => t.title === 'noautocomplete')) - .map(({ longname, name }) => { - const link = 'ref/' + longname; + .filter(({ name, description }) => name && !name.startsWith('_') && !!description) + // @ts-ignore + .sort((a, b) => a.name.localeCompare(b.name)) + .map(({ name }) => { + const link = 'ref/' + name; const url = Astro.site?.pathname + link; return (
  • diff --git a/website/src/pages/ref/[ref].astro b/website/src/pages/ref/[ref].astro index b86314734..31524af91 100644 --- a/website/src/pages/ref/[ref].astro +++ b/website/src/pages/ref/[ref].astro @@ -4,11 +4,11 @@ import { docs } from '../../../../doc.json'; import JsDoc from '../../docs/JsDoc.astro'; export function getStaticPaths() { - return docs.map((doc) => [{ params: { ref: doc.longname } }]); + return docs.map((doc) => [{ params: { ref: doc.name } }]); } const { ref } = Astro.params; -const entry = docs.find((d) => d.longname === ref); +const entry = docs.find((d) => d.name === ref); if (!entry) { return; } @@ -16,5 +16,5 @@ if (!entry) {

    {entry!.name}

    - +