mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 18:33:55 +00:00
Clean admin custom
This commit is contained in:
parent
2580b471d4
commit
e726594181
@ -8,6 +8,10 @@ See the [Contributing Guide](https://github.com/strapi/strapi/blob/master/CONTRI
|
||||
|
||||
The administration panel can be customized according to your needs, so you can make it reflects your identity.
|
||||
|
||||
::: warning
|
||||
To apply your changes you need to [rebuild](#build) your admin panel
|
||||
:::
|
||||
|
||||
### Change access URL
|
||||
|
||||
By default, the administration panel is exposed via [http://localhost:1337/admin](http://localhost:1337/admin). However, for security reasons, you can easily update this path.
|
||||
@ -41,12 +45,6 @@ For example, to change the top-left displayed admin panel's color, `./node_modul
|
||||
|
||||
Thus, you are replacing the files that would normally be in `node_modules/strapi-admin/admin/src` and directing them to `admin/src/some/file/path`.
|
||||
|
||||
To apply your changes you need to rebuild your admin panel
|
||||
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Logo
|
||||
|
||||
To change the top-left displayed admin panel's logo, add your custom image at `./admin/src/assets/images/logo-strapi.png`.
|
||||
@ -55,14 +53,6 @@ To change the top-left displayed admin panel's logo, add your custom image at `.
|
||||
make sure the size of your image is the same as the existing one (434px x 120px).
|
||||
:::
|
||||
|
||||
To apply your changes you need to rebuild your admin panel
|
||||
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Tutorial videos
|
||||
|
||||
To disable the information box containing the tutorial videos, create a file at `./admin/src/config.js`
|
||||
@ -73,29 +63,69 @@ Add the following configuration:
|
||||
export const SHOW_TUTORIALS = false;
|
||||
```
|
||||
|
||||
To apply your changes you need to rebuild your admin panel
|
||||
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Build
|
||||
|
||||
To build the administration, run the following command from the root directory of your project.
|
||||
|
||||
```bash
|
||||
:::: tabs cache-lifetime="10" :options="{ useUrlFragment: false }"
|
||||
|
||||
::: tab "yarn" id="yarn-build-dev"
|
||||
|
||||
```
|
||||
yarn build
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
::: tab "npm" id="npm-build-dev"
|
||||
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
::: tab "strapi" id="strapi-build-dev"
|
||||
|
||||
```
|
||||
strapi build
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
::::
|
||||
|
||||
you can build your admin panel with a specific configuration (located in the `./config/environments/**/server.json`) config by specifying a NODE_ENV as follows:
|
||||
|
||||
```bash
|
||||
:::: tabs cache-lifetime="10" :options="{ useUrlFragment: false }"
|
||||
|
||||
::: tab "yarn" id="yarn-build-prod"
|
||||
|
||||
```
|
||||
NODE_ENV=production yarn build
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
::: tab "npm" id="npm-build-prod"
|
||||
|
||||
```
|
||||
NODE_ENV=production npm run build
|
||||
```
|
||||
|
||||
This will replace the folder's content located at `./build`. Visit http://localhost:1337/admin/ to make sure your updates have been taken into account.
|
||||
:::
|
||||
|
||||
::: tab "strapi" id="strapi-build-prod"
|
||||
|
||||
```
|
||||
NODE_ENV=production strapi build
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
::::
|
||||
|
||||
This will replace the folder's content located at `./build`. Visit [http://localhost:1337/admin](http://localhost:1337/admin) to make sure your updates have been taken into account.
|
||||
|
||||
---
|
||||
|
||||
@ -110,7 +140,7 @@ Let's dive into the build configurations for each case.
|
||||
|
||||
#### Deploy the entire project on the same server.
|
||||
|
||||
You don't need to touch anything in your configuration file. This is the default behavior and the build configurations will be automatically set. The server will start on the defined port and the administration panel will be accessible through http://yourdomain.com:1337/dashboard.
|
||||
You don't need to touch anything in your configuration file. This is the default behavior and the build configurations will be automatically set. The server will start on the defined port and the administration panel will be accessible through `http://yourdomain.com:1337/dashboard`.
|
||||
|
||||
You might want to change the path to access to the administration panel. Here the required configurations to change the path:
|
||||
|
||||
@ -153,7 +183,7 @@ It's very common to deploy the front-end and the back-end on different servers.
|
||||
}
|
||||
```
|
||||
|
||||
The administration URL will be http://yourfrontend.com and every request from the panel will hit the backend at http://yourbackend.com.
|
||||
The administration URL will be `http://yourfrontend.com` and every request from the panel will hit the backend at `http://yourbackend.com`.
|
||||
|
||||
#### Deploy the administration panel and the plugins on another server than the API
|
||||
|
||||
@ -177,7 +207,7 @@ In this case, we suppose that you decided to put your administration panel on a
|
||||
}
|
||||
```
|
||||
|
||||
The administration URL will be http://yourfrontend.com/dashboard and every request from the panel will hit the backend at http://yourbackend.com.
|
||||
The administration URL will be `http://yourfrontend.com/dashboard` and every request from the panel will hit the backend at `http://yourbackend.com`.
|
||||
|
||||
The generated `index.html` will look like this:
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user