mirror of
https://github.com/ClovertaTheTrilobita/SanYeCao-blog.git
synced 2026-04-02 01:54:50 +00:00
Merge branch 'master' into blog-content
This commit is contained in:
commit
2c74c3136d
1 changed files with 19 additions and 12 deletions
|
|
@ -43,18 +43,25 @@ const groupedPosts = filteredPosts.reduce((acc: any[], post: any) => {
|
||||||
<p class="post-date">{group.month}</p>
|
<p class="post-date">{group.month}</p>
|
||||||
|
|
||||||
<div class="month-posts">
|
<div class="month-posts">
|
||||||
{group.posts.map((post: any) => (
|
{group.posts.map((post: any) => {
|
||||||
|
const [postLang, ...slugParts] = post.id.split("/");
|
||||||
|
const slug = slugParts.join("/");
|
||||||
|
|
||||||
|
return (
|
||||||
<a
|
<a
|
||||||
href={`/${lang}/posts/${post.id}/`}
|
href={`/${lang}/posts/${slug}/`}
|
||||||
class="timeline-card"
|
class="timeline-card"
|
||||||
data-astro-reload
|
data-astro-reload
|
||||||
>
|
>
|
||||||
<h2 class="post-title">{post.data.title}</h2>
|
<h2 class="post-title">
|
||||||
|
{post.data.title}
|
||||||
|
</h2>
|
||||||
<p class="post-description">
|
<p class="post-description">
|
||||||
{post.data.description}
|
{post.data.description}
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
))}
|
);
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue