docs: fix docusaurus styling for v3

This commit is contained in:
Meng Zhang 2024-04-26 22:34:28 -07:00
parent 5e7d40b8c6
commit 5c5867807a
3 changed files with 13 additions and 25 deletions

View File

@ -1,11 +1,10 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require('prism-react-renderer/themes/palenight');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
import {themes as prismThemes} from 'prism-react-renderer';
/** @type {import('@docusaurus/types').Config} */
const config = {
export default {
title: 'Tabby',
tagline: 'Opensource, self-hosted AI coding assistant',
favicon: 'img/favicon.ico',
@ -156,8 +155,8 @@ const config = {
copyright: `Copyright © ${new Date().getFullYear()} TabbyML, Inc.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
theme: prismThemes.palenight,
darkTheme: prismThemes.dracula,
additionalLanguages: ['toml', 'rust', 'scheme'],
},
colorMode: {
@ -208,5 +207,3 @@ const config = {
],
],
};
module.exports = config;

13
website/package.json vendored
View File

@ -17,7 +17,7 @@
"@docusaurus/core": "3.2.1",
"@docusaurus/plugin-client-redirects": "3.2.1",
"@docusaurus/preset-classic": "3.2.1",
"@mdx-js/react": "^1.6.22",
"@mdx-js/react": "^3.0.0",
"@monaco-editor/react": "^4.5.1",
"autoprefixer": "^10.4.14",
"axios": "^1.4.0",
@ -26,15 +26,16 @@
"marked": "^9.1.5",
"postcss": "^8.4.24",
"posthog-docusaurus": "^2.0.0",
"prism-react-renderer": "^1.3.5",
"prism-react-renderer": "^2.1.0",
"raw-loader": "^4.0.2",
"react": "^18",
"react-dom": "^18",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tailwindcss": "^3.3.2",
"url": "^0.11.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.2.1"
"@docusaurus/module-type-aliases": "3.2.1",
"@docusaurus/types": "3.2.1"
},
"browserslist": {
"production": [
@ -49,6 +50,6 @@
]
},
"engines": {
"node": ">=16.14"
"node": ">=18"
}
}

14
website/yarn.lock vendored
View File

@ -2714,11 +2714,6 @@
unist-util-visit "^5.0.0"
vfile "^6.0.0"
"@mdx-js/react@^1.6.22":
version "1.6.22"
resolved "https://registry.yarnpkg.com/@mdx-js/react/-/react-1.6.22.tgz#ae09b4744fddc74714ee9f9d6f17a66e77c43573"
integrity sha512-TDoPum4SHdfPiGSAaRBw7ECyI8VaHpK8GJugbJIJuqyh6kzw9ZLJZW3HGL3NNrJGxcAixUvqROm+YuQOo5eXtg==
"@mdx-js/react@^3.0.0":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@mdx-js/react/-/react-3.0.1.tgz#997a19b3a5b783d936c75ae7c47cfe62f967f746"
@ -8592,11 +8587,6 @@ pretty-time@^1.1.0:
resolved "https://registry.yarnpkg.com/pretty-time/-/pretty-time-1.1.0.tgz#ffb7429afabb8535c346a34e41873adf3d74dd0e"
integrity sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==
prism-react-renderer@^1.3.5:
version "1.3.5"
resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-1.3.5.tgz#786bb69aa6f73c32ba1ee813fbe17a0115435085"
integrity sha512-IJ+MSwBWKG+SM3b2SUfdrhC+gu01QkV2KmRQgREThBfSQRoufqRfxfHUxpG1WcaFjP+kojcFyO9Qqtpgt3qLCg==
prism-react-renderer@^2.1.0, prism-react-renderer@^2.3.0:
version "2.3.1"
resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-2.3.1.tgz#e59e5450052ede17488f6bc85de1553f584ff8d5"
@ -8793,7 +8783,7 @@ react-dev-utils@^12.0.1:
strip-ansi "^6.0.1"
text-table "^0.2.0"
react-dom@^18:
react-dom@^18.2.0:
version "18.3.1"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.3.1.tgz#c2265d79511b57d479b3dd3fdfa51536494c5cb4"
integrity sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==
@ -8904,7 +8894,7 @@ react-router@5.3.4, react-router@^5.3.4:
tiny-invariant "^1.0.2"
tiny-warning "^1.0.0"
react@^18:
react@^18.2.0:
version "18.3.1"
resolved "https://registry.yarnpkg.com/react/-/react-18.3.1.tgz#49ab892009c53933625bd16b2533fc754cab2891"
integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==