@@ -3,6 +3,21 @@ const fs = require('fs')
33const path = require ( 'path' )
44
55const 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+ )
621
722const customYoutubeTransformer = require ( './config/gatsby-remark-embedder/custom-yt-embedder' )
823
@@ -16,20 +31,26 @@ require('./config/prismjs/dvctable')
1631
1732const imageMaxWidth = 700
1833
19- const defaults = require ( './config-defaults' )
20-
2134module . exports = ( {
2235 simpleLinkerTerms,
36+ cssBase = defaultCssBase ,
37+ customMediaConfig = { importFrom : [ mediaConfig ] } ,
38+ customPropertiesConfig = {
39+ importFrom : [ cssBase ] ,
40+ disableDeprecationNotice : true
41+ } ,
42+ colorModConfig = {
43+ importFrom : [ cssBase ]
44+ } ,
2345 postCssPlugins = [
2446 require ( 'tailwindcss/nesting' ) ( require ( 'postcss-nested' ) ) ,
47+ customMedia ( customMediaConfig ) ,
48+ mixins ( mixinsConfig ) ,
49+ customProperties ( customPropertiesConfig ) ,
50+ colorMod ( colorModConfig ) ,
2551 autoprefixer ,
2652 require ( 'tailwindcss' )
27- ] ,
28- docsInstanceName = defaults . docsInstanceName ,
29- docsPath = defaults . docsPath ,
30- glossaryInstanceName = defaults . glossaryInstanceName ,
31- glossaryPath = defaults . glossaryPath ,
32- argsLinkerPath = defaults . argsLinkerPath
53+ ]
3354} ) => ( {
3455 plugins : [
3556 {
@@ -47,18 +68,11 @@ module.exports = ({
4768 } ,
4869 'gatsby-plugin-react-helmet' ,
4970 'gatsby-plugin-sitemap' ,
50- glossaryInstanceName && {
51- resolve : 'gatsby-source-filesystem' ,
52- options : {
53- name : glossaryInstanceName ,
54- path : glossaryPath
55- }
56- } ,
57- docsInstanceName && {
71+ {
5872 resolve : 'gatsby-source-filesystem' ,
5973 options : {
60- name : docsInstanceName ,
61- path : docsPath
74+ name : 'content' ,
75+ path : path . resolve ( 'content' )
6276 }
6377 } ,
6478 'gatsby-plugin-image' ,
@@ -83,7 +97,11 @@ module.exports = ({
8397 options : {
8498 icon : linkIcon ,
8599 // 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+ ]
87105 }
88106 } ,
89107 {
@@ -151,10 +169,10 @@ module.exports = ({
151169 }
152170 }
153171 }
154- ] . filter ( Boolean ) ,
172+ ] ,
155173 siteMetadata : {
156174 author : 'Iterative' ,
157- siteUrl : 'https://example.com ' ,
175+ siteUrl : 'https://cml.dev ' ,
158176 titleTemplate : ''
159177 }
160178} )
0 commit comments