File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
docs/default-theme-config Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -476,6 +476,7 @@ $textColor = red
476
476
477
477
``` stylus
478
478
// .vuepress/style.styl, your extra styles.
479
+ // variables from config.styl can be used here
479
480
#my-style {}
480
481
```
481
482
Original file line number Diff line number Diff line change @@ -28,9 +28,10 @@ module.exports = async function prepare (sourceDir) {
28
28
const hasUserOverride = fs . existsSync ( overridePath )
29
29
await writeTemp ( 'override.styl' , hasUserOverride ? `@import(${ JSON . stringify ( overridePath ) } )` : `` )
30
30
31
+ const configPath = require . resolve ( '../default-theme/styles/config.styl' )
31
32
const stylePath = path . resolve ( sourceDir , '.vuepress/style.styl' ) . replace ( / [ \\ ] + / g, '/' )
32
33
const hasUserStyle = fs . existsSync ( stylePath )
33
- await writeTemp ( 'style.styl' , hasUserStyle ? `@import(${ JSON . stringify ( stylePath ) } )` : `` )
34
+ await writeTemp ( 'style.styl' , hasUserStyle ? `@import(${ JSON . stringify ( configPath ) } )\n@import( ${ JSON . stringify ( stylePath ) } )` : `` )
34
35
35
36
// Temporary tip, will be removed at next release.
36
37
if ( hasUserOverride && ! hasUserStyle ) {
You can’t perform that action at this time.
0 commit comments