diff --git a/dev-docs.json b/dev-docs.json new file mode 100644 index 0000000000..e1820254da --- /dev/null +++ b/dev-docs.json @@ -0,0 +1,3 @@ +{ + "aiProvider": "google" +} diff --git a/docusaurus/docs/cms/api/graphql.md b/docusaurus/docs/cms/api/graphql.md index 11878756cb..44c6025471 100644 --- a/docusaurus/docs/cms/api/graphql.md +++ b/docusaurus/docs/cms/api/graphql.md @@ -1,6 +1,23 @@ --- title: GraphQL API displayed_sidebar: cmsSidebar +tags: + - API + - Content API + - documentId + - filters + - GraphQL + - mutation + - pagination + - pagination by offset + - pagination by page + - plural API ID + - sort +--- +```markdown +--- +title: GraphQL API +displayed_sidebar: cmsSidebar tags: - API - Content API diff --git a/docusaurus/docs/cms/configurations/server.md b/docusaurus/docs/cms/configurations/server.md index efecdcdafd..00e9ea3283 100644 --- a/docusaurus/docs/cms/configurations/server.md +++ b/docusaurus/docs/cms/configurations/server.md @@ -11,6 +11,20 @@ tags: - host - port --- +```md +--- +title: Server configuration +sidebar_label: Server +description: Strapi offers a single entry point file for its server configuration. +displayed_sidebar: cmsSidebar +tags: + - app keys + - base configuration + - configuration + - cron job + - host + - port +--- # Server configuration @@ -172,3 +186,18 @@ export default ({ env }) => ({ + +:::tip Important considerations for Development environments + +When running Strapi in a development environment (`NODE_ENV=development`), the server configuration requires special attention, particularly concerning the `host` parameter. Due to changes in how Strapi constructs URLs, especially for the admin panel, the following points should be considered: + +- **`host: 0.0.0.0`**: Setting the host to `0.0.0.0` is crucial for allowing external access to your Strapi application from other devices on your network. However, be aware that in some cases, this might not be sufficient for the admin panel to function correctly due to URL construction logic. + +- **Accessing the Admin Panel**: If you encounter issues accessing the admin panel when using `0.0.0.0`, especially seeing a blank screen or errors related to the URL, try accessing the admin panel using `http://localhost:/admin`. + +- **IPv6 Addresses**: If your machine uses IPv6, and you set your host to an IPv6 address (e.g., `::1`), ensure your system correctly resolves this address. You might need to access your Strapi application using `http://[::1]:/admin`. + +- **Explicit Host Configuration**: For a more robust configuration in development, consider explicitly setting the `host` to `localhost` and verifying that your system resolves `localhost` correctly. This ensures that both the server and admin panel URLs are constructed correctly. + +These considerations are important because Strapi dynamically generates URLs for the admin panel and other services based on the `host` and `port` configurations. Incorrectly configured hosts can lead to URL mismatches and prevent the admin panel from loading correctly. +::: diff --git a/docusaurus/docs/cms/features/preview.md b/docusaurus/docs/cms/features/preview.md index c4e027af7d..23a5af3f82 100644 --- a/docusaurus/docs/cms/features/preview.md +++ b/docusaurus/docs/cms/features/preview.md @@ -1,5 +1,18 @@ --- title: Preview +description: >- + With the Preview feature, you can preview your front-end directly from the + Content Manager +displayedSidebar: userSidebar +toc_max_heading_level: 4 +tags: + - content manager + - preview + - features +--- +```markdown +--- +title: Preview description: With the Preview feature, you can preview your front-end directly from the Content Manager displayedSidebar: userSidebar toc_max_heading_level: 4 @@ -597,3 +610,4 @@ Additionally, you can: :::note In the Edit view of the Content Manager, the Open preview button will be disabled if you have unsaved changes. Save your latest changes and you should be able to preview content again. ::: +``` diff --git a/docusaurus/docs/cms/features/users-permissions.md b/docusaurus/docs/cms/features/users-permissions.md index 253f11b7a3..4e982b1dbc 100644 --- a/docusaurus/docs/cms/features/users-permissions.md +++ b/docusaurus/docs/cms/features/users-permissions.md @@ -1,5 +1,18 @@ --- title: Users & Permissions +description: >- + Learn to use the Users & Permissions and API tokens features to manage + end-users. +toc_max_heading_level: 5 +tags: + - admin panel + - users & permissions + - api tokens + - features +--- +```markdown +--- +title: Users & Permissions description: Learn to use the Users & Permissions and API tokens features to manage end-users. toc_max_heading_level: 5 tags: @@ -246,7 +259,7 @@ Setting JWT expiry for more than 30 days is not recommended due to security conc ### Registration configuration -If you have added any additional fields in your User **model** Models, also called content-types in Strapi, define a representation of the content structure.
Users are a special type of built-in content-type found in any new Strapi application. You can customize the Users model, adding more fields for instance, like any other models.
For more information, please refer to the [models](/cms/backend-customization/models) documentation.
that need to be accepted on registration, you need to added them to the list of allowed fields in the `config.register` object of [the `/config/plugins` file](/cms/configurations/plugins), otherwise they will not be accepted. +If you have added any additional fields in your User **model** Models, also called content-types in Strapi, define a representation of the content structure.
Users are a special type of built-in content-type found in any new Strapi application. You can customize the Users model, adding more fields for instance, like any other models.
For more information, please refer to the [models](/cms/backend-customization/models) documentation.
that need to be accepted on registration, you need to added them to the list of allowed fields in the `config.register` object of [the `/config/plugins` file](/cms/configurations/plugins), otherwise they will not be accepted. By default, the `register.allowedFields` array is empty, meaning no additional fields are accepted unless explicitly configured. The following example shows how to ensure a field called "nickname" is accepted by the API on user registration: @@ -348,7 +361,7 @@ module.exports = { -```ts title="/extensions/users-permissions/config/jwt.ts" +```js title="/extensions/users-permissions/config/jwt.ts" export default { jwtSecret: process.env.SOME_ENV_VAR, @@ -584,3 +597,4 @@ create: async ctx => { ctx.created(data); }; ``` +``` diff --git a/docusaurus/docs/cms/migration/v4-to-v5/breaking-changes.md b/docusaurus/docs/cms/migration/v4-to-v5/breaking-changes.md index a69c3fac4a..8bfabce1ca 100644 --- a/docusaurus/docs/cms/migration/v4-to-v5/breaking-changes.md +++ b/docusaurus/docs/cms/migration/v4-to-v5/breaking-changes.md @@ -4,6 +4,17 @@ description: View the list of all breaking changes introduced between Strapi v4 displayed_sidebar: cmsSidebar pagination_prev: cms/migration/v4-to-v5/step-by-step pagination_next: cms/migration/v4-to-v5/additional-resources/introduction +tags: + - breaking changes + - upgrade to Strapi 5 +--- +```markdown +--- +title: Breaking changes +description: View the list of all breaking changes introduced between Strapi v4 and v5. +displayed_sidebar: cmsSidebar +pagination_prev: cms/migration/v4-to-v5/step-by-step +pagination_next: cms/migration/v4-to-v5/additional-resources/introduction tags: - breaking changes - upgrade to Strapi 5 diff --git a/docusaurus/docs/cms/plugins/upload.md b/docusaurus/docs/cms/plugins/upload.md index 23807ac66f..0024021b43 100644 --- a/docusaurus/docs/cms/plugins/upload.md +++ b/docusaurus/docs/cms/plugins/upload.md @@ -2,6 +2,18 @@ title: Upload plugin displayed_sidebar: cmsSidebar description: Upload any kind of file on your server or external providers. +tags: + - localServer + - provider + - plugins + - Upload plugin + - REST API +--- +```markdown +--- +title: Upload plugin +displayed_sidebar: cmsSidebar +description: Upload any kind of file on your server or external providers. tags: - localServer - provider @@ -265,11 +277,7 @@ export default ({ env }) => ({ upload: { config: { breakpoints: { - xlarge: 1920, - large: 1000, - medium: 750, - small: 500, - xsmall: 64 + xlarge: 1920,\n large: 1000,\n medium: 750,\n small: 500,\n xsmall: 64 }, }, }, @@ -354,10 +362,7 @@ The following parameters are accepted: form.addEventListener('submit', async (e) => { e.preventDefault(); - await fetch('/api/upload', { - method: 'post', - body: new FormData(e.target) - }); + await fetch('/api/upload', {\n method: 'post',\n body: new FormData(e.target)\n }); }); ``` @@ -375,10 +380,7 @@ const form = new FormData(); form.append('files', file, "1.png"); -const response = await fetch('http://localhost:1337/api/upload', { - method: 'post', - body: form, -}); +const response = await fetch('http://localhost:1337/api/upload', {\n method: 'post',\n body: form,\n}); ``` @@ -442,10 +444,7 @@ The corresponding code is be: form.addEventListener('submit', async (e) => { e.preventDefault(); - await fetch('/api/upload', { - method: 'post', - body: new FormData(e.target) - }); + await fetch('/api/upload', {\n method: 'post',\n body: new FormData(e.target)\n }); }); ``` @@ -529,9 +528,6 @@ const form = new FormData(); form.append('fileInfo', JSON.stringify(newFileData)); -const response = await fetch(`http://localhost:1337/api/upload?id=${fileId}`, { - method: 'post', - body: form, -}); +const response = await fetch(`http://localhost:1337/api/upload?id=${fileId}`, {\n method: 'post',\n body: form,\n}); ``` diff --git a/docusaurus/docs/cms/providers.md b/docusaurus/docs/cms/providers.md index 60e9ae59ae..65d32c3a01 100644 --- a/docusaurus/docs/cms/providers.md +++ b/docusaurus/docs/cms/providers.md @@ -1,6 +1,14 @@ --- title: Providers description: Install and use providers to extend the functionality of available plugins. +tags: + - environment + - providers +--- +```markdown +--- +title: Providers +description: Install and use providers to extend the functionality of available plugins. tags: - environment - providers @@ -489,3 +497,4 @@ export = { +```