From 6010bd22189b1047f67ae1efb33d244ce43c8718 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Fri, 8 Nov 2024 16:21:43 +0800 Subject: [PATCH] =?UTF-8?q?Starter=20=E9=A1=B5=E8=84=9A=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E6=96=87=E7=AB=A0=E6=95=B0=E9=87=8F=E6=94=AF=E6=8C=81=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/starter/components/Footer.js | 7 +++++-- themes/starter/components/Team.js | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/themes/starter/components/Footer.js b/themes/starter/components/Footer.js index 9e212ddf..ab145c0b 100644 --- a/themes/starter/components/Footer.js +++ b/themes/starter/components/Footer.js @@ -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 ( <> {/* */} diff --git a/themes/starter/components/Team.js b/themes/starter/components/Team.js index 69eda8a6..facc53fd 100644 --- a/themes/starter/components/Team.js +++ b/themes/starter/components/Team.js @@ -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 ( <> {/* */}