Files
docs/docusaurus.config.ts
T
2024-11-28 22:57:45 +01:00

143 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: 'OSUI',
tagline: 'Style your terminal, The creative way',
favicon: 'img/favicon.ico',
url: 'https://osui.netlify.app',
baseUrl: '/',
organizationName: 'osui-rs',
projectName: 'osui',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
{
docs: {
sidebarPath: './sidebars.json',
editUrl:
'https://github.com/osui-rs/docs/tree/master/',
},
blog: false,
// blog: {
// showReadingTime: true,
// feedOptions: {
// type: ['rss', 'atom'],
// xslt: true,
// },
// editUrl:
// 'https://github.com/osui-rs/docs/',
// onInlineTags: 'warn',
// onInlineAuthors: 'warn',
// onUntruncatedBlogPosts: 'warn',
// },
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
],
themeConfig: {
navbar: {
title: 'OSUI',
logo: {
alt: 'OSUI Logo',
src: 'img/osui.png',
},
items: [
{
type: 'docSidebar',
sidebarId: 'docsSidebar',
position: 'left',
label: 'Docs',
},
// {to: '/blog', label: 'Blog', position: 'left'},
{
type: 'docsVersionDropdown',
position: 'left',
dropdownActiveClassDisabled: true,
},
{
href: 'https://github.com/osui-rs/osui/',
position: 'right',
html: `
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-github" viewBox="0 0 16 16">
<path d="M8 0C3.58 0 0 3.58 0 8a8 8 0 0 0 5.47 7.59c.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.22 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82a7.64 7.64 0 0 1 4.01 0c1.53-1.03 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.28.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.45.55.38A8 8 0 0 0 16 8c0-4.42-3.58-8-8-8z"/>
</svg>
`,
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Installation',
to: '/docs/',
},
],
},
{
title: 'Community',
items: [
{
label: 'Discord',
href: 'https://discordapp.com/invite/jqc9dR6kBZ',
},
{
label: 'GitHub',
href: 'https://github.com/osui-rs/osui/',
},
],
},
{
title: 'Resources',
items: [
{
label: 'Crossterm',
href: 'https://github.com/crossterm-rs/crossterm',
},
{
label: 'Rust-lang',
href: 'https://rust-lang.org/',
},
],
},
// {
// title: 'More',
// items: [
// {
// label: 'Blog',
// to: '/blog',
// },
// {
// label: 'GitHub',
// href: 'https://github.com/facebook/docusaurus',
// },
// ],
// },
],
copyright: `Copyright © ${new Date().getFullYear()} OSUI, Inc. Built with Docusaurus.`,
},
prism: {
theme: prismThemes.vsLight,
darkTheme: prismThemes.vsDark,
},
} satisfies Preset.ThemeConfig,
};
export default config;