Skip to content

Commit

Permalink
feat: disable ssr and add base url
Browse files Browse the repository at this point in the history
  • Loading branch information
mortalYoung committed Dec 12, 2022
1 parent 93745da commit 89cc4ce
Show file tree
Hide file tree
Showing 5 changed files with 165 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .dumi/pages/index/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import { Link } from 'dumi';
import { Button } from 'antd';
import { GithubOutlined } from '@ant-design/icons';
import './index.scss';
Expand All @@ -13,9 +14,9 @@ export default function Homepage() {
</div>
<div className="dtc-homepage-description">一个基于 ant design 的组件库</div>
<div className="dtc-homepage-btnGroups">
<Button type="primary" href="/guide">
<Link className="ant-btn" to="/guide">
Quick Start
</Button>
</Link>
<Button
icon={<GithubOutlined />}
href="https://github.com/DTStack/dt-react-component"
Expand Down
6 changes: 6 additions & 0 deletions .dumi/theme/layouts/DocLayout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ body {
.ant-tooltip {
font-size: 18px;
}

@media only screen and (min-width: 767px) {
.dumi-default-doc-layout > main {
padding: 0;
}
}
4 changes: 3 additions & 1 deletion .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ export default defineConfig({
themeConfig: {
name: 'dt-react-component',
},
ssr: process.env.NODE_ENV === 'production' ? {} : false,
// TODO 先关闭,后面再看
base: 'dt-react-component',
ssr: false,
logo: 'http://assets.dtstack.com/UEDLanding/Home/logo.png',
favicons: ['http://assets.dtstack.com/UEDLanding/Home/logo.png'],
links: [
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "dt-react-component",
"version": "0.0.1",
"version": "4.0.0",
"description": "react-component",
"repository": "https://github.com/DTStack/dt-react-component",
"module": "esm/index.js",
"types": "esm/index.d.ts",
"scripts": {
Expand All @@ -16,7 +17,8 @@
"lint": "npm run lint:es && npm run lint:css",
"lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
"lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
"prepublishOnly": "father doctor && npm run build"
"prepublishOnly": "father doctor && npm run build",
"deploy": "gh-pages -d docs-dist"
},
"authors": [
"dtinsight UED"
Expand Down Expand Up @@ -72,6 +74,7 @@
"eslint": "^8.23.0",
"father": "^4.1.0",
"fetch-jsonp": "^1.2.3",
"gh-pages": "^4.0.0",
"husky": "^8.0.1",
"jest": "^29.3.1",
"jest-environment-jsdom": "^29.3.1",
Expand Down
148 changes: 148 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 89cc4ce

Please sign in to comment.