Skip to content

Commit 954c0d3

Browse files
committed
Fix canonical url value on client rendered pages
1 parent 1d8f468 commit 954c0d3

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

next-sitemap.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** @type {import('next-sitemap').IConfig} */
22
module.exports = {
3-
siteUrl: `https://authzed.com${process.env.BASE_DIR ?? ''}`,
3+
siteUrl: `https://authzed.com${process.env.NEXT_PUBLIC_BASE_DIR ?? ''}`,
44
generateRobotsTxt: true,
55
// ...other options
66
};

next.config.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const withNextra = nextra({
3939
})
4040

4141
export default withNextra({
42-
basePath: process.env.BASE_DIR ?? undefined,
42+
basePath: process.env.NEXT_PUBLIC_BASE_DIR ?? undefined,
4343
assetPrefix:
4444
process.env.VERCEL_ENV === 'production'
4545
? 'https://docs-authzed.vercel.app/docs'

theme.config.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ const config: DocsThemeConfig = {
2121
defaultTitle: 'AuthZed Docs',
2222
titleTemplate: '%s – AuthZed Docs',
2323
description: desc,
24-
canonical: `https://authzed.com${process.env.BASE_DIR ?? ''}${asPath}`, // NOTE: Update this if the base dir ever changes
24+
canonical: `https://authzed.com${
25+
process.env.NEXT_PUBLIC_BASE_DIR ?? ''
26+
}${asPath}`,
2527
openGraph: {
2628
title,
2729
description: desc,

0 commit comments

Comments
 (0)