From c6e8f877ef7685ee53cbabc513c11fbb94b2588a Mon Sep 17 00:00:00 2001 From: Zachary Shilton <4624598+zchsh@users.noreply.github.com> Date: Fri, 17 Dec 2021 10:22:16 -0500 Subject: [PATCH] feat(website): add official and HCP Packer Ready labels (#11449) * refactor(website): use prop and CSS for plugin label spacing * fix: add official tier label to built-in plugin docs * feat(website): add BadgesHeader component * refactor(website): use BadgesHeader in all content * feat(website): add HCP ready demo, tweak badge look * refactor: integrate work from add-plugin-version branch * fix(website): correct bad import * fix: use updated MDX custom component * chore: remove plugin version label work from this branch * chore: remove unused var * fix: use new BadgesHeader interface for dual tags * chore: remove unused var, refine comment * fix: remove unused broken import * fix: shorten property for HCP packer readiness * Apply suggestions from code review Remove a few demo labels before merging Co-authored-by: Wilken Rivera --- website/components/badge/index.tsx | 28 ++++++++++++ .../style.module.css | 45 +++++++++---------- website/components/badges-header/index.tsx | 25 +++++++++++ .../components/badges-header/style.module.css | 21 +++++++++ .../components/plugin-badge/check-icon.svg | 4 ++ website/components/plugin-badge/index.tsx | 31 +++++++++++++ .../ribbon-icon.svg | 2 +- website/components/plugin-tier-label/index.js | 22 --------- .../components/remote-plugin-docs/server.js | 21 +++++++-- .../utils/resolve-nav-data.js | 19 +++++--- website/content/docs/builders/file.mdx | 4 ++ website/content/docs/builders/null.mdx | 4 ++ .../docs/datasources/hcp/hcp-packer-image.mdx | 6 ++- .../datasources/hcp/hcp-packer-iteration.mdx | 6 ++- .../content/docs/datasources/hcp/index.mdx | 39 ++++++++-------- .../hcp/packer-image-iteration.mdx | 5 +++ website/content/docs/plugins/index.mdx | 8 ++-- .../content/docs/post-processors/artifice.mdx | 4 ++ .../content/docs/post-processors/checksum.mdx | 4 ++ .../content/docs/post-processors/compress.mdx | 4 ++ .../content/docs/post-processors/manifest.mdx | 4 ++ .../docs/post-processors/shell-local.mdx | 4 ++ .../content/docs/provisioners/breakpoint.mdx | 4 ++ website/content/docs/provisioners/file.mdx | 4 ++ .../content/docs/provisioners/powershell.mdx | 8 +++- .../content/docs/provisioners/shell-local.mdx | 4 ++ website/content/docs/provisioners/shell.mdx | 4 ++ .../docs/provisioners/windows-restart.mdx | 4 ++ .../docs/provisioners/windows-shell.mdx | 4 ++ website/data/docs-remote-plugins.json | 3 +- website/package-lock.json | 37 +++++---------- website/package.json | 1 + website/pages/docs/[[...page]].jsx | 6 ++- 33 files changed, 275 insertions(+), 114 deletions(-) create mode 100644 website/components/badge/index.tsx rename website/components/{plugin-tier-label => badge}/style.module.css (51%) create mode 100644 website/components/badges-header/index.tsx create mode 100644 website/components/badges-header/style.module.css create mode 100644 website/components/plugin-badge/check-icon.svg create mode 100644 website/components/plugin-badge/index.tsx rename website/components/{plugin-tier-label => plugin-badge}/ribbon-icon.svg (98%) delete mode 100644 website/components/plugin-tier-label/index.js diff --git a/website/components/badge/index.tsx b/website/components/badge/index.tsx new file mode 100644 index 000000000..358085806 --- /dev/null +++ b/website/components/badge/index.tsx @@ -0,0 +1,28 @@ +import React from 'react' +import InlineSvg from '@hashicorp/react-inline-svg' +import classnames from 'classnames' +import s from './style.module.css' + +type BadgeTheme = 'gray' | 'blue' | 'gold' + +interface BadgeProps { + label: string + iconSvg?: string + theme?: BadgeTheme +} + +function Badge({ + theme = 'gray', + label, + iconSvg, +}: BadgeProps): React.ReactElement { + return ( +
+ {iconSvg ? : null} + {label} +
+ ) +} + +export type { BadgeTheme } +export default Badge diff --git a/website/components/plugin-tier-label/style.module.css b/website/components/badge/style.module.css similarity index 51% rename from website/components/plugin-tier-label/style.module.css rename to website/components/badge/style.module.css index d0c4d7bf9..f7ba1bba6 100644 --- a/website/components/plugin-tier-label/style.module.css +++ b/website/components/badge/style.module.css @@ -1,10 +1,23 @@ -/* -Note: colours have been hard-coded -to match Terraform Registry tier labels. -*/ .root { - --background-color: #8f96a2; - --text-color: #fff; + /* theming. Note that gold and gray + have been set to hex values in order + to match Terraform Registry tier labels. */ + &.theme-gray { + --background-color: #8f96a2; + --text-color: #fff; + } + &.theme-light-gray { + --background-color: var(--gray-6); + --text-color: var(--gray-3); + } + &.theme-gold { + --background-color: #f8e397; + --text-color: #975b06; + } + &.theme-blue { + --background-color: var(--packer); + --text-color: var(--packer-text-on-primary); + } align-items: center; background: var(--background-color); @@ -15,18 +28,6 @@ to match Terraform Registry tier labels. position: relative; top: -1px; vertical-align: bottom; - - /* variations */ - &[data-tier='official'] { - --background-color: #f8e397; - --text-color: #975b06; - } - - /* subsequent page titles should get cozy, - otherwise the label doesn't look associated */ - & + h1 { - margin-top: 16px; - } } .text { @@ -40,11 +41,5 @@ to match Terraform Registry tier labels. .icon { margin-right: 4px; - - & svg { - display: block; - & [fill] { - fill: var(--text-color); - } - } + color: var(--text-color); } diff --git a/website/components/badges-header/index.tsx b/website/components/badges-header/index.tsx new file mode 100644 index 000000000..b3b206a76 --- /dev/null +++ b/website/components/badges-header/index.tsx @@ -0,0 +1,25 @@ +import React from 'react' +import s from './style.module.css' + +function BadgesHeader({ + children, +}: { + children: React.ReactChild[] +}): React.ReactElement { + const childrenArray = React.Children.toArray(children) + return ( +
+
+ {childrenArray.map((badge, idx) => { + return ( +
+ {badge} +
+ ) + })} +
+
+ ) +} + +export default BadgesHeader diff --git a/website/components/badges-header/style.module.css b/website/components/badges-header/style.module.css new file mode 100644 index 000000000..d949ee681 --- /dev/null +++ b/website/components/badges-header/style.module.css @@ -0,0 +1,21 @@ +.root { + position: relative; + margin: 32px 0 0 0; + + /* subsequent page titles should get cozy, + otherwise the label doesn't look associated */ + & + h1 { + margin-top: 16px; + } +} + +.surroundSpaceCompensator { + display: flex; + flex-wrap: wrap; + margin: -4px; +} + +.badgeSpacer { + line-height: 0; + padding: 4px; +} diff --git a/website/components/plugin-badge/check-icon.svg b/website/components/plugin-badge/check-icon.svg new file mode 100644 index 000000000..c1f19a586 --- /dev/null +++ b/website/components/plugin-badge/check-icon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/website/components/plugin-badge/index.tsx b/website/components/plugin-badge/index.tsx new file mode 100644 index 000000000..7e4708a2f --- /dev/null +++ b/website/components/plugin-badge/index.tsx @@ -0,0 +1,31 @@ +import React from 'react' +import Badge, { BadgeTheme } from '../badge' +import svgRibbonIcon from './ribbon-icon.svg?include' +import svgCheckIcon from './check-icon.svg?include' + +type PluginLabelType = 'official' | 'community' | 'hcp_packer_ready' + +const badgeTypes = { + official: { + label: 'Official', + theme: 'gold', + iconSvg: svgRibbonIcon, + }, + community: { + label: 'Community', + theme: 'gray', + iconSvg: false, + }, + hcp_packer_ready: { + label: 'HCP Packer Ready', + theme: 'blue', + iconSvg: svgCheckIcon, + }, +} + +function PluginBadge({ type }: { type: PluginLabelType }): React.ReactElement { + const { label, theme, iconSvg } = badgeTypes[type] + return +} + +export default PluginBadge diff --git a/website/components/plugin-tier-label/ribbon-icon.svg b/website/components/plugin-badge/ribbon-icon.svg similarity index 98% rename from website/components/plugin-tier-label/ribbon-icon.svg rename to website/components/plugin-badge/ribbon-icon.svg index 60fb00901..ff5ffa8ef 100644 --- a/website/components/plugin-tier-label/ribbon-icon.svg +++ b/website/components/plugin-badge/ribbon-icon.svg @@ -1,3 +1,3 @@ - + diff --git a/website/components/plugin-tier-label/index.js b/website/components/plugin-tier-label/index.js deleted file mode 100644 index 21c71dd02..000000000 --- a/website/components/plugin-tier-label/index.js +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react' -import InlineSvg from '@hashicorp/react-inline-svg' -import svgRibbonIcon from './ribbon-icon.svg?include' -import s from './style.module.css' - -const tierNames = { - official: 'Official', - community: 'Community', -} - -function PluginTierLabel({ tier }) { - return ( -
- {tier === 'official' ? ( - - ) : null} - {tierNames[tier]} -
- ) -} - -export default PluginTierLabel diff --git a/website/components/remote-plugin-docs/server.js b/website/components/remote-plugin-docs/server.js index 067f29448..0b73c4c07 100644 --- a/website/components/remote-plugin-docs/server.js +++ b/website/components/remote-plugin-docs/server.js @@ -38,7 +38,7 @@ async function generateStaticProps({ currentPath, }) const navNode = getNodeFromPath(currentPath, navData, localContentDir) - const { filePath, remoteFile, pluginTier } = navNode + const { filePath, remoteFile, pluginData } = navNode // Fetch the MDX file content const mdxString = remoteFile ? remoteFile.fileString @@ -52,10 +52,23 @@ async function generateStaticProps({ // For plugin pages, prefix the MDX content with a // label that reflects the plugin tier // (current options are "Official" or "Community") + // and display whether the plugin is "HCP Packer Ready". + // Also add a badge to show the latest version function mdxContentHook(mdxContent) { - if (pluginTier) { - const tierMdx = `
\n\n` - mdxContent = tierMdx + mdxContent + const badgesMdx = [] + // Add a badge for the plugin tier + if (pluginData?.tier) { + badgesMdx.push(``) + } + // Add a badge if the plugin is "HCP Packer Ready" + if (pluginData?.isHcpPackerReady) { + badgesMdx.push(``) + } + // If we have badges to add, inject them into the MDX + if (badgesMdx.length > 0) { + const badgeChildrenMdx = badgesMdx.join('') + const badgesHeaderMdx = `${badgeChildrenMdx}` + mdxContent = badgesHeaderMdx + '\n\n' + mdxContent } return mdxContent } diff --git a/website/components/remote-plugin-docs/utils/resolve-nav-data.js b/website/components/remote-plugin-docs/utils/resolve-nav-data.js index 6aabb0345..bc974b145 100644 --- a/website/components/remote-plugin-docs/utils/resolve-nav-data.js +++ b/website/components/remote-plugin-docs/utils/resolve-nav-data.js @@ -139,9 +139,16 @@ async function resolvePluginEntryDocs(pluginConfigEntry, currentPath) { repo, version, pluginTier, + isHcpPackerReady = false, sourceBranch = 'main', zipFile = '', } = pluginConfigEntry + // Determine the pluginTier, which can be set manually, + // or will be automatically set based on repo ownership + const pluginOwner = repo.split('/')[0] + const parsedPluginTier = + pluginTier || (pluginOwner === 'hashicorp' ? 'official' : 'community') + // Fetch the MDX files for the plugin entry var docsMdxFiles if (zipFile !== '') { docsMdxFiles = await fetchDevPluginDocs(zipFile) @@ -153,7 +160,8 @@ async function resolvePluginEntryDocs(pluginConfigEntry, currentPath) { // - filePath is the path to the source file in the source repo // - fileString is a string representing the file source // - sourceUrl is a link to the original file in the source repo - // We also add a pluginTier attribute + // We also add pluginData, which is used to add badges + // such as the plugin's tier when rendering the page. const navNodes = docsMdxFiles.map((mdxFile) => { const { filePath, fileString } = mdxFile // Process into a NavLeaf, with a remoteFile attribute @@ -170,16 +178,15 @@ async function resolvePluginEntryDocs(pluginConfigEntry, currentPath) { const title = nav_title || sidebar_title || basename // construct sourceUrl (used for "Edit this page" link) const sourceUrl = `https://github.com/${repo}/blob/${sourceBranch}/${filePath}` - // determine pluginTier - const pluginOwner = repo.split('/')[0] - const parsedPluginTier = - pluginTier || (pluginOwner === 'hashicorp' ? 'official' : 'community') // Construct and return a NavLeafRemote node return { title, path: urlPath, remoteFile: { filePath, fileString, sourceUrl }, - pluginTier: parsedPluginTier, + pluginData: { + tier: parsedPluginTier, + isHcpPackerReady, + }, } }) // diff --git a/website/content/docs/builders/file.mdx b/website/content/docs/builders/file.mdx index 766db0a7b..5b5d851a8 100644 --- a/website/content/docs/builders/file.mdx +++ b/website/content/docs/builders/file.mdx @@ -6,6 +6,10 @@ description: | page_title: File - Builders --- + + + + # File Builder Type: `file` diff --git a/website/content/docs/builders/null.mdx b/website/content/docs/builders/null.mdx index 0330a770a..c1579adc1 100644 --- a/website/content/docs/builders/null.mdx +++ b/website/content/docs/builders/null.mdx @@ -7,6 +7,10 @@ description: | page_title: Null - Builders --- + + + + # Null Builder Type: `null` diff --git a/website/content/docs/datasources/hcp/hcp-packer-image.mdx b/website/content/docs/datasources/hcp/hcp-packer-image.mdx index 8c13afe96..921c10fbd 100644 --- a/website/content/docs/datasources/hcp/hcp-packer-image.mdx +++ b/website/content/docs/datasources/hcp/hcp-packer-image.mdx @@ -6,6 +6,11 @@ description: | page_title: HCP Packer Image - Data Sources --- + + + + + # HCP Packer Image Data Source Type: `hcp-packer-image` @@ -38,7 +43,6 @@ data source to retrieve an image ID using a channel. You provide the channel name to the iteration data source, then use the iteration source in the image data source, then use the image data source inside your source block. - ```hcl # Retrieves information about the HCP Packer "iteration"; an "iteration" can be # thought of as all the metadata created by a single call of `packer build`. diff --git a/website/content/docs/datasources/hcp/hcp-packer-iteration.mdx b/website/content/docs/datasources/hcp/hcp-packer-iteration.mdx index a169bb982..1f1f43b09 100644 --- a/website/content/docs/datasources/hcp/hcp-packer-iteration.mdx +++ b/website/content/docs/datasources/hcp/hcp-packer-iteration.mdx @@ -6,6 +6,11 @@ description: | page_title: HCP Packer Iteration - Data Sources --- + + + + + # HCP Packer Iteration Data Source Type: `hcp-packer-iteration` @@ -36,7 +41,6 @@ data source to retrieve an image ID using a channel. You provide the channel name to the iteration data source, then use the iteration source inside the image data source, then use the image data source inside your source block. - ```hcl # Retrieves information about the HCP Packer "iteration"; an "iteration" can be # thought of as all the metadata created by a single call of `packer build`. diff --git a/website/content/docs/datasources/hcp/index.mdx b/website/content/docs/datasources/hcp/index.mdx index 5dddf1b86..3355a7a58 100644 --- a/website/content/docs/datasources/hcp/index.mdx +++ b/website/content/docs/datasources/hcp/index.mdx @@ -1,42 +1,45 @@ --- description: | - Data sources used to data from the HCP Packer registry. + Data sources used to data from the HCP Packer registry. page_title: HCP - Data sources sidebar_title: Overview --- + + + # HCP Packer Registry Data sources -The HCP Packer registry bridges the gap between image factories and image -deployments, allowing development and security teams to work together to create, +The HCP Packer registry bridges the gap between image factories and image +deployments, allowing development and security teams to work together to create, manage, and consume golden images in a centralized way. -The HCP Packer registry stores metadata about your images, including when they -were created, where the image exists in the cloud, and what (if any) git commit -is associated with your image build. You can use the registry to track -information about the golden images your Packer builds produce, clearly -designate which images are appropriate for test and production environments, -and query for the right golden images to use in both Packer and Terraform +The HCP Packer registry stores metadata about your images, including when they +were created, where the image exists in the cloud, and what (if any) git commit +is associated with your image build. You can use the registry to track +information about the golden images your Packer builds produce, clearly +designate which images are appropriate for test and production environments, +and query for the right golden images to use in both Packer and Terraform configurations. -HCP Packer is under active development, and we are currently offering a public -beta version to collect feedback and continue improving the product. We +HCP Packer is under active development, and we are currently offering a public +beta version to collect feedback and continue improving the product. We encourage you to try HCP Packer and submit your feedback. Packer has two data sources that work together to retrieve information from the HCP Packer registry: - * [hcp-packer-iteration](/docs/datasources/hcp/hcp-packer-iteration) - - retrieves information about an iteration in HCP Packer registry - * [hcp-packer-image](/docs/datasources/hcp/hcp-packer-image) - retrieves - information about a specific image created in the HCP Packer registry +- [hcp-packer-iteration](/docs/datasources/hcp/hcp-packer-iteration) - + retrieves information about an iteration in HCP Packer registry +- [hcp-packer-image](/docs/datasources/hcp/hcp-packer-image) - retrieves + information about a specific image created in the HCP Packer registry These data sources are intended to be used together to determine source images -for pipelined Packer builds. +for pipelined Packer builds. ## How to use this plugin -This plugin comes bundled with the Packer core, so you do not need to install +This plugin comes bundled with the Packer core, so you do not need to install it separately. Please install Packer v1.7.7 or above to use the latest version -of the HCP Packer registry datasources. \ No newline at end of file +of the HCP Packer registry datasources. diff --git a/website/content/docs/datasources/hcp/packer-image-iteration.mdx b/website/content/docs/datasources/hcp/packer-image-iteration.mdx index 9176c58d1..b1204d80c 100644 --- a/website/content/docs/datasources/hcp/packer-image-iteration.mdx +++ b/website/content/docs/datasources/hcp/packer-image-iteration.mdx @@ -6,6 +6,11 @@ description: | page_title: Packer Image Iteration - Data Sources --- + + + + + # Packer Image Iteration Data Source Type: `packer-image-iteration` diff --git a/website/content/docs/plugins/index.mdx b/website/content/docs/plugins/index.mdx index b8128ac61..d0218ffa1 100644 --- a/website/content/docs/plugins/index.mdx +++ b/website/content/docs/plugins/index.mdx @@ -41,10 +41,10 @@ build. Packer plugins are published and maintained by a variety of sources, including HashiCorp, and the Packer community. The Packer website uses tiers and badges to denote the source of a provider. Additionally, namespaces are used to help users identify the organization or publisher responsible for the integration, as shown in the table below. -| Tier | Description | Namespace | -| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | -| | Official plugins are owned and maintained by HashiCorp. | hashicorp | -| | Community providers are published by individual maintainers, groups of maintainers, or other members of the Packer community. | Third-party organization or maintainer's individual account | +| Tier | Description | Namespace | +| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | +| | Official plugins are owned and maintained by HashiCorp. | hashicorp | +| | Community providers are published by individual maintainers, groups of maintainers, or other members of the Packer community. | Third-party organization or maintainer's individual account | ## Installing Plugins diff --git a/website/content/docs/post-processors/artifice.mdx b/website/content/docs/post-processors/artifice.mdx index 189f92202..b946b8d7f 100644 --- a/website/content/docs/post-processors/artifice.mdx +++ b/website/content/docs/post-processors/artifice.mdx @@ -15,6 +15,10 @@ description: > page_title: Artifice - Post-Processors --- + + + + # Artifice Post-Processor Type: `artifice` diff --git a/website/content/docs/post-processors/checksum.mdx b/website/content/docs/post-processors/checksum.mdx index 629c32055..3ac871dd0 100644 --- a/website/content/docs/post-processors/checksum.mdx +++ b/website/content/docs/post-processors/checksum.mdx @@ -9,6 +9,10 @@ description: > page_title: Checksum - Post-Processors --- + + + + # Checksum Post-Processor Type: `checksum` diff --git a/website/content/docs/post-processors/compress.mdx b/website/content/docs/post-processors/compress.mdx index 961b973e1..c9311a332 100644 --- a/website/content/docs/post-processors/compress.mdx +++ b/website/content/docs/post-processors/compress.mdx @@ -5,6 +5,10 @@ description: | page_title: Compress - Post-Processors --- + + + + # Compress Post-Processor Type: `compress` diff --git a/website/content/docs/post-processors/manifest.mdx b/website/content/docs/post-processors/manifest.mdx index 0d27a7575..5e439e1d6 100644 --- a/website/content/docs/post-processors/manifest.mdx +++ b/website/content/docs/post-processors/manifest.mdx @@ -5,6 +5,10 @@ description: > page_title: Manifest - Post-Processors --- + + + + # Manifest Post-Processor Type: `manifest` diff --git a/website/content/docs/post-processors/shell-local.mdx b/website/content/docs/post-processors/shell-local.mdx index c92659892..f2fe6fbb7 100644 --- a/website/content/docs/post-processors/shell-local.mdx +++ b/website/content/docs/post-processors/shell-local.mdx @@ -5,6 +5,10 @@ description: | page_title: Local Shell - Post-Processors --- + + + + # Local Shell Post Processor Type: `shell-local` diff --git a/website/content/docs/provisioners/breakpoint.mdx b/website/content/docs/provisioners/breakpoint.mdx index 45c5a63c6..b7585fd67 100644 --- a/website/content/docs/provisioners/breakpoint.mdx +++ b/website/content/docs/provisioners/breakpoint.mdx @@ -9,6 +9,10 @@ description: > page_title: breakpoint - Provisioners --- + + + + # Breakpoint Provisioner Type: `breakpoint` diff --git a/website/content/docs/provisioners/file.mdx b/website/content/docs/provisioners/file.mdx index bedcf39b0..4b320c536 100644 --- a/website/content/docs/provisioners/file.mdx +++ b/website/content/docs/provisioners/file.mdx @@ -7,6 +7,10 @@ description: | page_title: File - Provisioners --- + + + + # File Provisioner Type: `file` diff --git a/website/content/docs/provisioners/powershell.mdx b/website/content/docs/provisioners/powershell.mdx index ea211a6ca..87cd558a2 100644 --- a/website/content/docs/provisioners/powershell.mdx +++ b/website/content/docs/provisioners/powershell.mdx @@ -5,6 +5,10 @@ description: | page_title: PowerShell - Provisioners --- + + + + # PowerShell Provisioner Type: `powershell` @@ -78,7 +82,7 @@ provisioner "powershell" { running on AWS, Azure, Google Compute, or OpenStack and would like to access the autogenerated password that Packer uses to connect to the instance via WinRM, you can use the `build` template engine to inject it using - ```{{ build `Password` }}```. In HCL templates, you can do the same thing by + `` {{ build `Password` }} ``. In HCL templates, you can do the same thing by accessing the `build` variables For example: @@ -136,7 +140,7 @@ provisioner "powershell" { running on AWS, Azure, Google Compute, or OpenStack and would like to access the autogenerated password that Packer uses to connect to the instance via WinRM, you can use the `build` template engine to inject it using - ```{{ build `Password` }}```. In HCL templates, you can do the same thing by + `` {{ build `Password` }} ``. In HCL templates, you can do the same thing by accessing the `build` variables For example: diff --git a/website/content/docs/provisioners/shell-local.mdx b/website/content/docs/provisioners/shell-local.mdx index 674f08707..088351e52 100644 --- a/website/content/docs/provisioners/shell-local.mdx +++ b/website/content/docs/provisioners/shell-local.mdx @@ -7,6 +7,10 @@ description: | page_title: Shell (Local) - Provisioners --- + + + + # Local Shell Provisioner Type: `shell-local` diff --git a/website/content/docs/provisioners/shell.mdx b/website/content/docs/provisioners/shell.mdx index d6e3b2b31..c94eda2ca 100644 --- a/website/content/docs/provisioners/shell.mdx +++ b/website/content/docs/provisioners/shell.mdx @@ -6,6 +6,10 @@ description: | page_title: Shell - Provisioners --- + + + + # Shell Provisioner Type: `shell` diff --git a/website/content/docs/provisioners/windows-restart.mdx b/website/content/docs/provisioners/windows-restart.mdx index fa718093d..c6c46b4c0 100644 --- a/website/content/docs/provisioners/windows-restart.mdx +++ b/website/content/docs/provisioners/windows-restart.mdx @@ -5,6 +5,10 @@ description: | page_title: Windows Restart - Provisioners --- + + + + # Windows Restart Provisioner Type: `windows-restart` diff --git a/website/content/docs/provisioners/windows-shell.mdx b/website/content/docs/provisioners/windows-shell.mdx index fd0ba55b5..e38c47e34 100644 --- a/website/content/docs/provisioners/windows-shell.mdx +++ b/website/content/docs/provisioners/windows-shell.mdx @@ -5,6 +5,10 @@ description: | page_title: Windows Shell - Provisioners --- + + + + # Windows Shell Provisioner Type: `windows-shell` diff --git a/website/data/docs-remote-plugins.json b/website/data/docs-remote-plugins.json index 17864c008..2a9274664 100644 --- a/website/data/docs-remote-plugins.json +++ b/website/data/docs-remote-plugins.json @@ -82,7 +82,8 @@ "title": "HashiCups", "path": "hashicups", "repo": "hashicorp/packer-plugin-hashicups", - "version": "latest" + "version": "latest", + "isHcpPackerReady": false }, { "title": "hcloud", diff --git a/website/package-lock.json b/website/package-lock.json index 995e203cb..a29e02a68 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -32,6 +32,7 @@ "@hashicorp/react-text-split-with-image": "^4.2.5", "@hashicorp/react-vertical-text-block-list": "^7.0.0", "adm-zip": "^0.5.5", + "classnames": "^2.3.1", "gray-matter": "^4.0.2", "next": "^11.1.2", "next-mdx-remote": "3.0.1", @@ -2866,13 +2867,9 @@ "version": "11.1.3", "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-11.1.3.tgz", "integrity": "sha512-TwP4krjhs+uU9pesDYCShEXZrLSbJr78p12e7XnLBBaNf20SgWLlVmQUT9gX9KbWan5V0sUbJfmcS8MRNHgYuA==", - "cpu": [ - "arm64" - ], + "cpu": ["arm64"], "optional": true, - "os": [ - "darwin" - ], + "os": ["darwin"], "engines": { "node": ">= 10" } @@ -2881,13 +2878,9 @@ "version": "11.1.3", "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-11.1.3.tgz", "integrity": "sha512-ZSWmkg/PxccHFNUSeBdrfaH8KwSkoeUtewXKvuYYt7Ph0yRsbqSyNIvhUezDua96lApiXXq6EL2d1THfeWomvw==", - "cpu": [ - "x64" - ], + "cpu": ["x64"], "optional": true, - "os": [ - "darwin" - ], + "os": ["darwin"], "engines": { "node": ">= 10" } @@ -2896,13 +2889,9 @@ "version": "11.1.3", "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-11.1.3.tgz", "integrity": "sha512-PrTBN0iZudAuj4jSbtXcdBdmfpaDCPIneG4Oms4zcs93KwMgLhivYW082Mvlgx9QVEiRm7+RkFpIVtG/i7JitA==", - "cpu": [ - "x64" - ], + "cpu": ["x64"], "optional": true, - "os": [ - "linux" - ], + "os": ["linux"], "engines": { "node": ">= 10" } @@ -2911,13 +2900,9 @@ "version": "11.1.3", "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-11.1.3.tgz", "integrity": "sha512-mRwbscVjRoHk+tDY7XbkT5d9FCwujFIQJpGp0XNb1i5OHCSDO8WW/C9cLEWS4LxKRbIZlTLYg1MTXqLQkvva8w==", - "cpu": [ - "x64" - ], + "cpu": ["x64"], "optional": true, - "os": [ - "win32" - ], + "os": ["win32"], "engines": { "node": ">= 10" } @@ -8405,9 +8390,7 @@ "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "hasInstallScript": true, "optional": true, - "os": [ - "darwin" - ], + "os": ["darwin"], "engines": { "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } diff --git a/website/package.json b/website/package.json index a978d6353..41123c81e 100644 --- a/website/package.json +++ b/website/package.json @@ -28,6 +28,7 @@ "@hashicorp/react-text-split-with-image": "^4.2.5", "@hashicorp/react-vertical-text-block-list": "^7.0.0", "adm-zip": "^0.5.5", + "classnames": "^2.3.1", "gray-matter": "^4.0.2", "next": "^11.1.2", "next-mdx-remote": "3.0.1", diff --git a/website/pages/docs/[[...page]].jsx b/website/pages/docs/[[...page]].jsx index 8c6ff2686..9feeee42d 100644 --- a/website/pages/docs/[[...page]].jsx +++ b/website/pages/docs/[[...page]].jsx @@ -1,6 +1,8 @@ import { productName, productSlug } from 'data/metadata' import DocsPage from '@hashicorp/react-docs-page' -import PluginTierLabel from 'components/plugin-tier-label' +import Badge from 'components/badge' +import BadgesHeader from 'components/badges-header' +import PluginBadge from 'components/plugin-badge' import DevAlert from 'components/dev-alert' import Checklist from 'components/checklist' // Imports below are only used server-side @@ -10,7 +12,7 @@ import { } from 'components/remote-plugin-docs/server' // Configure the docs path and remote plugin docs loading -const additionalComponents = { PluginTierLabel, Checklist } +const additionalComponents = { Badge, BadgesHeader, PluginBadge, Checklist } const baseRoute = 'docs' const localContentDir = 'content/docs' const mainBranch = 'master'