From 5770e296c0463e1919a59564ad9c02436156a523 Mon Sep 17 00:00:00 2001 From: Alex Page Date: Tue, 6 Feb 2024 10:37:46 +1100 Subject: [PATCH] Fix bugs on polaris website --- .../content/components/deprecated/legacy-filters.mdx | 2 +- .../content/design/colors/palettes-and-roles.mdx | 2 +- .../content/design/layout/spacial-organization.mdx | 2 +- .../content/design/typography/font-and-typescale.mdx | 2 +- .../content/design/typography/using-type.mdx | 2 +- polaris.shopify.com/pages/api/search/v0/index.tsx | 9 +++++++-- 6 files changed, 12 insertions(+), 7 deletions(-) diff --git a/polaris.shopify.com/content/components/deprecated/legacy-filters.mdx b/polaris.shopify.com/content/components/deprecated/legacy-filters.mdx index 10749f54a0b..43090b9acf0 100644 --- a/polaris.shopify.com/content/components/deprecated/legacy-filters.mdx +++ b/polaris.shopify.com/content/components/deprecated/legacy-filters.mdx @@ -1,7 +1,7 @@ --- title: Legacy filters shortDescription: Legacy version of the Filters component. Used to filter the items of a list or table. -category: Selection and input +category: Deprecated keywords: - filters - filtering diff --git a/polaris.shopify.com/content/design/colors/palettes-and-roles.mdx b/polaris.shopify.com/content/design/colors/palettes-and-roles.mdx index 0ba535d78f2..6cb644dddf9 100644 --- a/polaris.shopify.com/content/design/colors/palettes-and-roles.mdx +++ b/polaris.shopify.com/content/design/colors/palettes-and-roles.mdx @@ -8,7 +8,7 @@ keywords: - color use - black and white - grayscale -icon: ColorsIcon +icon: ColorIcon --- # Color → {frontmatter.title} diff --git a/polaris.shopify.com/content/design/layout/spacial-organization.mdx b/polaris.shopify.com/content/design/layout/spacial-organization.mdx index cb1ddec169d..b65841c1870 100644 --- a/polaris.shopify.com/content/design/layout/spacial-organization.mdx +++ b/polaris.shopify.com/content/design/layout/spacial-organization.mdx @@ -1,7 +1,7 @@ --- title: Spacial organization order: 1 -icon: BuyButtonButtonLayoutIcon +icon: LayoutBuyButtonHorizontalIcon keywords: - layout - layout components diff --git a/polaris.shopify.com/content/design/typography/font-and-typescale.mdx b/polaris.shopify.com/content/design/typography/font-and-typescale.mdx index 994c7e19bf2..b8bd86fd24b 100644 --- a/polaris.shopify.com/content/design/typography/font-and-typescale.mdx +++ b/polaris.shopify.com/content/design/typography/font-and-typescale.mdx @@ -6,7 +6,7 @@ keywords: - type styles - font sizes - fonts -icon: TextAlignmentLeftIcon +icon: TextAlignLeftIcon hideChildren: true order: 1 --- diff --git a/polaris.shopify.com/content/design/typography/using-type.mdx b/polaris.shopify.com/content/design/typography/using-type.mdx index a41717e6a49..292add76b35 100644 --- a/polaris.shopify.com/content/design/typography/using-type.mdx +++ b/polaris.shopify.com/content/design/typography/using-type.mdx @@ -6,7 +6,7 @@ keywords: - type styles - font sizes - fonts -icon: TypeIcon +icon: TextFontIcon hideChildren: true order: 2 --- diff --git a/polaris.shopify.com/pages/api/search/v0/index.tsx b/polaris.shopify.com/pages/api/search/v0/index.tsx index 6c3f22406c1..ebc7b390c74 100644 --- a/polaris.shopify.com/pages/api/search/v0/index.tsx +++ b/polaris.shopify.com/pages/api/search/v0/index.tsx @@ -19,11 +19,11 @@ import {slugify, stripMarkdownLinks} from '../../../../src/utils/various'; import pages from '../../../../.cache/site'; type IndexablePages = { - [K in keyof typeof pages as (typeof pages)[K]['frontMatter'] extends { + [K in keyof typeof pages as typeof pages[K]['frontMatter'] extends { noIndex: true; } ? never - : K]: (typeof pages)[K]; + : K]: typeof pages[K]; }; const searchablePages = Object.fromEntries( @@ -70,12 +70,17 @@ const getSearchResults = (query?: string) => { title, description = '', category = '', + internalOnly, } = searchablePages[slug].frontMatter as FrontMatter; const url = category ? `/components/${slugify(category)}/${slugify(title)}` : `/components/${slugify(title)}`; + if (internalOnly) { + return; + } + results.push({ id: slugify(`components ${title}`), category: 'components',