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;
|
||||
type: 'visual' | 'textual';
|
||||
ogImageUrl?: string;
|
||||
date: string;
|
||||
sitemap: {
|
||||
priority: number;
|
||||
|
@@ -19,7 +19,7 @@ const ogImageUrl = getOpenGraphImageUrl({
|
||||
<BaseLayout
|
||||
title={guideData.seo.title}
|
||||
description={guideData.seo.description}
|
||||
permalink={`/backend/${guideId}`}
|
||||
permalink={`/backend/developer-skills`}
|
||||
canonicalUrl={guideData.canonicalUrl}
|
||||
ogImageUrl={ogImageUrl}
|
||||
>
|
||||
|
@@ -19,7 +19,7 @@ const ogImageUrl = getOpenGraphImageUrl({
|
||||
<BaseLayout
|
||||
title={guideData.seo.title}
|
||||
description={guideData.seo.description}
|
||||
permalink={`/backend/${guideId}`}
|
||||
permalink={`/backend/developer-tools`}
|
||||
canonicalUrl={guideData.canonicalUrl}
|
||||
ogImageUrl={ogImageUrl}
|
||||
>
|
||||
|
@@ -22,7 +22,7 @@ const ogImageUrl = getOpenGraphImageUrl({
|
||||
<BaseLayout
|
||||
title={guideData.seo.title}
|
||||
description={guideData.seo.description}
|
||||
permalink={`/backend/${guideId}`}
|
||||
permalink={`/backend/languages`}
|
||||
canonicalUrl={guideData.canonicalUrl}
|
||||
ogImageUrl={ogImageUrl}
|
||||
>
|
||||
|
@@ -24,10 +24,12 @@ const { guideId } = Astro.params;
|
||||
const { guide } = Astro.props;
|
||||
const { frontmatter: guideData, author } = guide;
|
||||
|
||||
const ogImageUrl = getOpenGraphImageUrl({
|
||||
group: 'guides',
|
||||
resourceId: guideId,
|
||||
});
|
||||
const ogImageUrl =
|
||||
guideData.ogImageUrl ||
|
||||
getOpenGraphImageUrl({
|
||||
group: 'guides',
|
||||
resourceId: guideId,
|
||||
});
|
||||
---
|
||||
|
||||
<BaseLayout
|
||||
|
Reference in New Issue
Block a user