Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 src/components/ProductCatalog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ const ProductCatalog = ({ products }: { products: ProductData[] }) => {
{productList.map((product) => {
return (
<a
key={product.data.name}
href={product.data.product.url}
className="block self-stretch rounded-md border border-solid border-gray-200 p-3 !text-inherit no-underline hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800"
>
Expand Down
18 changes: 11 additions & 7 deletions src/pages/products.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro";
import { getIconData, iconToSVG } from "@iconify/utils";
import ProductCatalog from "~/components/ProductCatalog";
import type { ProductData } from "~/components/ProductCatalog";
import type { StarlightPageProps } from "@astrojs/starlight/props";

let products: CollectionEntry<"products">[] = await getCollection(
"products",
Expand All @@ -31,15 +32,18 @@ let productData: ProductData[] = products.map((product) => {
};
});

const frontmatter = {
title: "Products",
description:
"API reference, how-to guides, tutorials, example code, and more.",
template: "splash",
} as const;
const props = {
frontmatter: {
title: "Products",
description:
"API reference, how-to guides, tutorials, example code, and more.",
template: "splash",
},
hideBreadcrumbs: true,
} as StarlightPageProps;
---

<StarlightPage frontmatter={frontmatter}>
<StarlightPage {...props}>
<ProductCatalog products={productData} client:load />
</StarlightPage>

Expand Down
Loading