dumi-theme-apps
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

dumi-theme-apps

NPM version NPM downloads

A theme package for the dumi framework.

Usage

Install this theme into devDependencies:

$ npm i dumi-theme-apps -D

Configure it in dumi config file .dumirc.ts:

import { defineConfig } from 'dumi';

export defineConfig({
  themeConfig: {
    // docs 下的第一层 相当于一个应用
    nav: [
      {
        link: '/webgl',
        title: 'webgl',
      },
      {
        link: '/three',
        title: 'three',
      },
    ],
    // 左上角副标题
    subName: 'xxx',
    // 首页背景图
    bgImageUrl: '',
    // 首页背景图模糊图
    bgImageUrlSmall: ''
  },
});

That's all, now you can execute dumi dev and enjoy this theme.

Options

themeConfig

1.nav 2.subName

Development

$ yarn install

After the dependencies are installed, a symlink from example/.dumi/theme to ../../src will be created automatically, the symlink makes dumi load our theme package as a local theme, so we can start the example directly, HMR is also available:

# switch to example directory
$ cd example

# start dev server to preview
npm run dev

Note: all Node.js-runtime files should be put into src/plugin directory, father-plugin-dumi-theme will transform them to CommonJS dist automatically.

dumi theme development documentation: https://d.umijs.org/theme

Readme

Keywords

Package Sidebar

Install

npm i dumi-theme-apps

Weekly Downloads

1

Version

0.0.5

License

MIT

Unpacked Size

31.4 kB

Total Files

27

Last publish

Collaborators

  • wujunfeng