mirror of
https://github.com/YouHaveTrouble/youhavetrouble.github.io.git
synced 2026-05-11 22:06:56 +00:00
properly pass description to blog article component
This commit is contained in:
@@ -14,23 +14,23 @@ export async function getStaticPaths() {
|
||||
},
|
||||
props: {
|
||||
title: p.data.title,
|
||||
description: p.data.description,
|
||||
publishDate: p.data.publishDate,
|
||||
slug: p.slug,
|
||||
tags: p.data.tags,
|
||||
content: marked.parse(p.body),
|
||||
readingTime: readingTime(p.body).text,
|
||||
readTime: readingTime(p.body).text,
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
const { slug, title, description, publishDate, tags, content, readingTime } = Astro.props;
|
||||
const props = Astro.props;
|
||||
const permalink = `${Astro.site.href}blog/${slug}`;
|
||||
const { slug, title, description, publishDate, tags, content, readTime } = Astro.props;
|
||||
const permalink = `${Astro?.site?.href}blog/${slug}`;
|
||||
---
|
||||
|
||||
<BaseLayout title={title} description={description} permalink={permalink} current="blog">
|
||||
<header>
|
||||
<p>{publishDate} ~ {readingTime}</p>
|
||||
<p>{publishDate} ~ {readTime}</p>
|
||||
<h1>{title}</h1>
|
||||
<div class="tags" style="justify-content: center">
|
||||
{tags.map(item => (
|
||||
|
||||
Reference in New Issue
Block a user