Skip to content

Commit d8b1311

Browse files
committed
docs: add example on how to shadow the theme
1 parent 611df50 commit d8b1311

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed
Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# gatsby-theme-style-guide
32

43
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
109
```js
1110
// gatsby-config.js
1211
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'],
1713
}
1814
```
1915

@@ -30,21 +26,22 @@ module.exports = {
3026
options: {
3127
// sets path for generated page
3228
basePath: '/design-system',
33-
}
29+
},
3430
},
35-
]
31+
],
3632
}
3733
```
3834

3935
## Shadowing
4036

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.
4238

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 |
5046

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

Comments
 (0)