Skip to content

Commit 5139857

Browse files
[Portal] fix portal build (#7154)
1 parent ad4341a commit 5139857

File tree

6 files changed

+18201
-15993
lines changed

6 files changed

+18201
-15993
lines changed

apps/portal/public/llms-full.txt

Lines changed: 17344 additions & 15181 deletions
Large diffs are not rendered by default.

apps/portal/public/llms.txt

Lines changed: 843 additions & 803 deletions
Large diffs are not rendered by default.

apps/portal/src/app/references/components/TDoc/Summary.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ export function TypedocSummary(props: {
8585
<Heading
8686
key={Math.random()}
8787
level={s.depth}
88-
id={slugger.slug(s.children[0]?.data?.hName ?? "", false)}
88+
// biome-ignore lint/suspicious/noExplicitAny: complex type
89+
id={slugger.slug((s.children[0] as any)?.value ?? "", false)}
8990
>
9091
<TypedocSummary summary={s.children} />
9192
</Heading>

apps/portal/src/app/references/components/TDoc/utils/getSidebarLinkgroups.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -410,12 +410,17 @@ export function getExtensionName(
410410
extensionBlockTag: BlockTag,
411411
): string | undefined {
412412
try {
413-
const extensionNameString =
414-
extensionBlockTag?.summary?.[0]?.data?.hName || "Common";
415-
416-
if (typeof extensionNameString === "string" && extensionNameString) {
417-
return extensionNameString;
413+
const summary = extensionBlockTag.summary?.[0];
414+
if (summary && "children" in summary) {
415+
const firstChild = summary.children[0];
416+
if (firstChild && "value" in firstChild) {
417+
const extensionNameString = firstChild.value || "Common";
418+
if (typeof extensionNameString === "string" && extensionNameString) {
419+
return extensionNameString;
420+
}
421+
}
418422
}
423+
return undefined;
419424
} catch {
420425
return undefined;
421426
}

apps/portal/src/app/references/components/TDoc/utils/uniqueSlugger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export function uniqueSlugger(options: {
22
base: string;
33
isUnique: (slug: string) => boolean;
44
}) {
5-
const limit = 10;
5+
const limit = 20;
66
const { base, isUnique } = options;
77

88
// if slug is unique, save it and return

apps/portal/src/app/references/typescript/[version]/[[...slug]]/page.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@ const config = getTDocPage({
1212
});
1313

1414
export default config.default;
15-
// TODO: fix duplicate slugs
16-
// export const generateStaticParams = config.generateStaticParams;
15+
export const generateStaticParams = config.generateStaticParams;
1716
export const generateMetadata = config.generateMetadata;

0 commit comments

Comments
 (0)