diff --git a/app/[locale]/[...slug]/page.tsx b/app/[locale]/[...slug]/page.tsx index 7d1183d26..87c69f598 100644 --- a/app/[locale]/[...slug]/page.tsx +++ b/app/[locale]/[...slug]/page.tsx @@ -117,6 +117,7 @@ export default async function Page(props: { interactive: page.data.interactive, title: page.data.title, description: page.data.description, + isBeta: page.data.isBeta, interactiveFeatures: page.data.interactiveFeatures, interactiveLinks, // Use the processed links with React components }; @@ -207,6 +208,11 @@ export default async function Page(props: {
+ {page.data.isBeta && ( + + BETA + + )} {page.data.isRpc && ( - + diff --git a/components/layouts/docs.tsx b/components/layouts/docs.tsx index 7abc9bcf8..929dd889e 100644 --- a/components/layouts/docs.tsx +++ b/components/layouts/docs.tsx @@ -304,6 +304,9 @@ export function SidebarItem({ item, children }: { item: PageTree.Node; children: const sidebarTitle = (item as any).data?.sidebarTitle; const displayName = sidebarTitle || item.name; const isRootPage = (item as any).data?.root === true; + // Hide badges for sidebar items that are folder index pages shown as children + // These are duplicates - the folder itself already shows the badge + const isFolderIndexAsChild = sidebarTitle === 'Overview'; return ( {item.icon} {displayName} - + {!isFolderIndexAsChild && }
); @@ -416,6 +419,7 @@ export function PageBadges({ item }: { item: PageTree.Node }) { const badges: React.ReactNode[] = []; const isNew = (item as any).data?.isNew; + const isBeta = (item as any).data?.isBeta; if (isNew) { badges.push( @@ -428,6 +432,17 @@ export function PageBadges({ item }: { item: PageTree.Node }) { ); } + if (isBeta) { + badges.push( + + Beta + , + ); + } + const openapi = (item as any).data?.openapi; const operations = openapi?.operations || []; diff --git a/components/layouts/page.tsx b/components/layouts/page.tsx index 2b76aab3f..450df87dc 100644 --- a/components/layouts/page.tsx +++ b/components/layouts/page.tsx @@ -22,6 +22,7 @@ export interface PageData { interactive?: boolean; title?: string; description?: string; + isBeta?: boolean; interactiveFeatures?: string[]; interactiveLinks?: Array<{ title: string; diff --git a/content/docs/en/tools/chainhooks/index.mdx b/content/docs/en/tools/chainhooks/index.mdx index b58fab979..ad0c55b4b 100644 --- a/content/docs/en/tools/chainhooks/index.mdx +++ b/content/docs/en/tools/chainhooks/index.mdx @@ -3,6 +3,7 @@ title: Chainhooks sidebarTitle: Overview description: Chainhooks is a webhook service for the Stacks blockchain that lets you register event streams and define precise filters to capture on-chain data as it happens. llm: false +isBeta: true --- :::callout diff --git a/lib/source.ts b/lib/source.ts index df7599b88..ac52ce8a8 100644 --- a/lib/source.ts +++ b/lib/source.ts @@ -617,6 +617,10 @@ export const source = loader({ dataToAdd.sidebarTitle = frontmatter.sidebarTitle; } + if (frontmatter?.isBeta) { + dataToAdd.isBeta = frontmatter.isBeta; + } + // if (frontmatter?.root) { // dataToAdd.root = frontmatter.root; // } diff --git a/source.config.ts b/source.config.ts index 1710cf4e1..7170139b6 100644 --- a/source.config.ts +++ b/source.config.ts @@ -10,6 +10,7 @@ export const docs = defineDocs({ schema: frontmatterSchema.extend({ llm: z.boolean().optional(), isNew: z.boolean().optional(), + isBeta: z.boolean().optional(), publishedAt: z.string().optional(), sidebarTitle: z.string().optional(), root: z.boolean().optional(),