Skip to content

Commit 2ca6cc4

Browse files
Alex KrawiecAlex Krawiec
authored andcommitted
Add more canonical tags and refactored code logic
1 parent b36ab92 commit 2ca6cc4

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
lines changed

app/[[...path]]/page.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,11 @@ export async function generateMetadata({params}: MetadataProps): Promise<Metadat
179179
}
180180
}
181181

182-
let canonical = domain;
183-
if (customCanonicalTag) {
184-
canonical = domain + checkCanonicalTagFormat(customCanonicalTag);
185-
} else if (params.path) {
186-
canonical = `${domain}/${params.path.join('/')}/`;
187-
}
182+
const canonical = customCanonicalTag
183+
? domain + checkCanonicalTagFormat(customCanonicalTag)
184+
: params.path
185+
? `${domain}/${params.path.join('/')}/`
186+
: domain;
188187

189188
return {
190189
title,

docs/platforms/javascript/common/configuration/options.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Basic Options
33
description: "Learn more about how to configure the SDK. These options are set when the SDK is first initialized, passed to the init function as an object."
4-
customCanonicalTag: "platforms/javascript/guides/configuration/options/"
4+
customCanonicalTag: "/platforms/javascript/configuration/options/"
55
sidebar_order: 1
66
---
77

docs/platforms/javascript/common/enriching-events/level/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Event Level
33
description: "The level - similar to logging levels - is generally added by default based on the integration. You can also override it within an event."
4+
customCanonicalTag: "/platforms/javascript/enriching-events/level/"
45
---
56

67
The level - similar to logging levels - is generally added by default by the SDK. You can either provide a dedicated level directly in `captureMessage`, or configure a level on the scope in order to apply it to all events.

docs/platforms/javascript/common/session-replay/privacy.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ notSupported:
1818
- javascript.nestjs
1919
- javascript.cloudflare
2020
description: "Configuring Session Replay to maintain user and data privacy."
21+
customCanonicalTag: "/platforms/javascript/session-replay/privacy/"
2122
---
2223

2324
<Include name="session-replay-web-report-bug.mdx" />

docs/platforms/javascript/common/sourcemaps/uploading/vite.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Vite
33
description: "Upload your source maps with the Sentry Vite Plugin."
4+
customCanonicalTag: "/platforms/javascript/sourcemaps/uploading/vite/"
45
sidebar_order: 3
56
---
67

docs/platforms/javascript/common/sourcemaps/uploading/webpack.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Webpack
33
description: "Upload your source maps with our webpack plugin."
4+
customCanonicalTag: "/platforms/javascript/sourcemaps/uploading/webpack/"
45
sidebar_order: 1
56
---
67

0 commit comments

Comments
 (0)