Comments (8)
其实不太想占用 src 目录
不是组件库项目的 src,是主题包的 src
from dumi-theme.
@OrekiSH 你在改的时候, tsx 有动吗?还是只修改了 less ?
不知道引入后,打包 dumi 会不会 两份?
from dumi-theme.
不好意思没看到..
emm其实主要是因为我懒,不过的确有这个问题。个人理解可以给theme-default
的layout.tsx
加个prefix的prop, 后续子组件继承该prefix @PeachScript
dumi-theme-vuepress
没动,只改了less。其他有些应该会改结构,感觉theme-default
的layout.tsx
的那些子块用render props会灵活点。css会两份一起打的 @xrkffgg
from dumi-theme.
大致是这个意思
import Layout from 'dumi-theme-default/src/layout';
import CustomNavbar from './components/CustomNavbar';
import './style/layout.less';
import './components/Navbar.less';
import './components/SearchBar.less';
import './components/SideMenu.less';
import './components/LocaleSelect.less';
import './components/SlugList.less';
import './builtins/Alert.less';
import './builtins/Badge.less';
export default function CustomLayout() {
return (
<Layout
preifx="__dumi-vuepress"
navbar-render={CustomNavbar}
/>
);
};
from dumi-theme.
理解了,类似 antd 的 ConfigProvider
,还是有些改造成本的
CSS 打两份的问题提个方案两位看下,新增主题包 src/index.less
的约定,和其他组件一样是增量覆写,这样 dumi-vuepress 一旦加载,默认主题的样式表就不会载入了
from dumi-theme.
其实不太想占用 src 目录
from dumi-theme.
我觉得可以,你们定呗theme
也可以啊
from dumi-theme.
默认主题的样式表就不会载入了
这样就是需要全量处理一遍 less ?
from dumi-theme.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dumi-theme.