147 lines
3.9 KiB
TypeScript
147 lines
3.9 KiB
TypeScript
import { themes as prismThemes } from 'prism-react-renderer';
|
|
import type { Config } from '@docusaurus/types';
|
|
import type * as Preset from '@docusaurus/preset-classic';
|
|
|
|
const config: Config = {
|
|
title: 'cuframes',
|
|
tagline: 'Zero-copy decoded video frames over CUDA — across processes, without pid sharing.',
|
|
favicon: 'img/favicon.ico',
|
|
|
|
future: {
|
|
v4: true,
|
|
},
|
|
|
|
url: 'https://cuframes.dev',
|
|
baseUrl: '/',
|
|
|
|
organizationName: 'gx',
|
|
projectName: 'cuframes-docs',
|
|
|
|
onBrokenLinks: 'throw',
|
|
|
|
i18n: {
|
|
defaultLocale: 'en',
|
|
locales: ['en', 'ru'],
|
|
localeConfigs: {
|
|
en: { label: 'English', direction: 'ltr', htmlLang: 'en-US' },
|
|
ru: { label: 'Русский', direction: 'ltr', htmlLang: 'ru-RU', path: 'ru', translate: true },
|
|
},
|
|
},
|
|
|
|
presets: [
|
|
[
|
|
'classic',
|
|
{
|
|
docs: {
|
|
sidebarPath: './sidebars.ts',
|
|
editUrl:
|
|
'https://git.goldix.org/gx/cuframes-docs/_edit/main/site/',
|
|
showLastUpdateTime: true,
|
|
showLastUpdateAuthor: false,
|
|
},
|
|
blog: false,
|
|
theme: {
|
|
customCss: './src/css/custom.css',
|
|
},
|
|
} satisfies Preset.Options,
|
|
],
|
|
],
|
|
|
|
themes: [
|
|
'@docusaurus/theme-mermaid',
|
|
[
|
|
require.resolve('@easyops-cn/docusaurus-search-local'),
|
|
{
|
|
hashed: true,
|
|
language: ['en', 'ru'],
|
|
indexDocs: true,
|
|
indexBlog: false,
|
|
indexPages: false,
|
|
docsRouteBasePath: '/docs',
|
|
highlightSearchTermsOnTargetPage: true,
|
|
explicitSearchResultPath: true,
|
|
},
|
|
],
|
|
],
|
|
|
|
markdown: {
|
|
mermaid: true,
|
|
hooks: {
|
|
onBrokenMarkdownLinks: 'warn',
|
|
},
|
|
},
|
|
|
|
themeConfig: {
|
|
// OpenGraph social card — добавить позже (1200×630).
|
|
|
|
navbar: {
|
|
title: 'cuframes',
|
|
// Logo TBD — пока без logo block (Docusaurus покажет только title).
|
|
items: [
|
|
{
|
|
type: 'docSidebar',
|
|
sidebarId: 'mainSidebar',
|
|
position: 'left',
|
|
label: 'Documentation',
|
|
},
|
|
{
|
|
href: 'https://git.goldix.org/gx/cuframes',
|
|
label: 'Source',
|
|
position: 'right',
|
|
},
|
|
{
|
|
type: 'localeDropdown',
|
|
position: 'right',
|
|
},
|
|
],
|
|
},
|
|
|
|
footer: {
|
|
style: 'dark',
|
|
links: [
|
|
{
|
|
title: 'Documentation',
|
|
items: [
|
|
{ label: 'What is cuframes', to: '/docs/intro' },
|
|
{ label: 'Getting started', to: '/docs/getting-started/install' },
|
|
{ label: 'FFmpeg integration', to: '/docs/integration/ffmpeg-demuxer' },
|
|
{ label: 'API reference', to: '/docs/reference/api-c' },
|
|
],
|
|
},
|
|
{
|
|
title: 'Project',
|
|
items: [
|
|
{ label: 'Source (Gitea)', href: 'https://git.goldix.org/gx/cuframes' },
|
|
{ label: 'Issues', href: 'https://git.goldix.org/gx/cuframes/issues' },
|
|
{ label: 'Releases', href: 'https://git.goldix.org/gx/cuframes/releases' },
|
|
{ label: 'License (LGPL-2.1+)', href: 'https://git.goldix.org/gx/cuframes/raw/branch/main/LICENSE' },
|
|
],
|
|
},
|
|
{
|
|
title: 'Related',
|
|
items: [
|
|
{ label: 'NVIDIA CUDA VMM API', href: 'https://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__VA.html' },
|
|
{ label: 'FFmpeg', href: 'https://ffmpeg.org/' },
|
|
{ label: 'Frigate (NVR consumer example)', href: 'https://frigate.video/' },
|
|
],
|
|
},
|
|
],
|
|
copyright: `© ${new Date().getFullYear()} cuframes contributors. Licensed under LGPL-2.1+.`,
|
|
},
|
|
|
|
prism: {
|
|
theme: prismThemes.github,
|
|
darkTheme: prismThemes.dracula,
|
|
additionalLanguages: ['c', 'cpp', 'python', 'bash', 'docker', 'yaml'],
|
|
},
|
|
|
|
colorMode: {
|
|
defaultMode: 'light',
|
|
disableSwitch: false,
|
|
respectPrefersColorScheme: true,
|
|
},
|
|
} satisfies Preset.ThemeConfig,
|
|
};
|
|
|
|
export default config;
|