Skip to content

Commit 840bb55

Browse files
committed
Limit PR scope based on title; keep only intended doc(s); revert unrelated files
1 parent 4bb3b96 commit 840bb55

File tree

15 files changed

+17
-72
lines changed

15 files changed

+17
-72
lines changed

docusaurus/docs/cms/admin-panel-customization/bundlers.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,10 @@ strapi develop --bundler=webpack
8080
```
8181

8282
:::prerequisites
83-
If you plan to customize webpack, start from the example file in your project root. Rename:
84-
85-
- `webpack.config.example.js``webpack.config.js` (JavaScript)
86-
- or `webpack.config.example.ts``webpack.config.ts` (TypeScript)
87-
88-
Strapi will pick up `webpack.config.js` or `webpack.config.ts` automatically when you run `strapi develop --bundler=webpack`.
83+
Make sure to rename the default `webpack.config.example.js` file into `webpack.config.` before customizing webpack.
8984
:::
9085

91-
To extend webpack v5, define a function that returns a modified config in `/src/admin/webpack.config.js` or `/src/admin/webpack.config.ts`:
86+
In order to extend the usage of webpack v5, define a function that extends its configuration inside `/src/admin/webpack.config.`:
9287

9388
<Tabs groupId="js-ts">
9489
<TabItem value="js" label="JavaScript">
@@ -123,3 +118,4 @@ export default (config, webpack) => {
123118

124119
</TabItem>
125120
</Tabs>
121+

docusaurus/docs/cms/admin-panel-customization/host-port-path.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,3 @@ export default ({ env }) => ({
9595
:::strapi Other admin panel configurations
9696
The `/config/admin.[ts|js]` file can be used to configure many other aspects. Please refer to the [admin panel configuration](/cms/configurations/admin-panel) documentation for details.
9797
:::
98-
99-
:::tip Behind a reverse proxy
100-
When serving the admin from a different public origin (domain, host, or port) than the API, set `host`/`port` accordingly and ensure your proxy forwards headers (e.g., `X-Forwarded-*`). If the admin is reachable at a different origin, prefer configuring that origin explicitly.
101-
:::

docusaurus/docs/cms/admin-panel-customization/logos.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ tags:
1111

1212
# Logos
1313

14-
<Tldr>
15-
Update login and navigation logos by extending the admin app. Prefer SVG for crisp rendering; provide light/dark variants when possible for contrast.
16-
</Tldr>
17-
1814
Strapi's [admin panel](/cms/admin-panel-customization) displays its branding on both the login screen and in the main navigation. Replacing these images allows you to match the interface to your identity. The present page shows how to override the two logo files via the admin panel configuration. If you prefer uploading them directly in the UI, see [Customizing the logo](/cms/features/admin-panel#customizing-the-logo).
1915

2016
The Strapi admin panel displays a logo in 2 different locations, represented by 2 different keys in the admin panel configuration:

docusaurus/docs/cms/admin-panel-customization/theme-extension.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,3 @@ To extend the theme, use either:
2121
:::strapi Strapi Design System
2222
The default <ExternalLink to="https://github.com/strapi/design-system/tree/main/packages/design-system/src/themes" text="Strapi theme"/> defines various theme-related keys (shadows, colors…) that can be updated through the `config.theme.light` and `config.theme.dark` keys in `./admin/src/app.js`. The <ExternalLink to="https://design-system.strapi.io/" text="Strapi Design System"/> is fully customizable and has a dedicated <ExternalLink to="https://design-system-git-main-strapijs.vercel.app" text="StoryBook"/> documentation.
2323
:::
24-
25-
### Example (TypeScript)
26-
27-
```ts title="/src/admin/app.ts"
28-
export default {
29-
config: {
30-
theme: {
31-
light: {
32-
colors: {
33-
primary600: '#4A6EFF',
34-
},
35-
},
36-
dark: {
37-
colors: {
38-
primary600: '#9DB2FF',
39-
},
40-
},
41-
},
42-
},
43-
bootstrap() {},
44-
}
45-
```

docusaurus/docs/cms/admin-panel-customization/wysiwyg-editor.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,3 @@ Strapi's [admin panel](/cms/admin-panel-customization) comes with a built-in ric
1515

1616
- You can install a third-party plugin, such as one for CKEditor, by visiting <ExternalLink to="https://market.strapi.io/" text="Strapi's Marketplace"/>.
1717
- You can create your own plugin to create and register a fully custom WYSIWYG field (see [custom fields documentation](/cms/features/custom-fields)).
18-
19-
:::tip Next steps
20-
When evaluating editors, start with a plugin from the Marketplace for a quick trial, then consider a custom field if you need deeper integration (schema, validation, or custom toolbar behavior).
21-
:::

docusaurus/docs/cms/backend-customization/controllers.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ In most cases, the controllers will contain the bulk of a project's business log
2929
<em><figcaption style={{fontSize: '12px'}}>The diagram represents a simplified version of how a request travels through the Strapi back end, with controllers highlighted. The backend customization introduction page includes a complete, <a href="/cms/backend-customization#interactive-diagram">interactive diagram</a>.</figcaption></em>
3030
</figure>
3131

32-
:::caution Sanitize inputs and outputs
33-
When overriding core actions, always validate and sanitize queries and responses to avoid leaking private fields or bypassing access rules. Use `validateQuery` (optional), `sanitizeQuery` (recommended), and `sanitizeOutput` before returning data from custom actions. See the example below for a safe `find` override.
34-
:::
35-
3632
## Implementation
3733

3834
Controllers can be [generated or added manually](#adding-a-new-controller). Strapi provides a `createCoreController` factory function that automatically generates core controllers and allows building custom ones or [extend or replace the generated controllers](#extending-core-controllers).
@@ -99,7 +95,7 @@ module.exports = createCoreController('api::restaurant.restaurant', ({ strapi })
9995

10096
<TabItem value="ts" label="TypeScript">
10197

102-
```ts title="./src/api/restaurant/controllers/restaurant.ts"
98+
```js title="./src/api/restaurant/controllers/restaurant.ts"
10399

104100
import { factories } from '@strapi/strapi';
105101

docusaurus/docs/cms/backend-customization/middlewares.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ module.exports = () => {
108108

109109
<TabItem value="ts" label="TypeScript">
110110

111-
```ts title="/config/middlewares.ts"
111+
```js title="/config/middlewares.ts"
112112

113113
export default () => {
114114
return async (ctx, next) => {
@@ -129,10 +129,6 @@ export default () => {
129129

130130
The GraphQL plugin also allows [implementing custom middlewares](/cms/plugins/graphql#middlewares), with a different syntax.
131131

132-
:::tip Discover loaded middlewares
133-
Run `yarn strapi middlewares:list` to list all registered middlewares and double‑check naming when wiring them in routers.
134-
:::
135-
136132
## Usage
137133

138134
Middlewares are called different ways depending on their scope:

docusaurus/docs/cms/backend-customization/models.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ tags:
1616

1717
# Models
1818

19-
<Tldr>
20-
Models define your content types’ shape and drive generated controllers and routes. Use the Document Service API to query/create/update data and keep controllers thin.
21-
</Tldr>
22-
2319
<Tldr>
2420
Models define Strapi’s content structure via content-types and reusable components. This documentation walks through creating these models in the Content-type Builder or CLI and managing schema files with optional lifecycle hooks.
2521
</Tldr>

docusaurus/docs/cms/backend-customization/policies.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Policies are functions that execute specific logic on each request before it rea
2424

2525
Each [route](/cms/backend-customization/routes) of a Strapi project can be associated to an array of policies. For example, a policy named `is-admin` could check that the request is sent by an admin user, and restrict access to critical routes.
2626

27-
Policies can be global or scoped. [Global policies](#global-policies) can be associated to any route in the project. Scoped policies only apply to a specific [API](#api-policies) or [plugin](#plugin-policies) and should live under the corresponding `./src/api/<api-name>/policies/` or `./src/plugins/<plugin-name>/policies/` folder.
27+
Policies can be global or scoped. [Global policies](#global-policies) can be associated to any route in the project. Scoped policies only apply to a specific [API](#api-policies) or [plugin](#plugin-policies).
2828

2929
<figure style={{width: '100%', margin: '0'}}>
3030
<img src="/img/assets/backend-customization/diagram-routes.png" alt="Simplified Strapi backend diagram with routes and policies highlighted" />
@@ -89,7 +89,7 @@ Policies can be configured using a `config` object:
8989
<Tabs groupId="js-ts">
9090
<TabItem value="js" label="JavaScript">
9191

92-
```js title="./src/api/[api-name]/policies/my-policy.js"
92+
```js title=".src/api/[api-name]/policies/my-policy.js"
9393

9494
module.exports = (policyContext, config, { strapi }) => {
9595
if (policyContext.state.user.role.code === config.role) { // if user's role is the same as the one described in configuration

docusaurus/docs/cms/backend-customization/routes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ module.exports = createCoreRouter('api::restaurant.restaurant', {
9797

9898
<TabItem value="ts" label="TypeScript">
9999

100-
```ts title="./src/api/[apiName]/routes/[routerName].ts (e.g './src/api/restaurant/routes/restaurant.ts')"
100+
```js title="./src/api/[apiName]/routes/[routerName].ts (e.g './src/api/restaurant/routes/restaurant.ts')"
101101

102102
import { factories } from '@strapi/strapi';
103103

@@ -149,7 +149,7 @@ module.exports = createCoreRouter('api::restaurant.restaurant', {
149149

150150
<TabItem value="ts" label="TypeScript">
151151

152-
```ts title="./src/api/restaurant/routes/restaurant.ts"
152+
```js title="./src/api/restaurant/routes/restaurant.ts"
153153

154154
import { factories } from '@strapi/strapi';
155155

@@ -168,7 +168,7 @@ export default factories.createCoreRouter('api::restaurant.restaurant', {
168168
</TabItem>
169169
</Tabs>
170170

171-
This only allows a `GET` request on the `/restaurants` path from the core `find` [controller](/cms/backend-customization/controllers) without authentication. When you reference custom controller actions in custom routers, prefer the fully‑qualified `api::<api-name>.<controllerName>.<actionName>` form for clarity (e.g., `api::restaurant.restaurant.review`).
171+
This only allows a `GET` request on the `/restaurants` path from the core `find` [controller](/cms/backend-customization/controllers) without authentication.
172172

173173
### Creating custom routers
174174

0 commit comments

Comments
 (0)