Новые изменения в коде проекта
This commit is contained in:
parent
0777fc201f
commit
aef12e853d
12 changed files with 159 additions and 15 deletions
|
|
@ -4,7 +4,7 @@ import { SITE_URL } from '@constants';
|
|||
import PostCommentForm from '@components/blog/PostCommentForm.astro';
|
||||
import RelatedPosts from '@components/blog/RelatedPosts.astro';
|
||||
import ArticleTableOfContents from '@components/blog/ArticleTableOfContents.astro';
|
||||
import { getPostBySlug, getPosts } from '@lib/pb';
|
||||
import { getPostBySlug, getPosts, getPostImageUrl } from '@lib/pb';
|
||||
import { marked } from 'marked';
|
||||
|
||||
export const prerender = false;
|
||||
|
|
@ -50,6 +50,7 @@ const { posts: relatedPosts } = await getPosts({ perPage: 4, category: post.cate
|
|||
const filteredRelated = relatedPosts.filter(p => p.slug !== slug).slice(0, 3);
|
||||
|
||||
const currentUrl = `${SITE_URL}/blog/${slug}`;
|
||||
const heroImage = getPostImageUrl(post);
|
||||
---
|
||||
|
||||
<ArticleLayout
|
||||
|
|
@ -61,7 +62,7 @@ const currentUrl = `${SITE_URL}/blog/${slug}`;
|
|||
{ label: 'Блог', href: '/blog' },
|
||||
{ label: post.title }
|
||||
]}
|
||||
heroImage={post.imageUrl}
|
||||
heroImage={heroImage}
|
||||
heroAlt={post.title}
|
||||
category={post.category}
|
||||
postTitle={post.title}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue