Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.

Commit 2c05bb5

Browse files
committed
chore: some adjustments
1 parent e6ee121 commit 2c05bb5

2 files changed

Lines changed: 24 additions & 10 deletions

File tree

src/docs/documentation/customizing/powered-by-gatsby.mdx

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,27 @@ Using Gatsby as bundler behind the scenes we won a lot of benefits like:
1717

1818
* Stay focused in create features instead of lead with bundler management
1919
* Static and optimized builds by default
20-
* Fast dev-experience and better worflow
20+
* Fast dev-experience and better workflow
2121
* Huge ecosystem of tools, plugins and community
2222
* Better and easy way to customize things inside Docz
2323
* More power in order to create your documentation
2424

2525
## Gatsby API and Hooks
2626

27-
Gatsby has a pretty damn good [API for developers](https://www.gatsbyjs.org/docs/api-reference/) and a lot of hooks
28-
and life cycle methods that you can use in order to customize the process of
29-
your bundler. Indeed you can hook into it in a lot of ways and all these hooks
27+
Gatsby has a pretty damn good [API for developers](https://www.gatsbyjs.org/docs/api-reference/) and a lot of hooks and life cycle methods that you can use in order to customize the process of
28+
your bundle. Indeed you can hook into it in a lot of ways and all these hooks
3029
and properties you can use with Docz.
3130

3231
> Check [all Gatsby API references](https://www.gatsbyjs.org/docs/api-reference/) here
3332
34-
So, if you want to use any of those Gatsby configurations file inside your Docz
35-
project, just create it in the root and we'll lead with them for you.
33+
So, if you want to use any of those Gatsby configurations file inside your Docz project, just create it in the root and we'll lead with them for you.
3634

3735
Like, if you want to make some change in the webpack configuration, you can use
3836
the `onCreateWebpackConfig` hook inside the `gatsby-node.js` file:
3937

4038
```js
4139
// gatsby-node.js
42-
export.onCreateWebpackConfig = ({ actions }) => {
40+
exports.onCreateWebpackConfig = ({ actions }) => {
4341
actions.setWebpackConfig({
4442
module: {
4543
rules: [
@@ -52,3 +50,19 @@ export.onCreateWebpackConfig = ({ actions }) => {
5250
})
5351
}
5452
```
53+
54+
Or if you want to change your Babel configuration you can use `onCreateBabelConfig` hook for this:
55+
56+
```js
57+
// gatsby-node.js
58+
exports.onCreateBabelConfig = ({ actions }) => {
59+
actions.setBabelPlugin({
60+
name: `babel-plugin-emotion`,
61+
options: {
62+
sourceMap: true,
63+
},
64+
})
65+
}
66+
```
67+
68+
Indeed you have a lot of hooks and actions that you can use to modify or get some information about your bundler process.

src/docs/home/components/Features.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ export const Features = () => (
7575
<Info>
7676
<Title>Powered by Gatsby</Title>
7777
<Text>
78-
Docz since the v2 is enterily built using Gatsby under the hood,
79-
optimized for a lightning fast dev experience and build times and
80-
with a hugh ecosystem of plugins and tools.
78+
Docz since the v2 is entirely built using Gatsby under the hood,
79+
optimised for a lightning fast dev experience and build times and
80+
with a huge ecosystem of plugins and tools.
8181
</Text>
8282
</Info>
8383
</FeatureItem>

0 commit comments

Comments
 (0)