agent-ecosystem/landing/product-docs/.vitepress/config.ts
2026-05-10 21:29:07 +03:00

270 lines
9.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import {
transformerNotationDiff,
transformerNotationErrorLevel,
transformerNotationFocus,
transformerNotationHighlight
} from "@shikijs/transformers";
import { fileURLToPath } from "node:url";
import { defineConfig, type DefaultTheme } from "vitepress";
import llmstxt, { copyOrDownloadAsMarkdownButtons } from "vitepress-plugin-llms";
const REPO = "777genius/agent-teams-ai";
const SITE_TITLE = "Agent Teams Docs";
const SITE_DESCRIPTION = "Documentation for Agent Teams, a local desktop app for AI agent orchestration.";
const trimTrailingSlash = (value: string) => value.replace(/\/+$/, "");
const normalizeBase = (value: string) => {
const trimmed = value.trim();
if (!trimmed || trimmed === "/") return "/";
return `/${trimmed.replace(/^\/+|\/+$/g, "")}/`;
};
const withTrailingSlash = (value: string) => `${trimTrailingSlash(value)}/`;
const appBase = normalizeBase(process.env.NUXT_APP_BASE_URL || "/");
const base = appBase === "/" ? "/docs/" : `${appBase}docs/`;
const siteUrl = trimTrailingSlash(
process.env.NUXT_PUBLIC_SITE_URL || "https://777genius.github.io/agent-teams-ai"
);
const publicBaseUrl =
appBase === "/" || siteUrl.endsWith(trimTrailingSlash(appBase))
? withTrailingSlash(siteUrl)
: `${withTrailingSlash(siteUrl)}${appBase.replace(/^\/+/, "")}`;
const docsUrl = `${publicBaseUrl}docs/`;
const downloadUrl = `${publicBaseUrl}download/`;
const ruDownloadUrl = `${publicBaseUrl}ru/download/`;
const landingPublicDir = fileURLToPath(new URL("../../public", import.meta.url));
const rootGuide: DefaultTheme.SidebarItem[] = [
{
text: "Start",
items: [
{ text: "Quickstart", link: "/guide/quickstart" },
{ text: "Installation", link: "/guide/installation" },
{ text: "Create a team", link: "/guide/create-team" }
]
},
{
text: "Workflows",
items: [
{ text: "Runtime setup", link: "/guide/runtime-setup" },
{ text: "Agent workflow", link: "/guide/agent-workflow" },
{ text: "Code review", link: "/guide/code-review" },
{ text: "Troubleshooting", link: "/guide/troubleshooting" }
]
},
{
text: "Reference",
items: [
{ text: "Concepts", link: "/reference/concepts" },
{ text: "Providers and runtimes", link: "/reference/providers-runtimes" },
{ text: "Privacy and local data", link: "/reference/privacy-local-data" },
{ text: "FAQ", link: "/reference/faq" }
]
}
];
const ruGuide: DefaultTheme.SidebarItem[] = [
{
text: "Старт",
items: [
{ text: "Быстрый старт", link: "/ru/guide/quickstart" },
{ text: "Установка", link: "/ru/guide/installation" },
{ text: "Создание команды", link: "/ru/guide/create-team" }
]
},
{
text: "Рабочие процессы",
items: [
{ text: "Настройка рантайма", link: "/ru/guide/runtime-setup" },
{ text: "Работа агентов", link: "/ru/guide/agent-workflow" },
{ text: "Код-ревью", link: "/ru/guide/code-review" },
{ text: "Диагностика", link: "/ru/guide/troubleshooting" }
]
},
{
text: "Справочник",
items: [
{ text: "Концепции", link: "/ru/reference/concepts" },
{ text: "Провайдеры и рантаймы", link: "/ru/reference/providers-runtimes" },
{ text: "Приватность и локальные данные", link: "/ru/reference/privacy-local-data" },
{ text: "FAQ", link: "/ru/reference/faq" }
]
}
];
const rootNav: DefaultTheme.NavItem[] = [
{ text: "Guide", link: "/guide/quickstart" },
{ text: "Reference", link: "/reference/concepts" },
{ text: "Troubleshooting", link: "/guide/troubleshooting" },
{ text: "Download", link: downloadUrl, target: "_self" }
];
const ruNav: DefaultTheme.NavItem[] = [
{ text: "Руководство", link: "/ru/guide/quickstart" },
{ text: "Справочник", link: "/ru/reference/concepts" },
{ text: "Диагностика", link: "/ru/guide/troubleshooting" },
{ text: "Скачать", link: ruDownloadUrl, target: "_self" }
];
export default defineConfig({
lang: "en-US",
title: SITE_TITLE,
description: SITE_DESCRIPTION,
base,
cleanUrls: true,
lastUpdated: true,
sitemap: {
hostname: docsUrl,
lastmodDateOnly: true
},
head: [
["link", { rel: "icon", type: "image/png", href: `${base}logo-192.png` }],
["link", { rel: "canonical", href: docsUrl }],
["meta", { name: "robots", content: "index, follow" }],
["meta", { name: "author", content: "777genius" }],
["meta", { name: "generator", content: "VitePress" }],
["meta", { name: "color-scheme", content: "light dark" }],
["meta", { name: "theme-color", content: "#f8fafc", media: "(prefers-color-scheme: light)" }],
["meta", { name: "theme-color", content: "#0a0a0f", media: "(prefers-color-scheme: dark)" }],
["meta", { property: "og:type", content: "website" }],
["meta", { property: "og:title", content: SITE_TITLE }],
["meta", { property: "og:description", content: SITE_DESCRIPTION }],
["meta", { property: "og:url", content: docsUrl }],
["meta", { property: "og:image", content: `${publicBaseUrl}og-image.png` }],
["meta", { property: "og:image:width", content: "1200" }],
["meta", { property: "og:image:height", content: "630" }],
["meta", { property: "og:site_name", content: "Agent Teams" }],
["meta", { property: "og:locale", content: "en_US" }],
["meta", { name: "twitter:card", content: "summary_large_image" }],
["meta", { name: "twitter:title", content: SITE_TITLE }],
["meta", { name: "twitter:description", content: SITE_DESCRIPTION }],
["meta", { name: "twitter:image", content: `${publicBaseUrl}og-image.png` }],
[
"script",
{ type: "application/ld+json" },
JSON.stringify({
"@context": "https://schema.org",
"@type": "SoftwareApplication",
name: "Agent Teams",
description: SITE_DESCRIPTION,
url: publicBaseUrl,
applicationCategory: "DeveloperApplication",
operatingSystem: "macOS, Windows, Linux",
offers: { "@type": "Offer", price: "0", priceCurrency: "USD" }
})
]
],
vite: {
publicDir: landingPublicDir,
plugins: [llmstxt()],
optimizeDeps: {
include: ["medium-zoom", "vitepress-codeblock-collapse"]
}
},
markdown: {
codeTransformers: [
transformerNotationDiff(),
transformerNotationFocus(),
transformerNotationHighlight(),
transformerNotationErrorLevel()
],
config(md) {
md.use(copyOrDownloadAsMarkdownButtons);
}
},
themeConfig: {
logo: "/logo-192.png",
siteTitle: "Agent Teams",
outline: {
level: [2, 3],
label: "On this page"
},
search: {
provider: "local",
options: {
translations: {
button: "Search...",
buttonAriaLabel: "Search documentation",
noResultsText: "No results found",
suggestedQueryText: "Try searching for",
reportMissing: "Found a problem? Create an issue",
reportMissingText: "Report missing result",
reportMissingLink: "https://github.com/777genius/agent-teams-ai/issues/new"
}
}
},
nav: rootNav,
sidebar: {
"/ru/": ruGuide,
"/": rootGuide
},
socialLinks: [{ icon: "github", link: `https://github.com/${REPO}` }],
editLink: {
pattern: `https://github.com/${REPO}/edit/main/landing/product-docs/:path`,
text: "Edit this page on GitHub"
},
footer: {
message: "Free and open source.",
copyright: "Copyright © 777genius"
}
},
locales: {
root: {
label: "English",
lang: "en-US",
themeConfig: {
nav: rootNav,
sidebar: rootGuide,
docFooter: {
prev: "Previous",
next: "Next"
}
}
},
ru: {
label: "Русский",
lang: "ru-RU",
title: "Документация Agent Teams",
description: "Документация Agent Teams, локального desktop-приложения для оркестрации AI-агентов.",
themeConfig: {
nav: ruNav,
sidebar: ruGuide,
outline: {
level: [2, 3],
label: "На этой странице"
},
search: {
provider: "local",
options: {
translations: {
button: {
buttonText: "Поиск по документации",
buttonAriaLabel: "поиск по документации"
},
modal: {
noResultsText: "Результаты не найдены",
footer: {
selectText: "для выбора",
navigateText: "для навигации",
closeText: "для закрытия"
}
}
}
}
},
editLink: {
pattern: `https://github.com/${REPO}/edit/main/landing/product-docs/:path`,
text: "Редактировать на GitHub"
},
docFooter: {
prev: "Назад",
next: "Дальше"
},
footer: {
message: "Бесплатно и с открытым кодом.",
copyright: "Copyright © 777genius"
}
}
}
}
});