Skip to content

Commit

Permalink
Merge pull request #285 from authzed/fix-canonical-url
Browse files Browse the repository at this point in the history
Fix canonical url value
  • Loading branch information
samkim authored Nov 27, 2024
2 parents 1d8f468 + 954c0d3 commit 3f687ae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion next-sitemap.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: `https://authzed.com${process.env.BASE_DIR ?? ''}`,
siteUrl: `https://authzed.com${process.env.NEXT_PUBLIC_BASE_DIR ?? ''}`,
generateRobotsTxt: true,
// ...other options
};
2 changes: 1 addition & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const withNextra = nextra({
})

export default withNextra({
basePath: process.env.BASE_DIR ?? undefined,
basePath: process.env.NEXT_PUBLIC_BASE_DIR ?? undefined,
assetPrefix:
process.env.VERCEL_ENV === 'production'
? 'https://docs-authzed.vercel.app/docs'
Expand Down
4 changes: 3 additions & 1 deletion theme.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ const config: DocsThemeConfig = {
defaultTitle: 'AuthZed Docs',
titleTemplate: '%s – AuthZed Docs',
description: desc,
canonical: `https://authzed.com${process.env.BASE_DIR ?? ''}${asPath}`, // NOTE: Update this if the base dir ever changes
canonical: `https://authzed.com${
process.env.NEXT_PUBLIC_BASE_DIR ?? ''
}${asPath}`,
openGraph: {
title,
description: desc,
Expand Down

0 comments on commit 3f687ae

Please sign in to comment.