You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 16, 2026. It is now read-only.
Copy file name to clipboardExpand all lines: src/docs/documentation/customizing/gatsby-theme.mdx
+10-18Lines changed: 10 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,7 @@ menu: Customizing
9
9
10
10
If you want to use Docz in a Gatsby environment, use our `gatsby-theme-docz` is the better choice.
11
11
12
-
Gatsby themes is one of the coolest features of all time in Gatsby. With the introduction of theming in Gatsby,
13
-
it's easier than ever to get started building a Gatsby site. Shared functionality, data sourcing, and design can all be prepackaged as a Gatsby Theme that's an NPM install away.
12
+
Gatsby themes is one of the coolest features of all time in Gatsby. With the introduction of theming in Gatsby, it's easier than ever to get started building a Gatsby site. Shared functionality, data sourcing, and design can all be prepackaged as a Gatsby Theme that's an NPM install away.
14
13
15
14
Our theme has all components and algorithms used to render your documentation website, with it we can explore a lot of Gatsby features and put all this things together in order
16
15
to create a really usefull documentation for you. Because of `gatsby-theme-docz` you can enjoy of a lot easier system to customize and improve your docs too.
@@ -21,8 +20,8 @@ If you like it, but you don't know what is a Gatsby theme, please read [the offi
21
20
22
21
It's so simple to use our Gatsby theme. First of all, just install some packages:
Then set the `gatsby-theme-docz` in the `plugins` option inside your `gatsby-config.js`
@@ -91,18 +90,15 @@ export default {
91
90
}
92
91
```
93
92
94
-
## Component Shadowing
93
+
## Customizing components
95
94
96
-
Components shadowing is one of the best things included in the new Gatsby theme feature, with it is possible to replace
97
-
theme files just by creating your own file following a file naming convetion.
95
+
Components shadowing is one of the best things included in the new Gatsby theme feature, with it is possible to replace theme files just by creating your own file following a file naming convetion.
98
96
99
-
Example: If you're using our `gatsby-theme-docz` which has a `Header` component located at `src/components/Header/index.js`
100
-
you can override the component by creating `src/gatsby-theme-docz/components/Header/index.js`. Cool right?
97
+
Example: If you're using our `gatsby-theme-docz` which has a `Header` component located at `src/components/Header/index.js` you can override the component by creating `src/gatsby-theme-docz/components/Header/index.js`. Cool right?
101
98
102
99
## Adding your logo
103
100
104
-
So, now that you know about how component shadowing works on Gatsby themes, if you don't want to override the entire `<Header>` component
105
-
but just change your logo inside it, your can shadow the `<Logo>` component used in the header just by creating your own at `src/gatsby-theme-docz/components/Logo/index.js`
101
+
So, now that you know about how component shadowing works on Gatsby themes, if you don't want to override the entire `<Header>` component but just change your logo inside it, your can shadow the `<Logo>` component used in the header just by creating your own at `src/gatsby-theme-docz/components/Logo/index.js`
106
102
107
103
```js
108
104
// src/gatsby-theme-docz/components/Logo/index.js
@@ -116,9 +112,7 @@ Easy, right?
116
112
117
113
## Creating your own Docz theme
118
114
119
-
One of the coolest thing of Docz is that you can create your own theme if you want from scratch and use all benefits of it.
120
-
The oldest way to acomplish that is by using the `theme` property inside the `doczrc.js` file. Now, if you want to create
121
-
your own theme, just create a file located at `src/gatsby-theme-docz/index.js`
115
+
One of the coolest thing of Docz is that you can create your own theme if you want from scratch and use all benefits of it. The oldest way to acomplish that is by using the `theme` property inside the `doczrc.js` file. Now, if you want to create your own theme, just create a file located at `src/gatsby-theme-docz/index.js`
122
116
123
117
```js
124
118
importReactfrom'react'
@@ -160,8 +154,7 @@ More info about [here](/docs/creating-your-themes)
160
154
161
155
## Wrapping the entire app
162
156
163
-
Sometime you need to wrap your entire application in order to add some `Provider` or just to load some script.
164
-
You can do this easily inside our theme by creating a file located at `src/gatsby-theme-docz/wrapper.js`
157
+
Sometime you need to wrap your entire application in order to add some `Provider` or just to load some script. You can do this easily inside our theme by creating a file located at `src/gatsby-theme-docz/wrapper.js`
As default theme systeAs default theme system we are using the [Theme-UI](https://theme-ui.com/), it's a library for build consistent, themeable React apps
181
-
based on constraint-based design principles.
173
+
As default theme systeAs default theme system we are using the [Theme-UI](https://theme-ui.com/), it's a library for build consistent, themeable React apps based on constraint-based design principles.
182
174
183
175
You can modify our based theme creating your own style, combining these modifications with the component shadowing and creating a totally differente documentation.
Copy file name to clipboardExpand all lines: src/docs/documentation/references/migration-guide.mdx
+14-40Lines changed: 14 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,23 +6,14 @@ menu: References
6
6
---
7
7
8
8
# Migration Guide
9
-
10
-
The [v2 release](https://github.com/pedronauck/docz/pull/950) is our biggest release in terms of changes on our core scripts.
11
-
Our bundler system was entirely modified in order to use Gatsby as default bundler and you will need to update
12
-
your code if you're coming from a previous version. It's not a big deal, but you need to follow this guide in order to get Docz running
13
-
properly on your project after the upgrade.
9
+
The [v2 release](https://github.com/pedronauck/docz/pull/950) is our biggest release in terms of changes on our core scripts. Our bundler system was entirely modified in order to use Gatsby as default bundler and you will need to update your code if you’re coming from a previous version. It’s not a big deal, but you need to follow this guide in order to get Docz running properly on your project after the upgrade.
14
10
15
11
## Gatsby as default bundler
12
+
The biggest change in the new v2 is that now our core is entirely build using Gatsby behind the scenes. This is a huge win for Docz, since now we can focus on build new features instead of handling with a lot of bundlers issues (our biggest bottleneck) and enjoy all Gatsby ecosystem.
16
13
17
-
The biggest change in the new v2 is that now our core is entirely build using Gatsby behind the scenes.
18
-
This is a huge win for Docz, since now we can focus on build new features instead of handling with
19
-
a lot of bundlers issues (our biggest bottleneck) and enjoy all Gatsby ecosystem.
20
-
21
-
So, in order to refactoring our core, we need to change a lot of things and remove others that no longer make sense.
22
-
The most expressive changes here is about the configuration for `doczrc.js` and the plugin system.
14
+
So, in order to refactoring our core, we need to change a lot of things and remove others that no longer make sense. The most expressive changes here is about the configuration for `doczrc.js` and the plugin system.
23
15
24
16
### List of removed properties from `doczrc.js`
25
-
26
17
***`websocketHost`** ▶︎ _no longer need_
27
18
***`websocketPort`** ︎︎︎▶︎ _no longer need_
28
19
***`wrapper`** ▶︎ _removed_
@@ -34,7 +25,6 @@ The most expressive changes here is about the configuration for `doczrc.js` and
34
25
***`modifyBabelRc`** ▶︎ use Gatsby [`onCreateBabelConfig`](https://www.gatsbyjs.org/docs/node-apis/#onCreateBabelConfig) hook
35
26
36
27
## New hooks for plugins
37
-
38
28
The `createPlugin` method also changed in order to fit with Gatsby now.
39
29
40
30
### List of removed/changed properties from `createPlugin()`
@@ -51,42 +41,28 @@ The `createPlugin` method also changed in order to fit with Gatsby now.
51
41
> You can have more details about then [here](https://www.gatsbyjs.org/docs/node-apis).
52
42
53
43
## `docz-theme-default` removed
44
+
The main reason that made us change our core to use Gatsby is that now it have a feature called themes. In the last major version we launched our own `gatsby-theme-docz` and this was impressive since we could use Docz inside a Gatsby project and brings a lot of new possibilites when creating a documentation.
54
45
55
-
The main reason that made me want to change our core to use Gatsby is that now it have a feature called themes.
56
-
In the last major version we launched our own `gatsby-theme-docz` and this was impressive since we could use Docz
57
-
inside a Gatsby project and brings a lot of new possibilites when creating a documentation.
58
-
59
-
So, indeed we were using Gatsby theme at all, but in the wrong way. One of the best benefits of Gatsby theme are
60
-
the feature called Component Shadowing, that's the hability to replace theme files just by creating your own file following a file naming convetion.
61
-
This is awesome and is something that people always ask for me, like: "I want just to change the head in the Docz theme".
46
+
So, indeed we were using Gatsby theme at all, but in the wrong way. One of the best benefits of Gatsby theme are the feature called Component Shadowing, that’s the ability to replace theme files just by creating your own file following a file naming convention. This is awesome and is something that people always ask for me, like: “I want just to change the head in the Docz theme”.
62
47
63
-
In order to get Docz running with component shadowing we removed `docz-theme-default` and now you don't need to install it anymore.
64
-
You can just add `docz` and your project is done
48
+
In order to get Docz running with component shadowing we removed `docz-theme-default` and now you don’t need to install it anymore. You can just add `docz` and your project is done.
65
49
66
-
Check [here]() readme for more information.
50
+
Check [here](h) readme for more information.
67
51
68
52
### Code highlight with PrismJS
53
+
In the last version of Docz we’re using Codemirror to highlight code inside `<Playground>` and code blocks. Now we are using [prism-react-renderer](https://github.com/FormidableLabs/prism-react-renderer) together with Theme UI.
69
54
70
-
In the last version of Docz we're using Codemirror to highlight code inside `<Playground>` and code blocks.
71
-
Now we are using [prism-react-renderer](https://github.com/FormidableLabs/prism-react-renderer) together with Theme UI.
72
-
73
-
Check [here]() for more information.
55
+
Check [here](h) for more information.
74
56
75
57
### New `themeConfig` properties
58
+
Another great thing launched in the newest version is the integration with the [Theme UI](https://theme-ui.com). Theme UI it’s a library for build consistent, themeable React apps based on constraint-based design principles. So, in order to integration it with our new theme, a lot of changes are made inside the `themeConfig` object.
76
59
77
-
Another great thing launched in the newest version is the integration with the [Theme UI](https://theme-ui.com).
78
-
Theme UI it's a library for build consistent, themeable React apps based on constraint-based design principles.
79
-
So, in order to integration it with our new theme, a lot of changes are made inside the `themeConfig` object.
80
-
81
-
Check [here]() for more information.
60
+
Check [here](h) for more information.
82
61
83
62
## `theme` property removed
63
+
The property used to define your Docz theme inside the `doczrc.js` was removed. But you can still create and use your own theme from scratch if you want.
84
64
85
-
The property used to define your Docz theme inside the `doczrc.js` was removed. But you can still
86
-
create and use your own theme from scratch if you want.
87
-
88
-
If you want to use your own theme, just create a file called `src/gatsby-theme-docz/index.js` in order
89
-
to use component shadowing and replace it with your new theme.
65
+
If you want to use your own theme, just create a file called `src/gatsby-theme-docz/index.js` in order to use component shadowing and replace it with your new theme.
Check [here](https://www.docz.site/docs/creating-themes) for more information about how to create themes.
100
76
101
77
## `wrapper` property removed
102
-
103
-
The same thing happened here for the oldest `wrapper` property. Now you can wrap your entire application
104
-
by just creating a file called `src/gatsby-theme-docz/wrapper.js`
78
+
The same thing happened here for the oldest `wrapper` property. Now you can wrap your entire application by just creating a file called `src/gatsby-theme-docz/wrapper.js`
0 commit comments