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
The `config` object found at `./src/admin/app.js` stores the admin panel configuration.
83
83
84
-
Any file used by the `config` object (e.g. a custom logo) should be placed in the `./admin/extensions/` folder and imported inside `./src/admin/app.js`.
84
+
Any file used by the `config` object (e.g. a custom logo) should be placed in the `./src/admin/extensions/` folder and imported inside `./src/admin/app.js`.
85
85
86
86
The `config` object accepts the following parameters:
87
87
@@ -99,7 +99,7 @@ The `config` object accepts the following parameters:
99
99
::: details Example of a custom configuration for the admin panel:
100
100
101
101
```jsx
102
-
// path: ./admin/src/app.js
102
+
// path: ./my-app/src/admin/app.js
103
103
104
104
importAuthLogofrom'./extensions/my-logo.png';
105
105
importMenuLogofrom'./extensions/logo.png';
@@ -162,22 +162,12 @@ To update the list of available locales in the admin panel, use the `config.loca
162
162
```jsx
163
163
// path: ./my-app/src/admin/app.js
164
164
165
-
module.exports= {
166
-
// Custom webpack config
167
-
webpack: (config, webpack) => {
168
-
// Note: we provide webpack above so you should not `require` it
169
-
// Perform customizations to webpack config
170
-
// Important: return the mutated config
171
-
return config;
172
-
},
173
-
174
-
// App customizations
175
-
app:config=> {
176
-
config.locales= ['ru', 'zh'];
177
-
178
-
return config;
165
+
exportdefault {
166
+
config: {
167
+
locales: ['ru', 'zh']
179
168
},
180
-
};
169
+
bootstrap() {},
170
+
}
181
171
```
182
172
183
173
::: note NOTES
@@ -188,30 +178,29 @@ module.exports = {
188
178
189
179
##### Extending translations
190
180
191
-
Translation key/value pairs are declared in `./translations/[language-name].json` files. These keys can be extended through the `config.translations` key:
181
+
Translation key/value pairs are declared in `@strapi/admin/admin/src/translations/[language-name].json` files. These keys can be extended through the `config.translations` key:
192
182
193
183
```js
194
-
// path: ./src/admin/app.js
184
+
// path: ./my-app/src/admin/app.js
195
185
196
186
exportdefault {
197
187
config: {
198
188
locales: ['fr'],
199
189
translations: {
200
190
fr: {
201
-
or:'OR',
202
-
'request.error.model.unknown':"This model doesn't exist",
203
-
skipToContent:'Skip to content',
204
-
submit:'Submit',
205
-
Totos:'tata',
206
-
"content-type-builder.my-translation-key":"test"
191
+
'Auth.form.email.label':'test',
192
+
Users:'Utilisateurs',
193
+
City:'CITY (FRENCH)',
194
+
// Customize the label of the Content Manager table.
195
+
Id:'ID french',
207
196
},
208
197
},
209
198
},
210
199
bootstrap() {},
211
200
};
212
201
```
213
202
214
-
If more translations files should be added, place them in `/extensions/translations` folder.
203
+
If more translations files should be added, place them in `./src/admin/extensions/translations` folder.
215
204
216
205
#### Logos
217
206
@@ -222,13 +211,13 @@ The Strapi admin panel displays a logo in 2 different locations, represented by
222
211
| On the login page |`config.auth.logo`|
223
212
| In the main navigation |`config.menu.logo`|
224
213
225
-
To update the logos, put image files in the `./extensions` folder and update the corresponding keys.
214
+
To update the logos, put image files in the `./src/admin/extensions` folder and update the corresponding keys.
226
215
227
216
The size of the custom image should be the same as the default one (434px x 120px).
228
217
229
218
#### Favicon
230
219
231
-
To update the favicon, put a favicon file in the `./extensions` folder and update the `config.head.favicon` key in the [admin panel configuration](#configuration-options).
220
+
To update the favicon, put a favicon file in the `./src/admin/extensions` folder and update the `config.head.favicon` key in the [admin panel configuration](#configuration-options).
232
221
233
222
#### Tutorial videos
234
223
@@ -299,7 +288,7 @@ module.exports = {
299
288
300
289
### Webpack configuration
301
290
302
-
In order to extend the usage of webpack v5, define a function that extends its configuration inside `./admin/webpack.config.js`:
291
+
In order to extend the usage of webpack v5, define a function that extends its configuration inside `./my-app/src/admin/webpack.config.js`:
303
292
304
293
```js
305
294
module.exports= {
@@ -316,7 +305,7 @@ module.exports = {
316
305
```
317
306
318
307
::: note
319
-
Only `./admin/app.js` and the files under the `./admin/extensions` folder are being watched by the webpack dev server.
308
+
Only `./src/admin/app.js` and the files under the `./src/admin/extensions` folder are being watched by the webpack dev server.
0 commit comments