import BLOG from '@/blog.config' import { useGlobal } from '@/lib/global' import { faArchive, faFileAlt } from '@fortawesome/free-solid-svg-icons' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import Link from 'next/link' import { useRouter } from 'next/router' /** * 最新文章列表 * @param posts 所有文章数据 * @param sliceCount 截取展示的数量 默认6 * @constructor */ const LatestPostsGroup = ({ posts }) => { if (!posts) { return <>> } // 获取当前路径 const currentPath = useRouter().asPath const { locale } = useGlobal() return <>