diff --git a/README.md b/README.md index b378bca..a3f3571 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,8 @@ dumi-theme-lobehub is a documentation site theme package designed for `Dumi 2`. - [🀝 Contributing](#-contributing) - [πŸ”— Links](#-links) - [More Products](#more-products) + - [Design Resources](#design-resources) + - [Development Resources](#development-resources) #### @@ -192,9 +194,22 @@ Contributions of all types are more than welcome, if you are interested in contr ### More Products -- **[🍭 Lobe UI](https://github.com/lobehub/lobe-ui)** - An open-source UI component library for building AIGC web apps. -- **[πŸ€– Lobe Chat](https://github.com/lobehub/lobe-chat)** - An open-source, extensible (Function Calling), high-performance chatbot framework. It supports one-click free deployment of your private ChatGPT/LLM web application. -- **[🀯 Lobe Theme](https://github.com/lobehub/sd-webui-lobe-theme)** - The modern theme for stable diffusion webui, exquisite interface design, highly customizable UI, and efficiency boosting features. +- **[🀯 Lobe Chat](https://github.com/lobehub/lobe-chat)** - An open-source, extensible (Function Calling), high-performance chatbot framework. It supports one-click free deployment of your private ChatGPT/LLM web application. +- **[πŸ…°οΈ Lobe Theme](https://github.com/lobehub/sd-webui-lobe-theme)** - The modern theme for stable diffusion webui, exquisite interface design, highly customizable UI, and efficiency boosting features. +- **[🧸 Lobe Vidol](https://github.com/lobehub/lobe-vidol)** - Experience the magic of virtual idol creation with Lobe Vidol, enjoy the elegance of our Exquisite UI Design, dance along using MMD Dance Support, and engage in Smooth Conversations. + +### Design Resources + +- **[🍭 Lobe UI](https://ui.lobehub.com)** - An open-source UI component library for building AIGC web apps. +- **[πŸ₯¨ Lobe Icons](https://lobehub.com/icons)** - Popular AI / LLM Model Brand SVG Logo and Icon Collection. +- **[πŸ“Š Lobe Charts](https://charts.lobehub.com)** - React modern charts components built on recharts + +### Development Resources + +- **[🎀 Lobe TTS](https://tts.lobehub.com)** - A high-quality & reliable TTS/STT library for Server and Browser +- **[🌏 Lobe i18n](https://github.com/lobehub/lobe-cli-toolbox/blob/master/packages/lobe-i18n)** - Automation ai tool for the i18n (internationalization) translation process. + +[More Resources](https://lobehub.com/resources)
diff --git a/example/.dumirc.ts b/example/.dumirc.ts index 2210fdb..efcb431 100644 --- a/example/.dumirc.ts +++ b/example/.dumirc.ts @@ -1,8 +1,9 @@ import { defineConfig } from 'dumi'; import { resolve } from 'node:path'; -import { homepage, name } from '../package.json'; +import { description, homepage, name } from '../package.json'; +const isProduction = process.env.NODE_ENV === 'production'; const isWin = process.platform === 'win32'; const themeConfig = { @@ -24,10 +25,8 @@ const themeConfig = { match: ['/components'], pkg: name, sourceUrl: `{github}/tree/master/src/{atomId}/index.tsx`, - type: 'doc', }, - description: 'Lobe UI is an open-source UI component library for building chatbot web apps', - footer: 'Made with 🀯 by LobeHub', + description, giscus: { category: 'Q&A', categoryId: 'DIC_kwDOJloKoM4CXsCu', @@ -53,11 +52,13 @@ export default defineConfig({ define: { 'process.env': process.env, }, + exportStatic: {}, favicons: ['https://lobehub.com/favicon.ico'], + jsMinifier: 'swc', locales: [{ id: 'en-US', name: 'English' }], mfsu: isWin ? undefined : {}, npmClient: 'pnpm', - ssr: false, + ssr: isProduction ? {} : false, styles: [ `html, body { background: transparent; } diff --git a/package.json b/package.json index 0f34ee9..67440af 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "@commitlint/cli": "^19.6.0", "@lobehub/lint": "^1.24.4", "@types/lodash-es": "^4.17.12", - "@types/node": "^20.17.6", + "@types/node": "^20.17.7", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", "@vitest/coverage-v8": "~1.2.2", @@ -111,7 +111,7 @@ "remark-cli": "^11.0.0", "semantic-release": "^21.1.2", "stylelint": "^15.11.0", - "typescript": "^5.6.3", + "typescript": "^5.7.2", "vitest": "~1.2.2" }, "peerDependencies": { diff --git a/src/plugin/index.ts b/src/plugin/index.ts index 8dd286f..ce6741f 100644 --- a/src/plugin/index.ts +++ b/src/plugin/index.ts @@ -6,11 +6,15 @@ import { join } from 'node:path'; import { getHash } from './utils'; +/* + * SSR ζŠ½ε–ζ ·εΌ + */ const SSRPlugin = (api: IApi) => { api.describe({ - key: '@', + key: 'lobe-docs', }); + // ε¦‚ζžœζ²‘ζœ‰εΌ€ε― SSRοΌŒεˆ™ε•₯也不做 if (!api.userConfig.ssr) return; api.logger.info('detect ssr config, when building html will extract css.'); @@ -30,7 +34,6 @@ const SSRPlugin = (api: IApi) => { const addLinkStyle = (html: string, cssFile: string) => { const prefix = api.userConfig.publicPath || api.config.publicPath; - return html.replace('', ``); }; @@ -40,8 +43,9 @@ const SSRPlugin = (api: IApi) => { .filter((f) => !f.path.includes(':')) .map((file) => { - const antdCache = (global as any).__LOBE_CACHE__; + const antdCache = (global as any).__ANTD_CACHE__; + // 提取 antd-style ζ ·εΌεˆ°η‹¬η«‹ css ζ–‡δ»Ά const styles = extractStaticStyle(file.content, { antdCache }); for (const result of styles) {