Files
jellyfin.org/docusaurus.config.ts
T

175 lines
4.6 KiB
TypeScript
Raw Normal View History

import { Config } from '@docusaurus/types';
import * as Docs from '@docusaurus/plugin-content-docs';
import * as Blog from '@docusaurus/plugin-content-blog';
import * as Pages from '@docusaurus/plugin-content-pages';
import * as Sitemap from '@docusaurus/plugin-sitemap';
import * as ClientRedirects from '@docusaurus/plugin-client-redirects';
import * as ThemeClassic from '@docusaurus/theme-classic';
import * as SearchLocal from '@easyops-cn/docusaurus-search-local';
import redirects from './redirects';
const config: Config = {
title: 'Jellyfin',
tagline: 'The Free Software Media System',
2022-10-19 02:22:20 -04:00
url: 'https://jellyfin.org',
2021-05-06 09:16:19 +02:00
baseUrl: '/',
onBrokenAnchors: process.env.CI ? 'throw' : 'warn',
onBrokenLinks: process.env.CI ? 'throw' : 'warn',
onDuplicateRoutes: process.env.CI ? 'throw' : 'warn',
2022-07-28 15:15:48 -04:00
favicon: 'images/favicon.ico',
organizationName: 'jellyfin',
projectName: 'jellyfin.org',
2021-05-06 09:16:19 +02:00
themeConfig: {
image: 'images/social.png?v2',
2022-07-27 14:23:39 -04:00
metadata: [
2021-05-08 06:02:33 +02:00
{ name: 'og:type', content: 'website' },
2024-02-29 15:13:05 -05:00
{ name: 'twitter:card', content: 'summary_large_image' },
{ name: 'twitter:site', content: '@jellyfin' }
2021-05-08 06:02:33 +02:00
],
2021-05-06 14:34:40 +02:00
colorMode: {
2022-08-24 12:14:16 -04:00
defaultMode: 'dark',
2021-05-06 14:34:40 +02:00
disableSwitch: true,
respectPrefersColorScheme: false
},
2021-05-06 09:16:19 +02:00
navbar: {
logo: {
2022-07-29 01:39:12 -04:00
alt: 'Jellyfin Logo',
2022-07-28 15:15:48 -04:00
src: 'images/logo.svg'
2021-05-06 09:16:19 +02:00
},
items: [
2022-07-28 16:55:55 -04:00
{ to: 'posts', label: 'Blog', position: 'right' },
2021-05-06 09:16:19 +02:00
{
2021-05-06 15:01:16 +02:00
to: 'downloads',
label: 'Downloads',
2021-06-13 10:07:40 +02:00
position: 'right'
2021-05-06 14:34:40 +02:00
},
{
2021-05-06 15:01:16 +02:00
to: 'contribute',
label: 'Contribute',
2021-06-13 10:07:40 +02:00
position: 'right'
2021-05-06 14:34:40 +02:00
},
{
2021-05-06 14:46:55 +02:00
type: 'doc',
2022-08-18 12:35:55 -04:00
docId: 'index',
2021-05-06 15:01:16 +02:00
label: 'Documentation',
2021-06-13 10:07:40 +02:00
position: 'right'
2021-05-06 14:34:40 +02:00
},
{
2021-05-06 15:01:16 +02:00
to: 'contact',
label: 'Contact',
2021-06-13 10:07:40 +02:00
position: 'right'
2023-06-18 19:41:08 -04:00
},
{
href: 'https://forum.jellyfin.org',
label: 'Forum',
position: 'right'
2021-06-13 10:07:40 +02:00
}
]
2021-05-06 09:16:19 +02:00
},
footer: {
2022-07-29 01:39:12 -04:00
logo: {
alt: 'Jellyfin Logo',
src: 'images/logo.svg',
2024-04-23 16:40:57 +02:00
width: 280,
2022-07-29 01:39:12 -04:00
height: 80
},
2021-05-06 09:16:19 +02:00
links: [
{
2022-07-29 01:39:12 -04:00
label: 'Documentation',
2022-08-18 12:35:55 -04:00
to: '/docs'
2021-05-06 09:16:19 +02:00
},
{
2022-07-29 01:39:12 -04:00
label: 'Feature Requests',
to: 'https://features.jellyfin.org'
2021-05-06 09:16:19 +02:00
},
{
2022-07-29 01:39:12 -04:00
label: 'Contribute',
to: '/contribute'
},
2023-06-28 21:44:27 +02:00
{
label: 'Status',
to: 'https://status.jellyfin.org'
},
2022-07-29 01:39:12 -04:00
{
label: 'Contact',
to: '/contact'
2022-08-04 13:28:54 -04:00
}
2021-05-06 09:16:19 +02:00
],
2022-08-29 23:27:15 -04:00
copyright: `<a href="https://github.com/jellyfin/jellyfin/releases/latest">
<img alt="Current Release" src="https://img.shields.io/github/release/jellyfin/jellyfin.svg"/>
</a>
<br/>
Site content is licensed <a href='http://creativecommons.org/licenses/by-nd/4.0/'>CC-BY-ND-4.0</a>`
2021-06-13 10:07:40 +02:00
}
2021-05-06 09:16:19 +02:00
},
2024-03-11 13:40:23 -04:00
markdown: {
2025-10-05 01:23:09 +02:00
mermaid: true,
hooks: {
onBrokenMarkdownLinks: process.env.CI ? 'throw' : 'warn'
}
2024-03-11 13:40:23 -04:00
},
2022-08-18 11:14:34 -04:00
plugins: [
// Main content
[
'@docusaurus/plugin-content-docs',
{
sidebarPath: './sidebars.ts',
editUrl: 'https://github.com/jellyfin/jellyfin.org/edit/master/'
} satisfies Docs.Options
],
[
'@docusaurus/plugin-content-blog',
{
id: 'blog-main',
routeBasePath: 'posts',
showReadingTime: true,
2024-11-23 17:07:00 +01:00
path: 'blog',
onInlineAuthors: 'ignore',
onUntruncatedBlogPosts: 'ignore'
} satisfies Blog.Options
],
['@docusaurus/plugin-content-pages', {} satisfies Pages.Options],
// Others
['@docusaurus/plugin-sitemap', {} satisfies Sitemap.Options],
['docusaurus-plugin-sass', {}],
2025-01-23 22:06:36 +01:00
['@docusaurus/plugin-svgr', {}],
2022-08-18 11:14:34 -04:00
[
'@docusaurus/plugin-client-redirects',
{
2022-08-24 01:22:15 -04:00
fromExtensions: ['html'],
redirects: redirects
} satisfies ClientRedirects.Options
2022-08-18 11:14:34 -04:00
]
2022-08-28 02:12:25 -04:00
],
themes: [
[
'@docusaurus/theme-classic',
{
customCss: [
require.resolve('@fontsource/noto-sans/index.css'),
require.resolve('./src/css/custom.scss'),
require.resolve('./src/css/swiper.scss')
]
} satisfies ThemeClassic.Options
],
2022-08-28 02:12:25 -04:00
[
'@easyops-cn/docusaurus-search-local',
2022-08-28 02:12:25 -04:00
{
hashed: true,
2022-09-14 17:19:06 -04:00
indexBlog: false,
2022-08-28 22:52:08 -04:00
indexPages: true,
blogRouteBasePath: '/posts',
2022-09-14 17:19:06 -04:00
ignoreFiles: [
// NOTE: We need to explicitly ignore the blog routes because it seems to fall through to the page indexing
'posts',
/^posts\//
],
explicitSearchResultPath: true
} satisfies SearchLocal.PluginOptions
2024-03-11 13:40:23 -04:00
],
['@docusaurus/theme-mermaid', {}]
2021-06-13 10:07:40 +02:00
]
2021-05-06 09:16:19 +02:00
};
export default config;