Skip to content

Commit

Permalink
✨ feat: update demo
Browse files Browse the repository at this point in the history
  • Loading branch information
eternallycyf committed Dec 26, 2023
1 parent 390a5bb commit cf2cda7
Show file tree
Hide file tree
Showing 10 changed files with 120 additions and 159 deletions.
7 changes: 6 additions & 1 deletion .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { defineConfig } from 'dumi';
import type { SiteThemeConfig } from 'dumi-theme-antd-style';
import path from 'path';
import { featuresZh } from './config/features';
import { footer } from './config/footer';
import style from './docs/siteIndexStyle';
import { homepage, name as repo } from './package.json';

Expand Down Expand Up @@ -51,7 +52,11 @@ const themeConfig: SiteThemeConfig = {
pkg: '@ims-view/bar',
match: ['/bars'],
},
footer: 'Made with ❤️ by eternallycyf - AFX & 数字科技',
footerConfig: {
bottom: '2023',
copyright: 'Made with ❤️ by eternallycyf - AFX & 数字科技',
columns: footer,
},
};

export default defineConfig({
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

一个 monorepo 的仓库模板

node 版本 v18.13.0

[![Gitmoji][gitmoji]][gitmoji-url] [![semantic-release][semantic-release]][semantic-release-repo]

[![ docs by dumi][dumi-url]](https://d.umijs.org/) [![Build With father][father-url]](https://github.com/umijs/father/) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)][lerna-url] [![typedoc](https://img.shields.io/badge/API%20by-typedoc-9600ff.svg)](https://typedoc.org/)
Expand Down
152 changes: 29 additions & 123 deletions config/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,86 +10,36 @@ import React from 'react';

export const footer = [
{
title: '相关资源',
title: '相关依赖',
items: [
{
title: 'Ant Design Pro',
url: 'https://pro.ant.design',
title: 'ims-view-pc',
url: 'https://ims-view.site/components',
openExternal: true,
},
{
title: 'Ant Design Pro Components',
url: 'https://procomponents.ant.design',
title: '@ims-view/hooks',
url: 'https://ims-view.site/hooks',
openExternal: true,
},
{
title: 'Umi',
description: 'React 应用开发框架',
url: 'https://umijs.org',
title: '@ims-view/utils',
url: 'https://ims-view.site/utils',
openExternal: true,
},
{
title: 'Dumi',
description: '组件/文档研发工具',
url: 'https://d.umijs.org',
title: '@ims-view/chart',
url: 'https://ims-view.site/charts',
openExternal: true,
},
{
title: 'qiankun',
description: '微前端框架',
url: 'https://qiankun.umijs.org',
openExternal: true,
},
],
},
{
title: '社区',
items: [
{
icon: <MediumOutlined />,
title: 'Medium',
url: 'http://medium.com/ant-design/',
openExternal: true,
},
{
icon: <TwitterOutlined style={{ color: '#1DA1F2' }} />,
title: 'Twitter',
url: 'http://twitter.com/antdesignui',
openExternal: true,
},
{
icon: (
<img
src="https://gw.alipayobjects.com/zos/rmsportal/XuVpGqBFxXplzvLjJBZB.svg"
alt="yuque"
/>
),
title: 'Ant Design 语雀专栏',
url: 'https://yuque.com/ant-design/ant-design',
openExternal: true,
},
{
icon: <ZhihuOutlined style={{ color: '#056de8' }} />,
title: 'Ant Design 知乎专栏',
url: 'https://www.zhihu.com/column/c_1564262000561106944',
openExternal: true,
},
{
icon: <ZhihuOutlined style={{ color: '#056de8' }} />,
title: '体验科技专栏',
url: 'http://zhuanlan.zhihu.com/xtech',
title: 'ims-graph',
url: 'https://ims-graph.vercel.app/components/graph-chart',
openExternal: true,
},
{
icon: (
<img
src="https://gw.alipayobjects.com/zos/rmsportal/mZBWtboYbnMkTBaRIuWQ.png"
alt="seeconf"
/>
),
title: 'SEE Conf',
description: 'SEE Conf-蚂蚁体验科技大会',
url: 'https://seeconf.antfin.com/',
title: 'ims-IndexedDB',
url: 'https://ims-indexed-db.vercel.app/components/create-indexed-db-helper',
openExternal: true,
},
],
Expand All @@ -98,87 +48,43 @@ export const footer = [
title: '帮助',
items: [
{
icon: <GithubOutlined />,
title: 'GitHub',
url: 'https://github.com/ant-design/antd-style',
url: 'https://github.com/eternallycyf/ims-view-pc',
openExternal: true,
},
{
icon: <HistoryOutlined />,
title: '更新日志',
url: '/changelog',
// LinkComponent: Link,
url: '/changelog/ims-view-pc',
},

{
icon: <IssuesCloseOutlined />,
title: '讨论',
url: 'https://github.com/ant-design/antd-style/issues',
url: 'https://github.com/eternallycyf/ims-view-pc/issues',
openExternal: true,
},
],
},
{
icon: (
<img
src="https://gw.alipayobjects.com/zos/rmsportal/nBVXkrFdWHxbZlmMbsaH.svg"
alt="more products"
/>
),
title: '更多产品',
title: '模板',
items: [
{
icon: (
<img
src="https://gw.alipayobjects.com/zos/rmsportal/XuVpGqBFxXplzvLjJBZB.svg"
alt="yuque"
/>
),
title: '语雀',
url: 'https://yuque.com',
description: '知识创作与分享工具',
openExternal: true,
},
{
icon: (
<img
src="https://gw.alipayobjects.com/zos/antfincdn/nc7Fc0XBg5/8a6844f5-a6ed-4630-9177-4fa5d0b7dd47.png"
alt="AntV"
/>
),
title: 'AntV',
url: 'https://antv.vision',
description: '数据可视化解决方案',
title: 'ims-monorepo-template',
description: 'monorepo模板',
url: 'https://github.com/eternallycyf/ims-monorepo-template',
openExternal: true,
},
{
icon: <img src="https://www.eggjs.org/logo.svg" alt="Egg" />,
title: 'Egg',
url: 'https://eggjs.org',
description: '企业级 Node.js 框架',
openExternal: true,
},
{
icon: (
<img
src="https://gw.alipayobjects.com/zos/rmsportal/DMDOlAUhmktLyEODCMBR.ico"
alt="kitchen"
/>
),
title: 'Kitchen',
description: 'Sketch 工具集',
url: 'https://kitchen.alipay.com',
title: 'ims-template',
url: 'https://github.com/eternallycyf/ims-template',
openExternal: true,
},
],
},
{
title: '更多',
items: [
{
icon: (
<img
src="https://gw.alipayobjects.com/zos/rmsportal/nBVXkrFdWHxbZlmMbsaH.svg"
alt="xtech"
/>
),
title: '蚂蚁体验科技',
url: 'https://xtech.antfin.com/',
title: 'lrxc-cli',
url: 'https://github.com/eternallycyf/lrxc-cli',
openExternal: true,
},
],
Expand Down
5 changes: 3 additions & 2 deletions docs/changelog/bar.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
title: bar更新日志
title: bar
nav:
title: 更新日志
title: changelog
order: 999
tocDepth: 2
---

<embed src="../../packages/bar/CHANGELOG.md"></embed>
5 changes: 3 additions & 2 deletions docs/changelog/foo.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
title: foo更新日志
title: foo
nav:
title: 更新日志
title: changelog
order: 999
tocDepth: 2
---

<embed src="../../packages/foo/CHANGELOG.md"></embed>
44 changes: 35 additions & 9 deletions docs/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,19 @@ nvm install v18.18.0
nvm use v18.18.0
:::

## Step4. 搭建 Vercel
## Step4. 更换一些信息

- 更换步骤

- 全局搜索 `ims-monorepo-template` 替换为 自己的仓库名称
- 全局搜索 `@ims-view` 替换为 自己的 npm 组织名称
- 全局搜索 `eternallycyf` 替换为 自己的 github 名称
- 在 config/features.ts 及 config/footer.tsx 设置自己的首页信息及页脚信息
- 更新 `./packages/bar/package.json``./packages/foo/package.json` 中的 `version``0.0.1`

- [一个修改的 commit 差异记录](https://github.com/eternallycyf/ims-view-pc/commit/553ffc27d4cfffb580ec288b1b3d53f32fbd959e)

## Step5. 搭建 Vercel

- 登录 [Vercel](https://vercel.com)
- 新建项目
Expand All @@ -59,17 +71,31 @@ nvm use v18.18.0

- 点击 `deploy`

## Step5. 发一个 npm 包试试
:::info{title='Vercel 发布的网站 默认已被墙 需要梯子'}
如果需要国内访问 Vercel

1. `Vercel` 需要在 项目配置中 定制自己域名 `Domains` => `xxx.com`
2. 在域名提供商 阿里云 腾讯云等配置 域名 解析

- www CNAME cname-china.vercel-dns.com.
- @ A 76.223.126.88

3. 在域名提供商 阿里云 腾讯云等配置 dns 解析(设置为 cloudflare 的)

- lila.ns.cloudflare.com
- drake.ns.cloudflare.com

4.[cloudflare](https://dash.cloudflare.com/login) 配置免费 cdn

- A xxx.com 76.223.126.88 已代理 自动
- CNAME www cname-china.vercel-dns.com 已代理 自动
:::

- 全局替换
## Step6. 发一个 npm 包试试

- `ims-template` => 你的 `npm` 包名
- `eternallycyf` => 你的 `github` 名称
- 更换 package.json => version => 1.0.0
- `git commit --allow-empty -m "✨ feat: npm publish"`
- yarn changelog(更新变更历史)
- `git commit --allow-empty -m "✨ feat: npm publish"`

:::info{title='以这些 git commit message 开头的会自动发包 构建生产'}
:::info{title='以这些 git commit message 开头的会自动发包 构建生产 具体可参考./.changelogrc.js'}
✨ feat: xxx
🐛 fix: xxx
:::
Loading

0 comments on commit cf2cda7

Please sign in to comment.