Remove latest articles section from right sidebar

This commit is contained in:
2025-11-17 22:24:49 +08:00
parent 45e6088f69
commit 8c7453dbcc

View File

@@ -2,11 +2,10 @@ import Link from 'next/link';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faGithub, faMastodon, faLinkedin } from '@fortawesome/free-brands-svg-icons';
import { siteConfig } from '@/lib/config';
import { getAllPostsSorted, getAllTagsWithCount } from '@/lib/posts';
import { getAllTagsWithCount } from '@/lib/posts';
import { allPages } from 'contentlayer/generated';
export function RightSidebar() {
const latest = getAllPostsSorted().slice(0, 5);
const tags = getAllTagsWithCount().slice(0, 5);
const aboutPage =
@@ -87,24 +86,6 @@ export function RightSidebar() {
</p>
</section>
<section className="rounded-xl border bg-white px-4 py-3 text-sm shadow-sm dark:border-slate-800 dark:bg-slate-900 dark:text-slate-100">
<h2 className="text-xs font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400">
</h2>
<ul className="mt-2 space-y-1">
{latest.map((post) => (
<li key={post._id}>
<Link
href={post.url}
className="line-clamp-2 text-xs text-slate-700 hover:text-blue-600 dark:text-slate-100 dark:hover:text-blue-400"
>
{post.title}
</Link>
</li>
))}
</ul>
</section>
{tags.length > 0 && (
<section className="rounded-xl border bg-white px-4 py-3 text-sm shadow-sm dark:border-slate-800 dark:bg-slate-900 dark:text-slate-100">
<h2 className="text-xs font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400">