@@ -3,6 +3,21 @@ const fs = require('fs')
3
3
const path = require ( 'path' )
4
4
5
5
const autoprefixer = require ( 'autoprefixer' )
6
+ const customMedia = require ( 'postcss-custom-media' )
7
+ const customProperties = require ( 'postcss-custom-properties' )
8
+ const mixins = require ( 'postcss-mixins' )
9
+ const colorMod = require ( 'postcss-color-mod-function' )
10
+
11
+ const mediaConfig = require ( './config/postcss/media' )
12
+ const mixinsConfig = require ( './config/postcss/mixins' )
13
+
14
+ const defaultCssBase = path . join (
15
+ __dirname ,
16
+ 'src' ,
17
+ 'components' ,
18
+ 'Page' ,
19
+ 'base.css'
20
+ )
6
21
7
22
const customYoutubeTransformer = require ( './config/gatsby-remark-embedder/custom-yt-embedder' )
8
23
@@ -16,20 +31,26 @@ require('./config/prismjs/dvctable')
16
31
17
32
const imageMaxWidth = 700
18
33
19
- const defaults = require ( './config-defaults' )
20
-
21
34
module . exports = ( {
22
35
simpleLinkerTerms,
36
+ cssBase = defaultCssBase ,
37
+ customMediaConfig = { importFrom : [ mediaConfig ] } ,
38
+ customPropertiesConfig = {
39
+ importFrom : [ cssBase ] ,
40
+ disableDeprecationNotice : true
41
+ } ,
42
+ colorModConfig = {
43
+ importFrom : [ cssBase ]
44
+ } ,
23
45
postCssPlugins = [
24
46
require ( 'tailwindcss/nesting' ) ( require ( 'postcss-nested' ) ) ,
47
+ customMedia ( customMediaConfig ) ,
48
+ mixins ( mixinsConfig ) ,
49
+ customProperties ( customPropertiesConfig ) ,
50
+ colorMod ( colorModConfig ) ,
25
51
autoprefixer ,
26
52
require ( 'tailwindcss' )
27
- ] ,
28
- docsInstanceName = defaults . docsInstanceName ,
29
- docsPath = defaults . docsPath ,
30
- glossaryInstanceName = defaults . glossaryInstanceName ,
31
- glossaryPath = defaults . glossaryPath ,
32
- argsLinkerPath = defaults . argsLinkerPath
53
+ ]
33
54
} ) => ( {
34
55
plugins : [
35
56
{
@@ -47,18 +68,11 @@ module.exports = ({
47
68
} ,
48
69
'gatsby-plugin-react-helmet' ,
49
70
'gatsby-plugin-sitemap' ,
50
- glossaryInstanceName && {
51
- resolve : 'gatsby-source-filesystem' ,
52
- options : {
53
- name : glossaryInstanceName ,
54
- path : glossaryPath
55
- }
56
- } ,
57
- docsInstanceName && {
71
+ {
58
72
resolve : 'gatsby-source-filesystem' ,
59
73
options : {
60
- name : docsInstanceName ,
61
- path : docsPath
74
+ name : 'content' ,
75
+ path : path . resolve ( 'content' )
62
76
}
63
77
} ,
64
78
'gatsby-plugin-image' ,
@@ -83,7 +97,11 @@ module.exports = ({
83
97
options : {
84
98
icon : linkIcon ,
85
99
// Pathname can also be array of paths. eg: ['docs/command-reference;', 'docs/api']
86
- pathname : argsLinkerPath
100
+ pathname : [
101
+ 'docs/command-reference' ,
102
+ `docs/ref` ,
103
+ 'docs/cli-reference'
104
+ ]
87
105
}
88
106
} ,
89
107
{
@@ -151,10 +169,10 @@ module.exports = ({
151
169
}
152
170
}
153
171
}
154
- ] . filter ( Boolean ) ,
172
+ ] ,
155
173
siteMetadata : {
156
174
author : 'Iterative' ,
157
- siteUrl : 'https://example.com ' ,
175
+ siteUrl : 'https://cml.dev ' ,
158
176
titleTemplate : ''
159
177
}
160
178
} )
0 commit comments