Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -297,21 +297,22 @@ const nextConfig = {
},
{
source: '/docs/reference/pulumi',
destination: '/docs/reference/providers/pulumi',
destination: '/docs/providers/pulumi',
basePath: false,
permanent: false,
permanent: true,
},
{
source: '/docs/reference/pulumi/custom-providers',
destination: '/docs/reference/providers/pulumi/custom',
destination: '/docs/providers/custom',
basePath: false,
permanent: false,
permanent: true,
},
{
source: '/docs/reference/pulumi/pulumi-cloud',
destination: '/docs/reference/providers/pulumi#pulumi-cloud',
destination:
'/docs/providers/pulumi#using-your-pulumi-cloud-account-optional',
basePath: false,
permanent: false,
permanent: true,
},
{
source: '/docs/reference/dart/v1',
Expand Down
2 changes: 1 addition & 1 deletion scripts/cypress-fixtures.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async function run() {
const staticPages = basePages.map((page) => `/docs${page}`)

const docPages = allDocs.map((doc) => {
return doc.slug === '/' ? '/docs' : `/docs/${doc.slug}`
return !doc.slug ? '/docs' : `/docs/${doc.slug}`
})

const paths = [...staticPages, ...docPages].sort((a, b) =>
Expand Down
6 changes: 4 additions & 2 deletions src/app/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ export async function generateMetadata({
seoTitle = `${navItem.breadcrumbParentItem.title}: ${title_meta}`
}

const url = doc.slug ? `${BASE_URL}/docs/${doc.slug}` : `${BASE_URL}/docs`

const openGraph: OpenGraph = {
siteName: 'Nitric Docs',
locale: 'en_US',
url: `${BASE_URL}/docs/${doc.slug}`,
url,
images: !doc.slug // is home page
? [
{
Expand Down Expand Up @@ -68,7 +70,7 @@ export async function generateMetadata({
card: 'summary_large_image',
},
alternates: {
canonical: `${BASE_URL}/docs/${doc.slug}`,
canonical: url,
},
}
}
Expand Down
Loading