Hexo: 背景图

This commit is contained in:
tangly1024
2022-03-31 11:30:19 +08:00
parent 6bfe030ead
commit 418dc38de6
4 changed files with 7 additions and 8 deletions

View File

@@ -9,7 +9,7 @@ import { useRouter } from 'next/router'
* @param sliceCount 截取展示的数量 默认6
* @constructor
*/
const LatestPostsGroup = ({ posts }) => {
const LatestPostsGroup = ({ posts, siteInfo }) => {
if (!posts) {
return <></>
}
@@ -29,7 +29,7 @@ const LatestPostsGroup = ({ posts }) => {
const selected = currentPath === `${BLOG.PATH}/article/${post.slug}`
const headerImage = post?.page_cover
? `url("${post.page_cover}")`
: `url("/${BLOG.HOME_BANNER_IMAGE}")`
: `url("${siteInfo?.pageCover}")`
return (
<Link