diff --git a/packages/documentation-framework/scripts/md/parseMD.js b/packages/documentation-framework/scripts/md/parseMD.js index 1e02e8653f..78fbf50747 100644 --- a/packages/documentation-framework/scripts/md/parseMD.js +++ b/packages/documentation-framework/scripts/md/parseMD.js @@ -105,6 +105,7 @@ function toReactComponent(mdFilePath, source, buildMode) { section: frontmatter.section || '', subsection: frontmatter.subsection || '', deprecated: frontmatter.deprecated || false, + template: frontmatter.template || false, beta: frontmatter.beta || false, demo: frontmatter.demo || false, newImplementationLink: frontmatter.newImplementationLink || false, @@ -295,6 +296,7 @@ function sourceMDFile(file, source, buildMode) { ...(pageData.hideNavItem && { hideNavItem: pageData.hideNavItem }), ...(pageData.beta && { beta: pageData.beta }), ...(pageData.deprecated && { deprecated: pageData.deprecated }), + ...(pageData.template && { template: pageData.template }), ...(pageData.demo && { demo: pageData.demo }), ...(pageData.sortValue && { sortValue: pageData.sortValue }), ...(pageData.subsectionSortValue && { subsectionSortValue: pageData.subsectionSortValue }) diff --git a/packages/documentation-framework/templates/mdx.js b/packages/documentation-framework/templates/mdx.js index d3052945fa..ff2f7916f0 100644 --- a/packages/documentation-framework/templates/mdx.js +++ b/packages/documentation-framework/templates/mdx.js @@ -23,6 +23,7 @@ const MDXChildTemplate = ({ optIn, beta, deprecated, + template, newImplementationLink, functionDocumentation = [] } = Component.getPageData(); @@ -84,6 +85,11 @@ const MDXChildTemplate = ({ {' '}To learn more about the process, visit our about page. )} + {(template || source === 'react-template') && ( + + {`This page showcases templates for the ${id.toLowerCase()} component. A template combines a component with logic that supports a specific use case, with a streamlined API that offers additional, limited customization.`} + + )} ); // Create dynamic component for @reach/router diff --git a/packages/documentation-framework/versions.json b/packages/documentation-framework/versions.json index 344f148859..99bc422318 100644 --- a/packages/documentation-framework/versions.json +++ b/packages/documentation-framework/versions.json @@ -41,7 +41,8 @@ "@patternfly/react-topology": "5.2.1", "@patternfly/react-user-feedback": "5.0.0", "@patternfly/react-virtualized-extension": "5.0.0", - "@patternfly/quickstarts": "5.0.0" + "@patternfly/quickstarts": "5.0.0", + "@patternfly/react-templates": "^1.0.0-alpha.0" } }, { @@ -65,7 +66,8 @@ "@patternfly/react-topology": "5.2.1", "@patternfly/react-user-feedback": "5.0.0", "@patternfly/react-virtualized-extension": "5.0.0", - "@patternfly/quickstarts": "5.0.0" + "@patternfly/quickstarts": "5.0.0", + "@patternfly/react-templates": "^1.0.0-alpha.0" } }, { @@ -89,7 +91,8 @@ "@patternfly/react-topology": "5.2.1", "@patternfly/react-user-feedback": "5.0.0", "@patternfly/react-virtualized-extension": "5.0.0", - "@patternfly/quickstarts": "5.0.0" + "@patternfly/quickstarts": "5.0.0", + "@patternfly/react-templates": "^1.0.0-alpha.0" } },{ "name": "5.1.0",