Настройка cloudea.config.ts
Вся настройка платформы живёт в одном файле cloudea.config.ts в корне проекта.
const config: CloudeaConfig = {
title: "My Blog",
tagline: "Описание сайта",
url: "https://example.com",
favicon: "/favicon.ico",
// Главная страница:
// "landing" — лендинг (по умолчанию)
// "blog" — редирект на блог
// "docs" — редирект на документацию
// "about" — кастомная страница из content/pages/about.mdx
homepage: "landing",
};i18n: {
defaultLocale: "ru",
locales: ["ru", "en"],
},Переводы UI хранятся в locales/ru.json и locales/en.json. Язык определяется автоматически через Accept-Language при первом визите.
seo: {
titleTemplate: "%s | My Blog",
defaultDescription: "Описание сайта",
keywords: ["blog", "docs"],
openGraph: {
type: "website",
siteName: "My Blog",
locale: "ru_RU",
},
twitter: {
card: "summary_large_image",
site: "@yourhandle",
},
verification: {
google: "your-code",
yandex: "your-code",
},
structuredData: {
organization: {
themeConfig: {
colorMode: {
defaultMode: "system", // "light" | "dark" | "system"
respectPrefersColorScheme: true,
},
navbar: {
title: "My Blog",
logo: "/logo.png", // опционально
links: [
{ href: "/blog", label: { ru: "Блог", en: "Blog" } },
{ href: "/docs", label: { ru: "Документация", en: "Docs" } },
{
label: { ru: "Другое", en: "More" },
items: [
{ href: "/about", label: { ru: "О проекте", en: "About" } },
{ href: "https://example.com", label:
comments: {
provider: "giscus",
giscus: {
repo: "user/repo",
repoId: "R_xxx",
category: "comments",
categoryId: "DIC_xxx",
mapping: "pathname",
},
},comments: {
provider: "supabase",
},
supabase: {
url: "https://xxx.supabase.co",
anonKey: "eyJ...",
},comments: {
provider: "none",
},customCss: ["styles/custom.css"],Переопределите CSS-переменные:
:root {
--primary: oklch(0.55 0.13 230);
--primary-foreground: oklch(1 0 0);
}
.dark {
--background: oklch(0.07 0.025 265);
--primary: oklch(0.65 0.14 230);
}customScripts: [
{ src: "scripts/analytics.js" }, // Локальный файл
{ src: "https://example.com/script.js", external: true }, // Внешний URL
{ code: "console.log('Hello!')", strategy: "lazyOnload" }, // Инлайн-код
],Опции: strategy (beforeInteractive | afterInteractive | lazyOnload), position (head | body).
analytics: {
gtag: "G-XXXXXXXXXX", // Google Analytics
yandexMetrika: "12345678", // Яндекс.Метрика
},