Skip to content

Commit d8cafc4

Browse files
committed
Update src/components/Content/Layout/index.astro
1 parent 23bb29e commit d8cafc4

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

src/components/Content/Layout/index.astro

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
/**
3-
* Shared layout for article and deep-dive item views.
3+
* Shared layout for article item views.
44
*
55
* Wraps MarkdownLayout and fills its named slots (hero-image,
66
* after-content, related-content) so page files only need to
@@ -17,11 +17,7 @@ export type Props = {
1717
/** Resolved author display name */
1818
author: string
1919
/** Content collection entry */
20-
article: CollectionEntry<'articles'> | CollectionEntry<'deepDives'>
21-
/** Canonical URL path when it differs from the rendered page path */
22-
canonicalPath?: string
23-
/** Explicit robots meta content when the page needs non-default indexing behavior */
24-
robotsContent?: string
20+
article: CollectionEntry<'articles'>
2521
/** Canonical URL path, e.g. '/articles/my-slug' */
2622
path: string
2723
/** Estimated reading time label */
@@ -30,20 +26,17 @@ export type Props = {
3026
section: string
3127
}
3228
33-
const { author, article, canonicalPath, path, readingTime, robotsContent, section } = Astro.props
34-
const relatedContentType = path.startsWith('/deep-dive/') || canonicalPath ? 'deep-dive' : 'articles'
29+
const { author, article, path, readingTime, section } = Astro.props
3530
---
3631

3732
<MarkdownLayout
3833
author={author}
39-
{...canonicalPath && { canonicalPath }}
4034
collectionItem={article}
4135
contentType="article"
4236
description={article.data.description}
4337
hideBreadcrumbsOnMobile={true}
4438
pageTitle={article.data.title}
4539
path={path}
46-
{...robotsContent && { robotsContent }}
4740
publishDate={article.data.publishDate}
4841
{...article.data.modifiedDate && { modifiedDate: article.data.modifiedDate }}
4942
section={section}
@@ -107,7 +100,7 @@ const relatedContentType = path.startsWith('/deep-dive/') || canonicalPath ? 'de
107100
variant="suggested"
108101
currentSlug={article.id}
109102
limit={5}
110-
type={relatedContentType}
103+
type="articles"
111104
showReadMore={false}
112105
/>
113106
</section>

0 commit comments

Comments
 (0)