feat(blog): implement blog structure with post listing, tagging, and layout enhancements (#1962)

* feat(blog): implement blog structure with post listing and tagging functionality

* feat(blog): enhance blog layout and post metadata display with new components

* fix(blog): address PR #1962 review feedback and fix lint issues (#14)

* fix: format

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
JeffJiang
2026-04-10 20:24:52 +08:00
committed by GitHub
parent 809b341350
commit 7dc0c7d01f
16 changed files with 868 additions and 11 deletions
+7 -7
View File
@@ -1,13 +1,12 @@
import type { PageMapItem } from "nextra";
import { getPageMap } from "nextra/page-map";
import { Footer, Layout } from "nextra-theme-docs";
import { Layout } from "nextra-theme-docs";
import { Footer } from "@/components/landing/footer";
import { Header } from "@/components/landing/header";
import { getLocaleByLang } from "@/core/i18n/locale";
import "nextra-theme-docs/style.css";
const footer = <Footer>MIT {new Date().getFullYear()} © Nextra.</Footer>;
const i18n = [
{ locale: "en", name: "English" },
{ locale: "zh", name: "中文" },
@@ -15,7 +14,7 @@ const i18n = [
function formatPageRoute(base: string, items: PageMapItem[]): PageMapItem[] {
return items.map((item) => {
if ("route" in item) {
if ("route" in item && !item.route.startsWith(base)) {
item.route = `${base}${item.route}`;
}
if ("children" in item && item.children) {
@@ -29,6 +28,7 @@ export default async function DocLayout({ children, params }) {
const { lang } = await params;
const locale = getLocaleByLang(lang);
const pages = await getPageMap(`/${lang}`);
const pageMap = formatPageRoute(`/${lang}/docs`, pages);
return (
<Layout
@@ -39,9 +39,9 @@ export default async function DocLayout({ children, params }) {
locale={locale}
/>
}
pageMap={formatPageRoute(`/${lang}/docs`, pages)}
docsRepositoryBase="https://github.com/bytedance/deerflow/tree/main/frontend/src/app/content"
footer={footer}
pageMap={pageMap}
docsRepositoryBase="https://github.com/bytedance/deerflow/tree/main/frontend/src/content"
footer={<Footer />}
i18n={i18n}
// ... Your additional layout options
>