Skip to content

Commit 46f9be2

Browse files
authored
Merge pull request #236 from telepresenceio/thallgren/canonical-wo-www
Remove www. prefix from canonical URLs
2 parents 7bd6e1e + c4d533c commit 46f9be2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docusaurus.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ const config: Config = {
196196
plugins: ["docusaurus-plugin-sass", "./src/plugins/configure-svgo.ts"],
197197

198198
customFields: {
199-
canonicalBaseUrl: "https://www.telepresence.io",
199+
canonicalBaseUrl: "https://telepresence.io",
200200
}
201201
};
202202

src/theme/DocItem/Metadata/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type Props = WrapperProps<typeof MetadataType>;
1212
export default function MetadataWrapper(props: Props): JSX.Element {
1313
const { siteConfig: {customFields}} = useDocusaurusContext()
1414
const { pathname } = useLocation();
15-
const canonical = `${customFields['canonicalBaseUrl']}${pathname}`
15+
const canonical = `${customFields['canonicalBaseUrl']}${pathname.replace(/\/$/, "")}`
1616

1717
return (
1818
<>

0 commit comments

Comments
 (0)