mirror of
https://github.com/open-webui/docs.git
synced 2026-07-19 22:53:44 -04:00
193 lines
4.6 KiB
TypeScript
193 lines
4.6 KiB
TypeScript
import { Config } from "@docusaurus/types";
|
||
import type * as Preset from "@docusaurus/preset-classic";
|
||
|
||
import rehypeShiki, { type RehypeShikiOptions } from "@shikijs/rehype";
|
||
import { type BundledLanguage, bundledLanguages } from "shiki";
|
||
|
||
const shikiPlugin: [typeof rehypeShiki, RehypeShikiOptions] = [
|
||
rehypeShiki,
|
||
{
|
||
themes: {
|
||
light: "github-light",
|
||
dark: "github-dark",
|
||
},
|
||
defaultColor: false,
|
||
langs: Object.keys(bundledLanguages) as BundledLanguage[],
|
||
},
|
||
];
|
||
|
||
const config: Config = {
|
||
title: "Open WebUI",
|
||
titleDelimiter: "/",
|
||
tagline: "On a mission to build the best AI interface",
|
||
favicon: "images/favicon.png",
|
||
|
||
// Set the production url of your site here
|
||
url: "https://openwebui.com",
|
||
// Set the /<baseUrl>/ pathname under which your site is served
|
||
// For GitHub pages deployment, it is often '/<projectName>/'
|
||
baseUrl: "/",
|
||
|
||
// GitHub pages deployment config.
|
||
// If you aren't using GitHub pages, you don't need these.
|
||
organizationName: "open-webui", // Usually your GitHub org/user name.
|
||
projectName: "docs", // Usually your repo name.
|
||
|
||
onBrokenLinks: "throw",
|
||
|
||
// Even if you don't use internationalization, you can use this field to set
|
||
// useful metadata like html lang. For example, if your site is Chinese, you
|
||
// may want to replace "en" with "zh-Hans".
|
||
i18n: {
|
||
defaultLocale: "en",
|
||
locales: ["en"],
|
||
},
|
||
|
||
// Enable Mermaid for diagrams
|
||
markdown: {
|
||
mermaid: true,
|
||
},
|
||
themes: ["@docusaurus/theme-mermaid"],
|
||
|
||
presets: [
|
||
[
|
||
"classic",
|
||
{
|
||
gtag: {
|
||
trackingID: "G-522JSJVWTB",
|
||
anonymizeIP: false,
|
||
},
|
||
docs: {
|
||
sidebarPath: "./sidebars.ts",
|
||
routeBasePath: "/",
|
||
// Please change this to your repo.
|
||
// Remove this to remove the "edit this page" links.
|
||
editUrl: "https://github.com/open-webui/docs/blob/main",
|
||
exclude: ["**/tab-**/**", "**/_template.*"],
|
||
beforeDefaultRehypePlugins: [shikiPlugin],
|
||
},
|
||
// blog: false,
|
||
blog: {
|
||
showReadingTime: true,
|
||
onUntruncatedBlogPosts: "ignore",
|
||
// Please change this to your repo.
|
||
// Remove this to remove the "edit this page" links.
|
||
// editUrl:
|
||
// "https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/",
|
||
beforeDefaultRehypePlugins: [shikiPlugin],
|
||
},
|
||
theme: {
|
||
customCss: "./src/css/custom.css",
|
||
},
|
||
} satisfies Preset.Options,
|
||
],
|
||
],
|
||
|
||
themeConfig: {
|
||
// Replace with your project's social card
|
||
// image: "images/docusaurus-social-card.jpg",
|
||
navbar: {
|
||
title: "Open WebUI",
|
||
logo: {
|
||
src: "images/logo.png",
|
||
srcDark: "images/logo-dark.png",
|
||
},
|
||
items: [
|
||
{
|
||
href: "https://openwebui.com/blog",
|
||
label: "Blog",
|
||
position: "left",
|
||
},
|
||
{
|
||
label: "GitHub",
|
||
href: "https://github.com/open-webui/open-webui",
|
||
position: "right",
|
||
className: "header-github-link",
|
||
"aria-label": "GitHub repository",
|
||
},
|
||
{
|
||
label: "Discord",
|
||
href: "https://discord.com/invite/5rJgQTnV4s",
|
||
position: "right",
|
||
className: "header-discord-link",
|
||
"aria-label": "Discord server",
|
||
},
|
||
],
|
||
},
|
||
footer: {
|
||
style: "light",
|
||
links: [
|
||
{
|
||
title: "Docs",
|
||
items: [
|
||
{
|
||
label: "Getting Started",
|
||
to: "getting-started",
|
||
},
|
||
{
|
||
label: "FAQ",
|
||
to: "faq",
|
||
},
|
||
{
|
||
label: "Help Improve The Docs",
|
||
to: "https://github.com/open-webui/docs",
|
||
},
|
||
],
|
||
},
|
||
{
|
||
title: "Community",
|
||
items: [
|
||
{
|
||
label: "GitHub",
|
||
href: "https://github.com/open-webui/open-webui",
|
||
},
|
||
{
|
||
label: "Discord",
|
||
href: "https://discord.gg/5rJgQTnV4s",
|
||
},
|
||
{
|
||
label: "Reddit",
|
||
href: "https://www.reddit.com/r/OpenWebUI/",
|
||
},
|
||
{
|
||
label: "𝕏",
|
||
href: "https://x.com/OpenWebUI",
|
||
},
|
||
],
|
||
},
|
||
{
|
||
title: "More",
|
||
items: [
|
||
{
|
||
label: "Release Notes",
|
||
to: "https://github.com/open-webui/open-webui/blob/main/CHANGELOG.md",
|
||
},
|
||
{
|
||
label: "About",
|
||
to: "https://openwebui.com",
|
||
},
|
||
{
|
||
label: "Report a Vulnerability / Responsible Disclosure",
|
||
to: "https://github.com/open-webui/open-webui/security",
|
||
},
|
||
],
|
||
},
|
||
],
|
||
// copyright: `Copyright © ${new Date().getFullYear()} OpenWebUI`,
|
||
},
|
||
prism: {
|
||
theme: {
|
||
plain: { color: "#333", backgroundColor: "#f3f3f3" },
|
||
styles: [],
|
||
},
|
||
darkTheme: {
|
||
plain: { color: "#ccc", backgroundColor: "#1a1a1a" },
|
||
styles: [],
|
||
},
|
||
},
|
||
} satisfies Preset.ThemeConfig,
|
||
plugins: [require.resolve("docusaurus-lunr-search")],
|
||
};
|
||
|
||
export default config;
|