diff --git a/content-collections.ts b/content-collections.ts index 10b294b..f87dd9b 100644 --- a/content-collections.ts +++ b/content-collections.ts @@ -29,7 +29,7 @@ const docs = defineCollection({ const metas = defineCollection({ name: 'meta', directory: 'content/docs', - include: '**/meta.json', + include: '**/meta**.json', parser: 'json', schema: createMetaSchema, }); diff --git a/messages/en.json b/messages/en.json index 94b4675..8ea63a2 100644 --- a/messages/en.json +++ b/messages/en.json @@ -188,8 +188,9 @@ "previousPage": "Previous", "nextPage": "Next", "chooseLanguage": "Select language", + "title": "MkSaaS Docs", "homepage": "Homepage", - "title": "MkSaaS Docs" + "blog": "Blog" }, "Marketing": { "navbar": { diff --git a/messages/zh.json b/messages/zh.json index 452df97..a8d947f 100644 --- a/messages/zh.json +++ b/messages/zh.json @@ -184,8 +184,9 @@ "previousPage": "上一页", "nextPage": "下一页", "chooseLanguage": "选择语言", + "title": "MkSaaS文档", "homepage": "首页", - "title": "MkSaaS 文档" + "blog": "博客" }, "Marketing": { "navbar": { diff --git a/src/app/[locale]/docs/layout.tsx b/src/app/[locale]/docs/layout.tsx index 666fdb3..0511e1f 100644 --- a/src/app/[locale]/docs/layout.tsx +++ b/src/app/[locale]/docs/layout.tsx @@ -1,4 +1,4 @@ -import { Icons } from '@/components/icons/icons'; +import { XTwitterIcon } from '@/components/icons/x'; import { ModeSwitcher } from '@/components/layout/mode-switcher'; import { Logo } from '@/components/logo'; import { websiteConfig } from '@/config'; @@ -8,6 +8,7 @@ import { source } from '@/lib/docs/source'; import { I18nProvider, Translations } from 'fumadocs-ui/i18n'; import { DocsLayout } from 'fumadocs-ui/layouts/docs'; import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared'; +import { BookIcon, HomeIcon } from 'lucide-react'; import { Locale } from 'next-intl'; import { getTranslations } from 'next-intl/server'; import type { ReactNode } from 'react'; @@ -26,6 +27,20 @@ interface DocsLayoutProps { params: Promise<{ locale: Locale }>; } +/** + * 1. Configure navigation + * https://fumadocs.vercel.app/docs/ui/navigation/links + * https://fumadocs.vercel.app/docs/ui/navigation/sidebar + * + * example: + * https://github.com/fuma-nama/fumadocs/blob/dev/apps/docs/app/layout.config.tsx + * + * 2. Organizing Pages + * https://fumadocs.vercel.app/docs/ui/page-conventions + * + * example: + * https://github.com/fuma-nama/fumadocs/blob/dev/apps/docs/content/docs/ui/meta.json + */ export default async function DocsRootLayout({ children, params }: DocsLayoutProps) { const { locale } = await params; const t = await getTranslations({ locale, namespace: 'DocsPage' }); @@ -42,7 +57,7 @@ export default async function DocsRootLayout({ children, params }: DocsLayoutPro }; // Docs layout configurations - const baseOptions: BaseLayoutProps = { + const docsOptions: BaseLayoutProps = { i18n: docsI18nConfig, githubUrl: websiteConfig.social.github ?? undefined, nav: { @@ -57,13 +72,20 @@ export default async function DocsRootLayout({ children, params }: DocsLayoutPro { text: t('homepage'), url: '/', - active: 'nested-url', + icon: , + active: 'none', + }, + { + text: t('blog'), + url: '/blog', + icon: , + active: 'none', }, ...(websiteConfig.social.twitter ? [ { type: "icon" as const, - icon: , + icon: , text: "X", url: websiteConfig.social.twitter, secondary: true, @@ -84,7 +106,7 @@ export default async function DocsRootLayout({ children, params }: DocsLayoutPro locale={locale} translations={translations} > - + {children} diff --git a/src/app/[locale]/preview/features/twelve/page.tsx b/src/app/[locale]/preview/features/twelve/page.tsx index 70079ca..cee2c11 100644 --- a/src/app/[locale]/preview/features/twelve/page.tsx +++ b/src/app/[locale]/preview/features/twelve/page.tsx @@ -22,19 +22,19 @@ export default function Features() { const images = { 'item-1': { - image: '/charts.png', + image: '/images/blocks/charts.png', alt: 'Database visualization', }, 'item-2': { - image: '/music.png', + image: '/images/blocks/music.png', alt: 'Security authentication', }, 'item-3': { - image: '/mail2.png', + image: '/images/blocks/mail2.png', alt: 'Identity management', }, 'item-4': { - image: '/payments.png', + image: '/images/blocks/payments.png', alt: 'Analytics dashboard', }, }; diff --git a/src/components/layout/footer.tsx b/src/components/layout/footer.tsx index 71f18f3..8e62671 100644 --- a/src/components/layout/footer.tsx +++ b/src/components/layout/footer.tsx @@ -9,7 +9,6 @@ import { LocaleLink } from '@/i18n/navigation'; import { cn } from '@/lib/utils'; import { useTranslations } from 'next-intl'; import React from 'react'; -import LocaleSwitcher from './locale-switcher'; import { ThemeSelector } from './theme-selector'; export function Footer({ className }: React.HTMLAttributes) { diff --git a/src/config.tsx b/src/config.tsx index f7059d6..96303f3 100644 --- a/src/config.tsx +++ b/src/config.tsx @@ -44,6 +44,7 @@ import { UserPlusIcon } from 'lucide-react'; import { useTranslations } from 'next-intl'; +import { XTwitterIcon } from './components/icons/x'; /** * website config, without translations @@ -527,7 +528,7 @@ export function getSocialLinks(): MenuItem[] { socialLinks.push({ title: 'Twitter', href: websiteConfig.social.twitter, - icon: , + icon: , }); }