docs: uprade docs website to v3.3.2
This commit is contained in:
parent
9a0a1eacb6
commit
eacf7fc56f
6757
pnpm-lock.yaml
6757
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
@ -1,182 +0,0 @@
|
||||
// @ts-check
|
||||
// Note: type annotations allow type checking and IDEs autocompletion
|
||||
|
||||
const lightCodeTheme = require('prism-react-renderer/themes/github');
|
||||
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
|
||||
|
||||
/** @type {import('@docusaurus/types').Config} */
|
||||
const config = {
|
||||
title: 'Tianji',
|
||||
tagline: 'All-in-One Insight Hub. Tianji = Website Analytics + Uptime Monitor + Server Status',
|
||||
favicon: 'img/favicon.ico',
|
||||
|
||||
// Set the production url of your site here
|
||||
url: 'https://tianji.msgbyte.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: 'msgbyte', // Usually your GitHub org/user name.
|
||||
projectName: 'tianji', // Usually your repo name.
|
||||
|
||||
onBrokenLinks: 'throw',
|
||||
onBrokenMarkdownLinks: 'warn',
|
||||
|
||||
// Even if you don't use internalization, 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'],
|
||||
},
|
||||
|
||||
presets: [
|
||||
[
|
||||
'docusaurus-preset-openapi',
|
||||
/** @type {import('docusaurus-preset-openapi').Options} */
|
||||
{
|
||||
api: {
|
||||
path: './openapi.json',
|
||||
routeBasePath: '/api',
|
||||
},
|
||||
docs: {
|
||||
sidebarPath: require.resolve('./sidebars.js'),
|
||||
routeBasePath: '/docs',
|
||||
editUrl: 'https://github.com/msgbyte/tianji/tree/main/website/',
|
||||
},
|
||||
theme: {
|
||||
customCss: [
|
||||
require.resolve('./src/css/base.css'),
|
||||
require.resolve('./src/css/custom.css'),
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
|
||||
plugins: [require.resolve('docusaurus-plugin-image-zoom')],
|
||||
|
||||
themeConfig:
|
||||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
||||
({
|
||||
// Replace with your project's social card
|
||||
image: 'img/social-card.png',
|
||||
metadata: [
|
||||
{
|
||||
name: 'keywords',
|
||||
content:
|
||||
'opensource, free, tianji, umami, uptime, kuma, website, analysis, monitor, serverstatus, status page, docker',
|
||||
},
|
||||
{ name: 'twitter:card', content: 'summary_large_image' },
|
||||
],
|
||||
navbar: {
|
||||
title: 'Tianji',
|
||||
logo: {
|
||||
alt: 'Tianji Logo',
|
||||
src: 'img/logo.svg',
|
||||
},
|
||||
items: [
|
||||
{
|
||||
type: 'docSidebar',
|
||||
sidebarId: 'tutorialSidebar',
|
||||
position: 'left',
|
||||
label: 'Docs',
|
||||
},
|
||||
{ to: '/pricing', label: 'Pricing', position: 'left' },
|
||||
{ to: '/changelog', label: 'Changelog', position: 'left' },
|
||||
{ to: '/api', label: 'API', position: 'left' },
|
||||
{
|
||||
href: 'https://demo.tianji.msgbyte.com/',
|
||||
label: 'Demo',
|
||||
position: 'right',
|
||||
},
|
||||
{
|
||||
href: 'https://discord.gg/8Vv47wAEej',
|
||||
label: 'Discord',
|
||||
position: 'right',
|
||||
},
|
||||
{
|
||||
href: 'https://github.com/msgbyte/tianji',
|
||||
label: 'GitHub',
|
||||
position: 'right',
|
||||
},
|
||||
],
|
||||
},
|
||||
footer: {
|
||||
style: 'dark',
|
||||
links: [
|
||||
{
|
||||
title: 'Docs',
|
||||
items: [
|
||||
{
|
||||
label: 'Tutorial',
|
||||
to: '/docs/intro',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'Community',
|
||||
items: [
|
||||
{
|
||||
label: 'Stack Overflow',
|
||||
href: 'https://stackoverflow.com/questions/tagged/tianji',
|
||||
},
|
||||
{
|
||||
label: 'Discord',
|
||||
href: 'https://discord.gg/8Vv47wAEej',
|
||||
},
|
||||
{
|
||||
label: 'Twitter',
|
||||
href: 'https://twitter.com/moonrailgun',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'More',
|
||||
items: [
|
||||
{
|
||||
label: 'Changelog',
|
||||
to: '/changelog',
|
||||
},
|
||||
{
|
||||
label: 'API',
|
||||
to: '/api',
|
||||
},
|
||||
{
|
||||
label: 'GitHub',
|
||||
href: 'https://github.com/msgbyte/tianji',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
copyright: `Copyright © ${new Date().getFullYear()} Tianji, Inc. Built with Msgbyte.`,
|
||||
},
|
||||
prism: {
|
||||
theme: lightCodeTheme,
|
||||
darkTheme: darkCodeTheme,
|
||||
},
|
||||
zoom: {
|
||||
selector: '.markdown :not(em) > img',
|
||||
background: {
|
||||
light: 'rgb(255, 255, 255)',
|
||||
dark: 'rgb(50, 50, 50)',
|
||||
},
|
||||
config: {
|
||||
// options you can specify via https://github.com/francoischalifour/medium-zoom#usage
|
||||
},
|
||||
},
|
||||
}),
|
||||
|
||||
scripts: [
|
||||
{
|
||||
src: 'https://tianji.moonrailgun.com/tracker.js',
|
||||
async: true,
|
||||
defer: true,
|
||||
'data-website-id': 'clopxgjr6050tqn5dzxo7pjac',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
module.exports = config;
|
185
website/docusaurus.config.ts
Normal file
185
website/docusaurus.config.ts
Normal file
@ -0,0 +1,185 @@
|
||||
// @ts-check
|
||||
// Note: type annotations allow type checking and IDEs autocompletion
|
||||
|
||||
import type { Config } from '@docusaurus/types';
|
||||
import type * as Preset from '@docusaurus/preset-classic';
|
||||
import { themes } from 'prism-react-renderer';
|
||||
|
||||
const lightTheme = themes.github;
|
||||
const darkTheme = themes.dracula;
|
||||
|
||||
/** @type {import('@docusaurus/types').Config} */
|
||||
const config: Config = {
|
||||
title: 'Tianji',
|
||||
tagline:
|
||||
'All-in-One Insight Hub. Tianji = Website Analytics + Uptime Monitor + Server Status',
|
||||
favicon: 'img/favicon.ico',
|
||||
|
||||
// Set the production url of your site here
|
||||
url: 'https://tianji.msgbyte.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: 'msgbyte', // Usually your GitHub org/user name.
|
||||
projectName: 'tianji', // Usually your repo name.
|
||||
|
||||
onBrokenLinks: 'throw',
|
||||
onBrokenMarkdownLinks: 'warn',
|
||||
|
||||
// Even if you don't use internalization, 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'],
|
||||
},
|
||||
|
||||
presets: [
|
||||
[
|
||||
'docusaurus-preset-openapi',
|
||||
/** @type {import('docusaurus-preset-openapi').Options} */
|
||||
{
|
||||
api: {
|
||||
path: './openapi.json',
|
||||
routeBasePath: '/api',
|
||||
},
|
||||
docs: {
|
||||
sidebarPath: require.resolve('./sidebars.js'),
|
||||
routeBasePath: '/docs',
|
||||
editUrl: 'https://github.com/msgbyte/tianji/tree/main/website/',
|
||||
},
|
||||
theme: {
|
||||
customCss: [
|
||||
require.resolve('./src/css/base.css'),
|
||||
require.resolve('./src/css/custom.css'),
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
|
||||
plugins: [require.resolve('docusaurus-plugin-image-zoom')],
|
||||
|
||||
themeConfig: {
|
||||
// Replace with your project's social card
|
||||
image: 'img/social-card.png',
|
||||
metadata: [
|
||||
{
|
||||
name: 'keywords',
|
||||
content:
|
||||
'opensource, free, tianji, umami, uptime, kuma, website, analysis, monitor, serverstatus, status page, docker',
|
||||
},
|
||||
{ name: 'twitter:card', content: 'summary_large_image' },
|
||||
],
|
||||
navbar: {
|
||||
title: 'Tianji',
|
||||
logo: {
|
||||
alt: 'Tianji Logo',
|
||||
src: 'img/logo.svg',
|
||||
},
|
||||
items: [
|
||||
{
|
||||
type: 'docSidebar',
|
||||
sidebarId: 'tutorialSidebar',
|
||||
position: 'left',
|
||||
label: 'Docs',
|
||||
},
|
||||
{ to: '/pricing', label: 'Pricing', position: 'left' },
|
||||
{ to: '/changelog', label: 'Changelog', position: 'left' },
|
||||
{ to: '/api', label: 'API', position: 'left' },
|
||||
{
|
||||
href: 'https://demo.tianji.msgbyte.com/',
|
||||
label: 'Demo',
|
||||
position: 'right',
|
||||
},
|
||||
{
|
||||
href: 'https://discord.gg/8Vv47wAEej',
|
||||
label: 'Discord',
|
||||
position: 'right',
|
||||
},
|
||||
{
|
||||
href: 'https://github.com/msgbyte/tianji',
|
||||
label: 'GitHub',
|
||||
position: 'right',
|
||||
},
|
||||
],
|
||||
},
|
||||
footer: {
|
||||
style: 'dark',
|
||||
links: [
|
||||
{
|
||||
title: 'Docs',
|
||||
items: [
|
||||
{
|
||||
label: 'Tutorial',
|
||||
to: '/docs/intro',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'Community',
|
||||
items: [
|
||||
{
|
||||
label: 'Stack Overflow',
|
||||
href: 'https://stackoverflow.com/questions/tagged/tianji',
|
||||
},
|
||||
{
|
||||
label: 'Discord',
|
||||
href: 'https://discord.gg/8Vv47wAEej',
|
||||
},
|
||||
{
|
||||
label: 'Twitter',
|
||||
href: 'https://twitter.com/moonrailgun',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'More',
|
||||
items: [
|
||||
{
|
||||
label: 'Changelog',
|
||||
to: '/changelog',
|
||||
},
|
||||
{
|
||||
label: 'API',
|
||||
to: '/api',
|
||||
},
|
||||
{
|
||||
label: 'GitHub',
|
||||
href: 'https://github.com/msgbyte/tianji',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
copyright: `Copyright © ${new Date().getFullYear()} Tianji, Inc. Built with Msgbyte.`,
|
||||
},
|
||||
prism: {
|
||||
theme: lightTheme,
|
||||
darkTheme: darkTheme,
|
||||
},
|
||||
zoom: {
|
||||
selector: '.markdown :not(em) > img',
|
||||
background: {
|
||||
light: 'rgb(255, 255, 255)',
|
||||
dark: 'rgb(50, 50, 50)',
|
||||
},
|
||||
config: {
|
||||
// options you can specify via https://github.com/francoischalifour/medium-zoom#usage
|
||||
},
|
||||
},
|
||||
} satisfies Preset.ThemeConfig,
|
||||
|
||||
scripts: [
|
||||
{
|
||||
src: 'https://tianji.moonrailgun.com/tracker.js',
|
||||
async: true,
|
||||
defer: true,
|
||||
'data-website-id': 'clopxgjr6050tqn5dzxo7pjac',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
module.exports = config;
|
@ -15,15 +15,15 @@
|
||||
"typecheck": "tsc"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "2.4.3",
|
||||
"@docusaurus/preset-classic": "2.4.3",
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"@docusaurus/core": "3.3.2",
|
||||
"@docusaurus/preset-classic": "3.3.2",
|
||||
"@mdx-js/react": "^3.0.0",
|
||||
"antd": "^5.12.5",
|
||||
"clsx": "^1.2.1",
|
||||
"docusaurus-preset-openapi": "^0.6.4",
|
||||
"prism-react-renderer": "^1.3.5",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"docusaurus-preset-openapi": "^0.7.5",
|
||||
"prism-react-renderer": "^2.1.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-icons": "^4.12.0",
|
||||
"react-responsive-carousel": "^3.2.23",
|
||||
"react-slick": "^0.29.0",
|
||||
@ -31,8 +31,9 @@
|
||||
"tianji-client-sdk": "workspace:^"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@docusaurus/module-type-aliases": "2.4.3",
|
||||
"@tsconfig/docusaurus": "^1.0.5",
|
||||
"@docusaurus/module-type-aliases": "3.3.2",
|
||||
"@docusaurus/types": "3.3.2",
|
||||
"@docusaurus/tsconfig": "3.3.2",
|
||||
"@types/react": "^18.2.22",
|
||||
"@types/react-slick": "^0.23.11",
|
||||
"@types/react-vertical-timeline-component": "^3.3.6",
|
||||
@ -42,7 +43,7 @@
|
||||
"slick-carousel": "^1.8.1",
|
||||
"tailwindcss": "^3.3.5",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "^4.7.4",
|
||||
"typescript": "~5.2.2",
|
||||
"url": "^0.11.3"
|
||||
},
|
||||
"browserslist": {
|
||||
@ -58,6 +59,6 @@
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
// This file is not used in compilation. It is here just for a nice editor experience.
|
||||
"extends": "@tsconfig/docusaurus/tsconfig.json",
|
||||
"extends": "@docusaurus/tsconfig",
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"strict": false,
|
||||
|
Loading…
Reference in New Issue
Block a user