From c9a06fef9e741008c04b5be609b4e1e76d3c88af Mon Sep 17 00:00:00 2001
From: Leah Bush <157434496+LeahMarieBush@users.noreply.github.com>
Date: Wed, 22 Jan 2025 11:28:03 -0600
Subject: [PATCH 1/3] feat: add hvd-docs redirects functionality (#2671)
* feat: add hvd-docs redirects functionality
* fix tests
* change sha to main
---
.../get-latest-content-sha-for-product.test.ts | 15 +++++++++------
build-libs/redirects.js | 8 +++++++-
next-env.d.ts | 1 +
tsconfig.json | 9 +++++++--
4 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/build-libs/__tests__/get-latest-content-sha-for-product.test.ts b/build-libs/__tests__/get-latest-content-sha-for-product.test.ts
index d345d39682..c51fb5d08a 100644
--- a/build-libs/__tests__/get-latest-content-sha-for-product.test.ts
+++ b/build-libs/__tests__/get-latest-content-sha-for-product.test.ts
@@ -9,12 +9,15 @@ import { PRODUCT_REDIRECT_ENTRIES } from '@build-libs/redirects'
describe('getLatestContentShaForProduct', () => {
PRODUCT_REDIRECT_ENTRIES.forEach(({ repo, path }) => {
- it(`fetches the latest SHA for the "${repo}" repo`, async () => {
- const latestSha = await getLatestContentShaForProduct(repo)
- expect(typeof latestSha).toBe('string')
- })
-
- if (['hcp-docs', 'sentinel', 'ptfe-releases'].includes(repo)) {
+ if (repo === 'hvd-docs') {
+ console.log(`Skipping test for repo "${repo}"`)
+ } else {
+ it(`fetches the latest SHA for the "${repo}" repo`, async () => {
+ const latestSha = await getLatestContentShaForProduct(repo)
+ expect(typeof latestSha).toBe('string')
+ })
+ }
+ if (['hcp-docs', 'sentinel', 'ptfe-releases', 'hvd-docs'].includes(repo)) {
console.log(`Skipping test for private repo "${repo}"`)
} else {
it(`fetches the latest SHA for the "${repo}" repo, then validates the SHA by fetching redirects`, async () => {
diff --git a/build-libs/redirects.js b/build-libs/redirects.js
index 9c09dc9498..5273f2bb49 100644
--- a/build-libs/redirects.js
+++ b/build-libs/redirects.js
@@ -86,7 +86,11 @@ async function getRedirectsFromContentRepo(repoName, redirectsPath, config) {
let redirectsFileString
if (isDeveloperBuild) {
// For `hashicorp/dev-portal` builds, load redirects remotely
- const latestContentSha = await getLatestContentShaForProduct(repoName)
+ // hvd-docs is not hosted on the content API, so we need to use main as the latest sha
+ const latestContentSha =
+ repoName === 'hvd-docs'
+ ? 'main'
+ : await getLatestContentShaForProduct(repoName)
redirectsFileString = await fetchGithubFile({
owner: 'hashicorp',
repo: repoName,
@@ -126,6 +130,7 @@ const PRODUCT_REDIRECT_ENTRIES = [
{ repo: 'hcp-docs', path: '/redirects.js' },
{ repo: 'ptfe-releases', path: 'website/redirects.js' },
{ repo: 'sentinel', path: 'website/redirects.js' },
+ { repo: 'hvd-docs', path: '/redirects.js' },
]
async function buildProductRedirects() {
@@ -299,6 +304,7 @@ function filterInvalidRedirects(redirects, repoSlug) {
'ptfe-releases': 'terraform/enterprise',
'cloud.hashicorp.com': 'hcp',
'hcp-docs': 'hcp',
+ 'hvd-docs': 'validated-designs',
}
const productSlug = productSlugsByRepo[repoSlug] ?? repoSlug
diff --git a/next-env.d.ts b/next-env.d.ts
index 4f11a03dc6..fd36f9494e 100644
--- a/next-env.d.ts
+++ b/next-env.d.ts
@@ -1,5 +1,6 @@
///
///
+///
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
diff --git a/tsconfig.json b/tsconfig.json
index 51ef1da429..8590e3c4fd 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -23,8 +23,13 @@
"@components/*": ["components/*"]
},
"types": ["vitest/globals", "@testing-library/jest-dom"],
- "strictNullChecks": false
+ "strictNullChecks": false,
+ "plugins": [
+ {
+ "name": "next"
+ }
+ ]
},
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules", "scripts/migrate-io/templates"]
}
From cbcf99c662f41db9815ee9cd564c4b36d097fd49 Mon Sep 17 00:00:00 2001
From: Leah Bush <157434496+LeahMarieBush@users.noreply.github.com>
Date: Fri, 24 Jan 2025 11:13:20 -0600
Subject: [PATCH 2/3] feat: add note for boundary desktop client (#2672)
* feat: add note for boundary desktop client
* update text
* change install callout to accept child component to make component more generic
---
.../components/install-callout/index.tsx | 6 +++++
.../boundary/download.module.css | 10 ++++++++
.../product-downloads-view/boundary/index.tsx | 23 ++++++++++++++++++-
3 files changed, 38 insertions(+), 1 deletion(-)
diff --git a/src/views/product-downloads-view/boundary/components/install-callout/index.tsx b/src/views/product-downloads-view/boundary/components/install-callout/index.tsx
index 0358eb407d..617e85b081 100644
--- a/src/views/product-downloads-view/boundary/components/install-callout/index.tsx
+++ b/src/views/product-downloads-view/boundary/components/install-callout/index.tsx
@@ -8,6 +8,9 @@ import Card from 'components/card'
import CardWithLink from 'views/product-downloads-view/components/card-with-link'
import MobileDownloadStandaloneLink from 'components/mobile-download-standalone-link'
import Heading from 'components/heading'
+import InlineAlert from 'components/inline-alert'
+import InlineLink from 'components/inline-link'
+import { IconInfo16 } from '@hashicorp/flight-icons/svg-react/info-16'
import { IconDownload16 } from '@hashicorp/flight-icons/svg-react/download-16'
// Types
import { InstallProps, ReleaseBuild } from './types'
@@ -26,6 +29,7 @@ function InstallCallout({
customInstallProps,
headingData,
cardClassName,
+ children,
}: {
customInstallProps: InstallProps
/** We link to this heading from the side nav, so we've lifted up its data */
@@ -34,6 +38,7 @@ function InstallCallout({
text: string
}
cardClassName?: string
+ children?: React.ReactNode
}) {
const { latestVersion, builds } = customInstallProps
return (
@@ -71,6 +76,7 @@ function InstallCallout({
/>
))}
+ {children}
)
}
diff --git a/src/views/product-downloads-view/boundary/download.module.css b/src/views/product-downloads-view/boundary/download.module.css
index b94196835a..520ab358c7 100644
--- a/src/views/product-downloads-view/boundary/download.module.css
+++ b/src/views/product-downloads-view/boundary/download.module.css
@@ -6,3 +6,13 @@
.lastCard {
margin-top: 32px;
}
+
+.alert {
+ margin-top: 24px;
+}
+
+.cardIcon {
+ margin-top: 3px;
+ max-height: 16px;
+ max-width: 16px;
+}
diff --git a/src/views/product-downloads-view/boundary/index.tsx b/src/views/product-downloads-view/boundary/index.tsx
index 3781091e67..c31d2aa03a 100644
--- a/src/views/product-downloads-view/boundary/index.tsx
+++ b/src/views/product-downloads-view/boundary/index.tsx
@@ -7,6 +7,9 @@
import ProductDownloadsView from 'views/product-downloads-view'
// Components
import { InstallCallout } from './components'
+import InlineAlert from 'components/inline-alert'
+import InlineLink from 'components/inline-link'
+import { IconInfo16 } from '@hashicorp/flight-icons/svg-react/info-16'
// Types
import { InstallProps } from './components/install-callout/types'
import { ProductDownloadsViewProps } from 'views/product-downloads-view/types'
@@ -60,7 +63,25 @@ function BoundaryDownloadsView({
+ >
+
+ You can find previous versions of the Desktop Client on the{' '}
+
+ Desktop Client releases page.
+
+ >
+ }
+ icon={}
+ />
+
Date: Mon, 27 Jan 2025 11:49:56 -0800
Subject: [PATCH 3/3] Temp remove GS content from Vagrant to update Vagrant GS
(#2677)
* update links on vagrant landing page for gs refactor
* more related files that point to previous get started content
* Temp remove GS content from Vagrant to update Vagrant GS
---
src/content/tutorials-landing.json | 5 +--
.../vagrant/install-vmware-landing.json | 5 ---
src/content/vagrant/product-landing.json | 37 +------------------
src/pages/tutorials/library.tsx | 1 -
4 files changed, 2 insertions(+), 46 deletions(-)
diff --git a/src/content/tutorials-landing.json b/src/content/tutorials-landing.json
index 2756218fec..e96feb9733 100644
--- a/src/content/tutorials-landing.json
+++ b/src/content/tutorials-landing.json
@@ -154,10 +154,7 @@
"text": "Explore other providers"
}
],
- "featuredCollectionSlugs": [
- "vagrant/getting-started",
- "vagrant/networking-provisioning-operations"
- ]
+ "featuredCollectionSlugs": ["vagrant/networking-provisioning-operations"]
},
"waypoint": {
"featuredUseCases": [
diff --git a/src/content/vagrant/install-vmware-landing.json b/src/content/vagrant/install-vmware-landing.json
index 7c4848b891..f6265d4088 100644
--- a/src/content/vagrant/install-vmware-landing.json
+++ b/src/content/vagrant/install-vmware-landing.json
@@ -1,9 +1,4 @@
{
- "featuredTutorialsSlugs": [
- "vagrant/getting-started-index",
- "vagrant/getting-started-boxes",
- "vagrant/getting-started-networking"
- ],
"doesNotHavePackageManagers": true,
"sidecarMarketingCard": {
"title": "About Vagrant",
diff --git a/src/content/vagrant/product-landing.json b/src/content/vagrant/product-landing.json
index 1ca2ee544d..392579b1fe 100644
--- a/src/content/vagrant/product-landing.json
+++ b/src/content/vagrant/product-landing.json
@@ -21,7 +21,7 @@
"ctas": [
{
"text": "CLI Quick Start",
- "url": "/vagrant/tutorials/getting-started"
+ "url": "/vagrant/tutorials/get-started"
}
]
},
@@ -40,40 +40,15 @@
"body": "The package format for Vagrant environments - create your own or use one from the public catalog.",
"url": "/vagrant/docs/boxes"
},
- {
- "heading": "Install and Specify a Box",
- "body": "Use a base image to quickly clone a virtual machine.",
- "url": "/vagrant/tutorials/getting-started/getting-started-boxes"
- }
- ]
- },
- {
- "type": "linked_cards",
- "cards": [
{
"heading": "Vagrantfile",
"body": "Describe your virtual machine's configuration and how to provision it.",
"url": "/vagrant/docs/vagrantfile"
},
- {
- "heading": "Create a Vagrantfile",
- "body": "Begin your Vagrant project by creating a Vagrantfile.",
- "url": "/vagrant/tutorials/getting-started/getting-started-project-setup"
- }
- ]
- },
- {
- "type": "linked_cards",
- "cards": [
{
"heading": "vagrant up",
"body": "Create and configure your virtual machine with the single most important Vagrant CLI command.",
"url": "/vagrant/docs/cli/up"
- },
- {
- "heading": "Boot an Environment",
- "body": "Start your virtual machine with vagrant up.",
- "url": "/vagrant/tutorials/getting-started/getting-started-up"
}
]
},
@@ -91,16 +66,6 @@
"body": "Sync files from your host machine to the guest machine.",
"url": "/vagrant/docs/synced-folders"
},
- {
- "heading": "Synchronize Your Files",
- "body": "Vagrant automatically syncs files to and from the guest machine allowing you to edits files locally and run them in your virtual machine.",
- "url": "/vagrant/tutorials/getting-started/getting-started-synced-folders"
- }
- ]
- },
- {
- "type": "linked_cards",
- "cards": [
{
"heading": "Networking",
"body": "Access your virtual machines through the high-level networking set up by Vagrant.",
diff --git a/src/pages/tutorials/library.tsx b/src/pages/tutorials/library.tsx
index 0ca3f04a4e..ac650802b6 100644
--- a/src/pages/tutorials/library.tsx
+++ b/src/pages/tutorials/library.tsx
@@ -35,7 +35,6 @@ const DEFAULT_SLUGS = [
'vault/why-use-vault',
'consul/get-started',
'nomad/get-started-install',
- 'vagrant/getting-started-index',
'packer/get-started-install-cli',
'boundary/getting-started-intro',
'waypoint/get-started-intro',