mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-27 19:20:12 +02:00
Fix canonicals
This commit is contained in:
@@ -27,7 +27,11 @@ const {
|
|||||||
sponsor,
|
sponsor,
|
||||||
} = Astro.props;
|
} = Astro.props;
|
||||||
|
|
||||||
const currentPageAbsoluteUrl = `https://roadmap.sh${permalink}`;
|
// Remove trailing slashes to consider the page as canonical
|
||||||
|
const currentPageAbsoluteUrl = `https://roadmap.sh${permalink.replace(
|
||||||
|
/\/$/,
|
||||||
|
''
|
||||||
|
)}`;
|
||||||
---
|
---
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
@@ -59,7 +63,7 @@ const currentPageAbsoluteUrl = `https://roadmap.sh${permalink}`;
|
|||||||
<meta property='og:type' content='website' />
|
<meta property='og:type' content='website' />
|
||||||
<meta property='og:url' content={currentPageAbsoluteUrl} />
|
<meta property='og:url' content={currentPageAbsoluteUrl} />
|
||||||
|
|
||||||
<link rel='canonical' href={currentPageAbsoluteUrl} />
|
{currentPageAbsoluteUrl !== 'https://roadmap.sh' && <link rel='canonical' href={currentPageAbsoluteUrl} /> }
|
||||||
|
|
||||||
<meta name='mobile-web-app-capable' content='yes' />
|
<meta name='mobile-web-app-capable' content='yes' />
|
||||||
<meta name='apple-mobile-web-app-capable' content='yes' />
|
<meta name='apple-mobile-web-app-capable' content='yes' />
|
||||||
|
Reference in New Issue
Block a user