1
-
2
1
# gatsby-theme-style-guide
3
2
4
3
Automatically generate a style guide page based on your Theme UI configuration, built with [ ` @theme-ui/style-guide ` ] ( https://theme-ui.com/style-guide ) .
@@ -10,10 +9,7 @@ npm i gatsby-theme-style-guide
10
9
``` js
11
10
// gatsby-config.js
12
11
module .exports = {
13
- plugins: [
14
- ' gatsby-plugin-theme-ui' ,
15
- ' gatsby-theme-style-guide' ,
16
- ]
12
+ plugins: [' gatsby-plugin-theme-ui' , ' gatsby-theme-style-guide' ],
17
13
}
18
14
```
19
15
@@ -30,21 +26,22 @@ module.exports = {
30
26
options: {
31
27
// sets path for generated page
32
28
basePath: ' /design-system' ,
33
- }
29
+ },
34
30
},
35
- ]
31
+ ],
36
32
}
37
33
```
38
34
39
35
## Shadowing
40
36
41
- Shadow the following components to customize the layout and order of the page.
37
+ You can customize the layout and order of the page by [ shadowing ] ( https://www.gatsbyjs.org/docs/themes/shadowing/ ) the theme .
42
38
43
- component | description
44
- ---| ---
45
- ` src/template.js ` | the root component for the page
46
- ` src/layout.js ` | wrapper for adding a page layout
47
- ` src/header.js ` | header for the top of the page
48
- ` src/typography.js ` | section for typography styles
49
- ` src/colors.js ` | section for colors
39
+ | component | description |
40
+ | ------------------- | -------------------------------- |
41
+ | ` src/template.js ` | the root component for the page |
42
+ | ` src/layout.js ` | wrapper for adding a page layout |
43
+ | ` src/header.js ` | header for the top of the page |
44
+ | ` src/typography.js ` | section for typography styles |
45
+ | ` src/colors.js ` | section for colors |
50
46
47
+ For example, to shadow the ` template.js ` file, you would create a file named ` your-site/src/gatsby-theme-style-guide/template.js `
0 commit comments