Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/developer-hub/content/docs/openapi/fortuna/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Overview
description: Overview of the Fortuna API
---

{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
Expand Down
6 changes: 4 additions & 2 deletions apps/developer-hub/src/components/Pages/BasePage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ import { getMDXComponents } from "../../../mdx-components";
export function BasePage(props: { params: { slug: string[] } }) {
const page = source.getPage(props.params.slug);
if (!page) notFound();

// @ts-expect-error - body is a property of PageData, but not defined in the types
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not great

const MDX = page.data.body;

return (
// @ts-expect-error - toc and full are properties of PageData, but not defined in the types
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
<DocsPage toc={page.data.toc} full={page.data.full}>
<DocsTitle>{page.data.title}</DocsTitle>
<DocsDescription>{page.data.description}</DocsDescription>
Expand Down
2 changes: 1 addition & 1 deletion apps/developer-hub/src/components/Root/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { RootProviders } from "@pythnetwork/component-library/AppShell";
import { RootProvider as FumadocsRootProvider } from "fumadocs-ui/provider";
import { RootProvider as FumadocsRootProvider } from "fumadocs-ui/provider/next";
import { NuqsAdapter } from "nuqs/adapters/next/app";
import type { ReactNode } from "react";

Expand Down
2 changes: 1 addition & 1 deletion apps/developer-hub/src/lib/get-llm-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export async function getLLMText(page: InferPageType<typeof source>) {
});

// note: it doesn't escape frontmatter, it's up to you.
return `# ${page.data.title}
return `# ${page.data.title ?? ""}
URL: ${page.url}

${String(processed.value)}`;
Expand Down
7 changes: 3 additions & 4 deletions apps/developer-hub/src/lib/source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
} from "@phosphor-icons/react/dist/ssr";
import type { InferMetaType, InferPageType } from "fumadocs-core/source";
import { loader } from "fumadocs-core/source";
import { transformerOpenAPI } from "fumadocs-openapi/server";
import { openapiPlugin } from "fumadocs-openapi/server";
import { createElement } from "react";

import { docs } from "../../.source";
Expand Down Expand Up @@ -56,9 +56,8 @@ export const source = loader({
},
source: docs.toFumadocsSource(),
pageTree: {
// types are very similar but not exactly the same
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
transformers: [transformerOpenAPI()],
// @ts-expect-error - types are very similar but not exactly the same
transformers: [openapiPlugin()],
},
});

Expand Down
941 changes: 695 additions & 246 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ catalog:
dnum: ^2.14.0
eslint: ^9.23.0
framer-motion: ^12.6.3
fumadocs-core: ^15.7.12
fumadocs-mdx: ^11.10.0
fumadocs-ui: ^15.7.12
fumadocs-openapi: ^9.3.8
fumadocs-core: ^16.0.5
fumadocs-mdx: ^13.0.2
fumadocs-ui: ^16.0.5
fumadocs-openapi: ^9.7.1
fumadocs-typescript: ^4.0.8
highlight.js: ^11.11.1
ip-range-check: ^0.2.0
Expand Down
Loading