From 2e02e6e8bf3f83129179e9b211593d42971ef600 Mon Sep 17 00:00:00 2001 From: Kevin Wang Date: Fri, 5 Aug 2022 16:27:08 -0400 Subject: [PATCH] enable content exclusion on `cloud-docs` --- pages/cloud-docs/[[...page]].tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pages/cloud-docs/[[...page]].tsx b/pages/cloud-docs/[[...page]].tsx index 438cba4651..e851fb1358 100644 --- a/pages/cloud-docs/[[...page]].tsx +++ b/pages/cloud-docs/[[...page]].tsx @@ -6,6 +6,7 @@ import { getStaticGenerationFunctions } from '@hashicorp/react-docs-page/server' import path from 'path' import { rehypePlugins, remarkPlugins } from 'lib/remark-rehype-plugins' import { remarkRewriteAssets } from 'lib/remark-rewrite-assets' +import { remarkTfeContentExclusion } from 'lib/remark-tfe-content-exclusion' // Configure the docs path const BASE_ROUTE = 'cloud-docs' @@ -47,13 +48,14 @@ const { getStaticPaths, getStaticProps } = getStaticGenerationFunctions( filepath = filepath.replace('preview/', '') return `https://github.com/hashicorp/${SOURCE_REPO}/blob/${DEFAULT_BRANCH}/website/${filepath}` }, - remarkPlugins: (params) => [ + remarkPlugins: (params, version) => [ ...remarkPlugins, remarkRewriteAssets({ product: SOURCE_REPO, version: process.env.CURRENT_GIT_BRANCH, getAssetPathParts: (nodeUrl) => ['website', nodeUrl], }), + [remarkTfeContentExclusion, { version }], ], rehypePlugins, }