Starter 页脚最新文章数量支持配置

This commit is contained in:
tangly1024.com
2024-11-08 16:21:43 +08:00
parent 164f9ce2aa
commit 6010bd2218
2 changed files with 6 additions and 3 deletions

View File

@@ -5,8 +5,11 @@ import { SVGFooterCircleBG } from './svg/SVGFooterCircleBG'
/* eslint-disable @next/next/no-img-element */
export const Footer = props => {
const latestPosts = props?.latestPosts ? props?.latestPosts.slice(0, 2) : []
const STARTER_FOOTER_LINK_GROUP = siteConfig('STARTER_FOOTER_LINK_GROUP')
const footerPostCount = siteConfig('STARTER_FOOTER_POST_COUNT', 2)
const latestPosts = props?.latestPosts
? props?.latestPosts.slice(0, footerPostCount)
: []
const STARTER_FOOTER_LINK_GROUP = siteConfig('STARTER_FOOTER_LINK_GROUP', [])
return (
<>
{/* <!-- ====== Footer Section Start --> */}

View File

@@ -3,7 +3,7 @@ import { siteConfig } from '@/lib/config'
import { SVGAvatarBG } from './svg/SVGAvatarBG'
export const Team = () => {
const STARTER_TEAM_ITEMS = siteConfig('STARTER_TEAM_ITEMS')
const STARTER_TEAM_ITEMS = siteConfig('STARTER_TEAM_ITEMS', [])
return (
<>
{/* <!-- ====== Team Section Start --> */}