mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-29 12:10:22 +02:00
Implement og image override and fix canonical urls
This commit is contained in:
@@ -14,6 +14,7 @@ export interface GuideFrontmatter {
|
|||||||
};
|
};
|
||||||
isNew: boolean;
|
isNew: boolean;
|
||||||
type: 'visual' | 'textual';
|
type: 'visual' | 'textual';
|
||||||
|
ogImageUrl?: string;
|
||||||
date: string;
|
date: string;
|
||||||
sitemap: {
|
sitemap: {
|
||||||
priority: number;
|
priority: number;
|
||||||
|
@@ -19,7 +19,7 @@ const ogImageUrl = getOpenGraphImageUrl({
|
|||||||
<BaseLayout
|
<BaseLayout
|
||||||
title={guideData.seo.title}
|
title={guideData.seo.title}
|
||||||
description={guideData.seo.description}
|
description={guideData.seo.description}
|
||||||
permalink={`/backend/${guideId}`}
|
permalink={`/backend/developer-skills`}
|
||||||
canonicalUrl={guideData.canonicalUrl}
|
canonicalUrl={guideData.canonicalUrl}
|
||||||
ogImageUrl={ogImageUrl}
|
ogImageUrl={ogImageUrl}
|
||||||
>
|
>
|
||||||
|
@@ -19,7 +19,7 @@ const ogImageUrl = getOpenGraphImageUrl({
|
|||||||
<BaseLayout
|
<BaseLayout
|
||||||
title={guideData.seo.title}
|
title={guideData.seo.title}
|
||||||
description={guideData.seo.description}
|
description={guideData.seo.description}
|
||||||
permalink={`/backend/${guideId}`}
|
permalink={`/backend/developer-tools`}
|
||||||
canonicalUrl={guideData.canonicalUrl}
|
canonicalUrl={guideData.canonicalUrl}
|
||||||
ogImageUrl={ogImageUrl}
|
ogImageUrl={ogImageUrl}
|
||||||
>
|
>
|
||||||
|
@@ -22,7 +22,7 @@ const ogImageUrl = getOpenGraphImageUrl({
|
|||||||
<BaseLayout
|
<BaseLayout
|
||||||
title={guideData.seo.title}
|
title={guideData.seo.title}
|
||||||
description={guideData.seo.description}
|
description={guideData.seo.description}
|
||||||
permalink={`/backend/${guideId}`}
|
permalink={`/backend/languages`}
|
||||||
canonicalUrl={guideData.canonicalUrl}
|
canonicalUrl={guideData.canonicalUrl}
|
||||||
ogImageUrl={ogImageUrl}
|
ogImageUrl={ogImageUrl}
|
||||||
>
|
>
|
||||||
|
@@ -24,10 +24,12 @@ const { guideId } = Astro.params;
|
|||||||
const { guide } = Astro.props;
|
const { guide } = Astro.props;
|
||||||
const { frontmatter: guideData, author } = guide;
|
const { frontmatter: guideData, author } = guide;
|
||||||
|
|
||||||
const ogImageUrl = getOpenGraphImageUrl({
|
const ogImageUrl =
|
||||||
group: 'guides',
|
guideData.ogImageUrl ||
|
||||||
resourceId: guideId,
|
getOpenGraphImageUrl({
|
||||||
});
|
group: 'guides',
|
||||||
|
resourceId: guideId,
|
||||||
|
});
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout
|
<BaseLayout
|
||||||
|
Reference in New Issue
Block a user