diff --git a/polaris.shopify.com/content/patterns/resource-index-layout.md b/polaris.shopify.com/content/patterns/resource-index-layout.md index 8a7488e6531..a3727ee981a 100644 --- a/polaris.shopify.com/content/patterns/resource-index-layout.md +++ b/polaris.shopify.com/content/patterns/resource-index-layout.md @@ -6,4 +6,7 @@ previewImg: /images/patterns/pattern-thumbnail-resource-index.png order: 10 githubDiscussionsLink: https://github.com/Shopify/polaris/discussions/8215 contentFile: 'resource-index-layout.ts' +hideFromNav: true +draft: true +noIndex: true --- diff --git a/polaris.shopify.com/pages/patterns/[...slug].tsx b/polaris.shopify.com/pages/patterns/[...slug].tsx index 116be8e465e..a2cc8c631a1 100644 --- a/polaris.shopify.com/pages/patterns/[...slug].tsx +++ b/polaris.shopify.com/pages/patterns/[...slug].tsx @@ -5,6 +5,7 @@ import globby from 'globby'; import matter from 'gray-matter'; import PatternPage from '../../src/components/PatternPage'; +import ComingSoon from '../../src/components/ComingSoon'; import {Pattern, PatternFrontMatter} from '../../src/types'; interface Props extends PatternFrontMatter { @@ -61,6 +62,7 @@ export const getStaticProps: GetStaticProps = async ({ return { props: { ...data, + draft: data.draft || false, pattern, }, }; @@ -80,6 +82,8 @@ export const getStaticPaths: GetStaticPaths = async () => { }; const PatternsPage: NextPage = (props: Props) => { + if (props.draft && process.env.NODE_ENV === 'production') + return ; return ; }; diff --git a/polaris.shopify.com/src/components/ComingSoon/index.tsx b/polaris.shopify.com/src/components/ComingSoon/index.tsx new file mode 100644 index 00000000000..e9bcb9ba8ae --- /dev/null +++ b/polaris.shopify.com/src/components/ComingSoon/index.tsx @@ -0,0 +1,5 @@ +import Page from '../Page'; + +export default function ComingSoon() { + return Coming Soon; +} diff --git a/polaris.shopify.com/src/types.ts b/polaris.shopify.com/src/types.ts index d9548b696d9..c1d19232f41 100644 --- a/polaris.shopify.com/src/types.ts +++ b/polaris.shopify.com/src/types.ts @@ -57,6 +57,7 @@ export interface FrontMatter { export interface PatternFrontMatter extends FrontMatter { previewImg?: string; order?: number; + draft: boolean; githubDiscussionsLink?: string; contentFile: string; }