From c75a9a8fc66bdb5147d0e902df85dcf70d8b6245 Mon Sep 17 00:00:00 2001 From: Carrotzpc Date: Thu, 8 Aug 2024 17:31:25 +0800 Subject: [PATCH] docs: add customPages example --- example/.dumi/pages/custom.tsx | 39 ++++++++++++++++++++++++++++++++++ example/.dumirc.ts | 9 ++++++++ example/.gitignore | 2 ++ 3 files changed, 50 insertions(+) create mode 100644 example/.dumi/pages/custom.tsx create mode 100644 example/.gitignore diff --git a/example/.dumi/pages/custom.tsx b/example/.dumi/pages/custom.tsx new file mode 100644 index 0000000..f24775d --- /dev/null +++ b/example/.dumi/pages/custom.tsx @@ -0,0 +1,39 @@ +import { Features, FeaturesProps, Snippet } from '@lobehub/ui'; +import { Palette, Smartphone, Zap } from 'lucide-react'; +import React from 'react'; +import { Center } from 'react-layout-kit'; + +const items: FeaturesProps['items'] = [ + { + description: + 'Based on antd v5, custom algorithms for light and dark themes are provided by default, offering aesthetically pleasing and user-friendly options.', + icon: Palette, + title: 'Themeable', + }, + { + description: + 'This theme package adopts modern design techniques, making the documents more intuitive, readable, and user-friendly.', + icon: Zap, + title: 'Modern', + }, + { + description: + 'Well-adapted for mobile devices. With the flexible style solution based on CSSinJS, multiple layout options are easily implemented.', + icon: Smartphone, + title: 'Mobile-Adapted', + }, +]; + +const Custom = () => { + return ( +
+
+

To install dumi-theme-yunti, run the following command:

+ {'$ pnpm add dumi dumi-theme-yunti'} +
+ +
+ ); +}; + +export default Custom; diff --git a/example/.dumirc.ts b/example/.dumirc.ts index 46a203b..10aed6f 100644 --- a/example/.dumirc.ts +++ b/example/.dumirc.ts @@ -49,6 +49,7 @@ const themeConfig = defineThemeConfig({ { title: 'Components', link: '/components/example' }, { title: '分组示例', link: '/config/base' }, { title: '折叠示例', link: '/demo/secondary-sidebar-colors' }, + { title: '自定义页面', link: '/custom', target: '_blank' }, { title: 'Changelog', link: '/changelog' }, { title: 'Yunti UI', link: 'https://yuntijs.github.io/yunti-ui/' }, ], @@ -57,6 +58,14 @@ const themeConfig = defineThemeConfig({ { title: 'Collapse Demo', link: '/demo/secondary-sidebar-colors-en' }, ], }, + customPages: [ + { + path: '/custom', + sider: false, + header: false, + footer: false, + }, + ], }); const base = isProduction && !isPreview ? '/dumi-theme-yunti/' : '/'; diff --git a/example/.gitignore b/example/.gitignore new file mode 100644 index 0000000..eb9e6fb --- /dev/null +++ b/example/.gitignore @@ -0,0 +1,2 @@ +.dumi/theme +.dumi/tmp*