diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js
index bdb0c52651..9c420a08fb 100644
--- a/docs/.vuepress/config.js
+++ b/docs/.vuepress/config.js
@@ -160,8 +160,8 @@ module.exports = {
['/v3.x/getting-started/deployment', 'Deployment'],
['/v3.x/getting-started/contributing', 'Contributing'],
['/v3.x/getting-started/troubleshooting', 'Troubleshooting'],
+ ['/v3.x/getting-started/usage-information', 'Telemetry'],
'/v3.x/getting-started/quick-start',
- '/v3.x/getting-started/quick-start-tutorial',
],
},
{
@@ -257,7 +257,7 @@ module.exports = {
{
collapsable: true,
title: '🏗 Global strapi',
- children: ['/v3.x/global-strapi/api-reference', '/v3.x/global-strapi/usage-information'],
+ children: ['/v3.x/global-strapi/api-reference'],
},
{
collapsable: false,
diff --git a/docs/v3.x/admin-panel/deploy.md b/docs/v3.x/admin-panel/deploy.md
index 59503255d5..6ce3265c73 100644
--- a/docs/v3.x/admin-panel/deploy.md
+++ b/docs/v3.x/admin-panel/deploy.md
@@ -22,7 +22,7 @@ module.exports = ({ env }) => ({
admin: {
url: '/dashboard', // We change the path to access to the admin (highly recommended for security reasons).
},
-};
+});
```
**You have to rebuild the administration panel to make this work.** [Build instructions](./customization.md#build).
@@ -42,7 +42,7 @@ module.exports = ({ env }) => ({
url: '/', // Note: The administration will be accessible from the root of the domain (ex: http://yourfrontend.com/)
serveAdminPanel: false, // http://yourbackend.com will not serve any static admin files
},
-};
+});
```
After running `yarn build` with this configuration, the folder `build` will be created/overwritten. You can then use this folder to serve it from another server with the domain of your choice (ex: `http://youfrontend.com`).
diff --git a/docs/v3.x/concepts/configurations.md b/docs/v3.x/concepts/configurations.md
index a0a7641b89..e171745ba7 100644
--- a/docs/v3.x/concepts/configurations.md
+++ b/docs/v3.x/concepts/configurations.md
@@ -56,6 +56,8 @@ Instead of writing those credentials into your configuration files, you can defi
**Example**
+**Path —** `.env`
+
```
DATABASE_PASSWORD=acme
```
@@ -70,7 +72,7 @@ Now you can access those variables in your configuration files and application.
In your configuration files you will have access to a `env` utility that allows defining defaults and casting values.
-`config/database.js`
+**Path —** `./config/database.js`
```js
module.exports = ({ env }) => ({
diff --git a/docs/v3.x/concepts/controllers.md b/docs/v3.x/concepts/controllers.md
index 2bf70cdd75..da51be2cfa 100644
--- a/docs/v3.x/concepts/controllers.md
+++ b/docs/v3.x/concepts/controllers.md
@@ -43,6 +43,8 @@ const { parseMultipartData, sanitizeEntity } = require('strapi-utils');
- `parseMultipartData`: This function parses Strapi's formData format.
- `sanitizeEntity`: This function removes all private fields from the model and its relations.
+#### Collection Type
+
:::: tabs
::: tab find
@@ -194,7 +196,7 @@ const { sanitizeEntity } = require('strapi-utils');
module.exports = {
/**
- * delete a record.
+ * Delete a record.
*
* @return {Object}
*/
@@ -212,6 +214,90 @@ module.exports = {
::::
+#### Single Type
+
+:::: tabs
+
+::: tab find
+
+#### `find`
+
+```js
+const { sanitizeEntity } = require('strapi-utils');
+
+module.exports = {
+ /**
+ * Retrieve the record.
+ *
+ * @return {Array}
+ */
+
+ async find(ctx) {
+ const entity = await strapi.services.restaurant.findOne();
+ return sanitizeEntity(entity, { model: strapi.models.restaurant });
+ },
+};
+```
+
+:::
+
+::: tab update
+
+#### `update`
+
+```js
+const { parseMultipartData, sanitizeEntity } = require('strapi-utils');
+
+module.exports = {
+ /**
+ * Update the record.
+ *
+ * @return {Object}
+ */
+
+ async update(ctx) {
+ let entity;
+ if (ctx.is('multipart')) {
+ const { data, files } = parseMultipartData(ctx);
+ entity = await strapi.services.restaurant.createOrUpdate(data, {
+ files,
+ });
+ } else {
+ entity = await strapi.services.restaurant.createOrUpdate(ctx.request.body);
+ }
+
+ return sanitizeEntity(entity, { model: strapi.models.restaurant });
+ },
+};
+```
+
+:::
+
+::: tab delete
+
+#### `delete`
+
+```js
+const { sanitizeEntity } = require('strapi-utils');
+
+module.exports = {
+ /**
+ * Delete the record.
+ *
+ * @return {Object}
+ */
+
+ async delete(ctx) {
+ const entity = await strapi.services.restaurant.delete();
+ return sanitizeEntity(entity, { model: strapi.models.restaurant });
+ },
+};
+```
+
+:::
+
+::::
+
## Custom controllers
You can also create custom controllers to build your own business logic and API endpoints.
diff --git a/docs/v3.x/concepts/customization.md b/docs/v3.x/concepts/customization.md
index 21214acaf1..0685606b95 100644
--- a/docs/v3.x/concepts/customization.md
+++ b/docs/v3.x/concepts/customization.md
@@ -16,6 +16,10 @@ Extensions folder structure:
- `controllers`: You can extend the plugin's controllers by creating controllers with the same names and override certain methods.
- `services`: You can extend the plugin's services by creating services with the same names and override certain methods.
+::: warning
+When using **extensions** you will need to update your code whenever you upgrade your strapi version. Not updating and comparing your **extensions** with the new changes on the repository, can break your app in unexpected ways that we cannot predict in the [migration guides](../migration-guide/README.md).
+:::
+
## Admin extension
The admin panel is a `node_module` that is similar to a plugin, with the slight difference that it encapsulates all the installed plugins of your application.
diff --git a/docs/v3.x/concepts/middlewares.md b/docs/v3.x/concepts/middlewares.md
index ffabd4d6d7..fcb7ed4ad1 100644
--- a/docs/v3.x/concepts/middlewares.md
+++ b/docs/v3.x/concepts/middlewares.md
@@ -79,6 +79,46 @@ By default this file doesn't exist, you will have to create it.
- `{middlewareName}` (Object): Configuration of one middleware
- `enabled` (boolean): Tells Strapi to run the middleware or not
+### Settings
+
+**Example**:
+
+**Path —** `./config/middleware.js`.
+
+```js
+module.exports = {
+ //...
+ settings: {
+ cors: {
+ origin: 'http://localhost',
+ },
+ },
+};
+```
+
+### Load order
+
+The middlewares are injected into the Koa stack asynchronously. Sometimes it happens that some of these middlewares need to be loaded in a specific order. To define a load order, create or edit the file `./config/middleware.js`.
+
+**Path —** `./config/middleware.js`.
+
+```js
+module.exports = {
+ load: {
+ before: ['responseTime', 'logger', 'cors', 'responses'],
+ order: [
+ "Define the middlewares' load order by putting their name in this array in the right order",
+ ],
+ after: ['parser', 'router'],
+ },
+};
+```
+
+- `load`:
+ - `before`: Array of middlewares that need to be loaded in the first place. The order of this array matters.
+ - `order`: Array of middlewares that need to be loaded in a specific order.
+ - `after`: Array of middlewares that need to be loaded at the end of the stack. The order of this array matters.
+
## Core middleware configurations
The core of Strapi embraces a small list of middlewares for performances, security and great error handling.
@@ -139,7 +179,7 @@ The following middlewares cannot be disabled: responses, router, logger and boom
The session doesn't work with `mongo` as a client. The package that we should use is broken for now.
:::
-## Response middlewares
+### Response middlewares
- [`gzip`](https://en.wikipedia.org/wiki/Gzip)
- `enabled` (boolean): Enable or not GZIP response compression.
@@ -178,45 +218,7 @@ The session doesn't work with `mongo` as a client. The package that we should us
- `whiteList` (array): Whitelisted IPs. Default value: `[]`.
- `blackList` (array): Blacklisted IPs. Default value: `[]`.
-**Example**:
-
-**Path —** `./config/middleware.js`.
-
-```js
-module.exports = {
- //...
- settings: {
- cors: {
- origin: 'http://localhost',
- },
- },
-};
-```
-
-### Load order
-
-The middlewares are injected into the Koa stack asynchronously. Sometimes it happens that some of these middlewares need to be loaded in a specific order. To define a load order, create or edit the file `./config/middleware.js`.
-
-**Path —** `./config/middleware.js`.
-
-```js
-module.exports = {
- load: {
- before: ['responseTime', 'logger', 'cors', 'responses'],
- order: [
- "Define the middlewares' load order by putting their name in this array in the right order",
- ],
- after: ['parser', 'router'],
- },
-};
-```
-
-- `load`:
- - `before`: Array of middlewares that need to be loaded in the first place. The order of this array matters.
- - `order`: Array of middlewares that need to be loaded in a specific order.
- - `after`: Array of middlewares that need to be loaded at the end of the stack. The order of this array matters.
-
-### Examples
+## Example
Create your custom middleware.
diff --git a/docs/v3.x/concepts/models.md b/docs/v3.x/concepts/models.md
index 6fc8263713..7e9901e7db 100644
--- a/docs/v3.x/concepts/models.md
+++ b/docs/v3.x/concepts/models.md
@@ -796,7 +796,7 @@ xhr.send(
## Dynamic Zone
-Dynamic Zone field let your create flexible space to content based on a component list.
+Dynamic Zone fields let you create a flexible space, in which to compose content, based on a mixed list of components.
#### Example
diff --git a/docs/v3.x/concepts/services.md b/docs/v3.x/concepts/services.md
index 2484334be1..c570ee054c 100644
--- a/docs/v3.x/concepts/services.md
+++ b/docs/v3.x/concepts/services.md
@@ -19,6 +19,8 @@ You can read about `strapi.query` calls [here](./queries.md).
In the following example your controller, service and model are named `restaurant`.
:::
+#### Collection Type
+
:::: tabs
::: tab find
@@ -277,6 +279,102 @@ module.exports = {
::::
+#### Single Type
+
+:::: tabs
+
+::: tab find
+
+#### `find`
+
+```js
+const _ = require('lodash');
+
+module.exports = {
+ /**
+ * Promise to fetch the record
+ *
+ * @return {Promise}
+ */
+ async find(populate) {
+ const results = await strapi.query('restaurant').find({ _limit: 1 }, populate);
+ return _.first(results) || null;
+ },
+};
+```
+
+- `populate` (array): you have to mention data you want populate `["author", "author.name", "comment", "comment.content"]`
+
+:::
+
+::: tab createOrUpdate
+
+#### `createOrUpdate`
+
+```js
+const _ = require('lodash');
+
+module.exports = {
+ /**
+ * Promise to add/update the record
+ *
+ * @return {Promise}
+ */
+
+ async createOrUpdate(data, { files } = {}) {
+ const results = await strapi.query('restaurant').find({ _limit: 1 });
+ const entity = _.first(results) || null;
+
+ let entry;
+ if (!entity) {
+ entry = await strapi.query('restaurant').create(data);
+ } else {
+ entry = await strapi.query('restaurant').update({ id: entity.id }, data);
+ }
+
+ if (files) {
+ // automatically uploads the files based on the entry and the model
+ await strapi.entityService.uploadFiles(entry, files, {
+ model: 'restaurant',
+ // if you are using a plugin's model you will have to add the `plugin` key (plugin: 'users-permissions')
+ });
+ return this.findOne({ id: entry.id });
+ }
+
+ return entry;
+ },
+};
+```
+
+:::
+
+::: tab delete
+
+#### `delete`
+
+```js
+module.exports = {
+ /**
+ * Promise to delete a record
+ *
+ * @return {Promise}
+ */
+
+ delete() {
+ const results = await strapi.query('restaurant').find({ _limit: 1 });
+ const entity = _.first(results) || null;
+
+ if (!entity) return;
+
+ return strapi.query('restaurant').delete({id: entity.id});
+ },
+};
+```
+
+:::
+
+::::
+
## Custom services
You can also create custom services to build your own business logic.
diff --git a/docs/v3.x/content-api/api-endpoints.md b/docs/v3.x/content-api/api-endpoints.md
index 752c8b13f9..c6767cc96c 100644
--- a/docs/v3.x/content-api/api-endpoints.md
+++ b/docs/v3.x/content-api/api-endpoints.md
@@ -144,7 +144,9 @@ Here is the list of endpoints generated for each of your **Content Types**.
::::
-### Here are some Content Type examples
+### Examples
+
+Here are some Content Type examples
#### Single Types
@@ -289,12 +291,20 @@ Here is the list of endpoints generated for each of your **Content Types**.
Returns entries matching the query filters. You can read more about parameters [here](./parameters.md).
+:::: tabs
+
+::: tab Request
+
**Example request**
```js
GET http://localhost:1337/restaurants
```
+:::
+
+::: tab Response
+
**Example response**
```json
@@ -356,16 +366,28 @@ GET http://localhost:1337/restaurants
]
```
+:::
+
+::::
+
## Get an entry
Returns an entry by id.
+:::: tabs
+
+::: tab Request
+
**Example request**
```js
GET http://localhost:1337/restaurants/1
```
+:::
+
+::: tab Response
+
**Example response**
```json
@@ -425,26 +447,46 @@ GET http://localhost:1337/restaurants/1
}
```
+:::
+
+::::
+
## Count entries
Returns the count of entries matching the query filters. You can read more about parameters [here](./parameters.md).
+:::: tabs
+
+::: tab Request
+
**Example request**
```js
GET http://localhost:1337/restaurants/count
```
+:::
+
+::: tab Response
+
**Example response**
```
1
```
+:::
+
+::::
+
## Create an entry
Creates an entry and returns its value.
+:::: tabs
+
+::: tab Request
+
**Example request**
```js
@@ -478,6 +520,10 @@ POST http://localhost:1337/restaurants
}
```
+:::
+
+::: tab Response
+
**Example response**
```json
@@ -537,11 +583,19 @@ POST http://localhost:1337/restaurants
}
```
+:::
+
+::::
+
## Update an entry
Partially updates an entry by id and returns its value.
Fields that aren't sent in the query are not changed in the db. Send a `null` value if you want to clear them.
+:::: tabs
+
+::: tab Request
+
**Example request**
```js
@@ -584,6 +638,10 @@ PUT http://localhost:1337/restaurants/1
}
```
+:::
+
+::: tab Response
+
**Example response**
```json
@@ -649,16 +707,28 @@ PUT http://localhost:1337/restaurants/1
}
```
+:::
+
+::::
+
## Delete an entry
Deletes an entry by id and returns its value.
+:::: tabs
+
+::: tab Request
+
**Example request**
```js
DELETE http://localhost:1337/restaurants/1
```
+:::
+
+::: tab Response
+
**Example response**
```json
@@ -724,6 +794,6 @@ DELETE http://localhost:1337/restaurants/1
}
```
-::: tip
-Whether you are using MongoDB or a SQL database you can use the field `id` as described in this documentation. It will be provided in both cases and work the same way.
:::
+
+::::
diff --git a/docs/v3.x/content-api/parameters.md b/docs/v3.x/content-api/parameters.md
index 0663258fe5..45a3cdecf5 100644
--- a/docs/v3.x/content-api/parameters.md
+++ b/docs/v3.x/content-api/parameters.md
@@ -60,20 +60,20 @@ or
`GET /restaurants?_where[0][price_gte]=3&[0][price_lte]=7`
-## Complexe queries
+## Complex queries
::: tip NOTE
`OR` and `AND` operations are availabled starting from v3.1.0
:::
-When building more complexe queries you must use the `_where` query parameter in combination with the [`qs`](https://github.com/ljharb/qs) library.
+When building more complex queries you must use the `_where` query parameter in combination with the [`qs`](https://github.com/ljharb/qs) library.
-We are taking advantage of the capability of `qs` to parse nested objects to create more complexe queries.
+We are taking advantage of the capability of `qs` to parse nested objects to create more complex queries.
-This will give you full power to create complexe queries with logical `AND` and `OR` operations.
+This will give you full power to create complex queries with logical `AND` and `OR` operations.
::: tip NOTE
-We strongly recommend using `qs` directly to generate complexe queries instead of creating them manually.
+We strongly recommend using `qs` directly to generate complex queries instead of creating them manually.
:::
### `AND` operator
@@ -212,7 +212,7 @@ To achieve this, there are three options:
:::
::: warning
-This feature isn't available for the `upload` plugin.
+This feature isn't available for **polymorphic** relations. This relation type is used in `media`, `component` and `dynamic zone` fields.
:::
## Sort
diff --git a/docs/v3.x/getting-started/contributing.md b/docs/v3.x/getting-started/contributing.md
index fc819853a8..8e064b2adf 100644
--- a/docs/v3.x/getting-started/contributing.md
+++ b/docs/v3.x/getting-started/contributing.md
@@ -1,4 +1,4 @@
-# 🦸 Contributing
+# Contributing
Strapi is a community oriented project and we really appreciate every contribution made by the community: feature requests, bug reports, and especially pull requests! If you have any questions please reach out the [Core team](https://strapi.io/company) on [Slack](https://slack.strapi.io).
diff --git a/docs/v3.x/getting-started/installation.md b/docs/v3.x/getting-started/installation.md
index cfad1f522a..74ce7dab06 100644
--- a/docs/v3.x/getting-started/installation.md
+++ b/docs/v3.x/getting-started/installation.md
@@ -1,6 +1,12 @@
-# ⚙️ Installation
+# Installation
-### Installation guides
+Strapi gives you many possible installation options for your project or application. Strapi can be installed on your computer or services such as DigitalOcean, Amazon AWS, or Platform.sh. The following documentation covers many different options to install Strapi and getting started on using it.
+
+::: tip
+For a more detailed overview of deployment please see the [related documentation](./deployment.md).
+:::
+
+## Installation guides
@@ -49,7 +55,3 @@
-
-### Deployment guides
-
-For a more detailed overview of deployment please see the [related documentation](./deployment.md).
diff --git a/docs/v3.x/getting-started/introduction.md b/docs/v3.x/getting-started/introduction.md
index 2142c821b0..a1a581efbb 100644
--- a/docs/v3.x/getting-started/introduction.md
+++ b/docs/v3.x/getting-started/introduction.md
@@ -1,4 +1,4 @@
-# 🚀 Welcome to the Strapi documentation!
+# Welcome to the Strapi documentation!
**Strapi is the open-source [Headless CMS](https://strapi.io) developers love.**
@@ -62,7 +62,7 @@ To help you get started with Strapi, we and the community have provided you with
### Demo
-Want to see Strapi in action? check out the [demo video](https://strapi.io/demo) or request a live demo via the form present on the page.
+Want to see Strapi in action? check out the [demo video](https://youtu.be/zd0_S_FPzKg) or request a [live demo](https://strapi.io/demo) via the form present on the page.
### Blog
diff --git a/docs/v3.x/getting-started/quick-start-tutorial.md b/docs/v3.x/getting-started/quick-start-tutorial.md
deleted file mode 100644
index 355756c9fe..0000000000
--- a/docs/v3.x/getting-started/quick-start-tutorial.md
+++ /dev/null
@@ -1,640 +0,0 @@
-# Tutorial
-
-This **tutorial** is written for developers to **teach and explain** a step-by-step introduction to Strapi. (The [Quick Start Guide](quick-start.md) is a more concise **How-to** version.) This tutorial takes you through the beginning steps of how you start a project like **"FoodAdvisor"** ([Github](https://github.com/strapi/foodadvisor/))([Demo](https://foodadvisor.strapi.io/)).
-
-You get a good overview of the features found in Strapi that developers love.
-
-
-
-By following this tutorial, you install and create your first Strapi project.
-
-::: tip NOTE
-
-You need to have **_Node.js and npm_** installed on your system before following these steps. If you do not have Node.js and npm installed (or are not sure), please visit our [installation requirements](../installation/cli.md).
-
-:::
-
-**Table of Contents**
-
-[[toc]]
-
-## 1. Install Strapi and create a project
-
-Navigate to your parent `Projects/` directory from your command line.
-
-::: tip NOTE
-
-In this tutorial, the example assumes a **Projects** folder on your **Desktop**. However, this is not required, and you may put your project where you want.
-
-:::
-
-**Path —** `~/Desktop/Projects/`
-
-Use **only one** of the following commands to create a new Strapi project
-
-:::: tabs
-
-::: tab yarn
-
-Use **yarn** to install the Strapi project (**recommended**). [Install yarn with these docs](https://yarnpkg.com/lang/en/docs/install/)
-
-```bash
-yarn create strapi-app my-project --quickstart
-```
-
-:::
-
-::: tab npx
-
-Use **npm/npx** to install the Strapi project
-
-```bash
-npx create-strapi-app my-project --quickstart
-```
-
-:::
-
-::::
-
-The command creates a Strapi project `my-project/` folder within your parent `Projects/` directory.
-
-::: tip NOTE
-
-When you create a new Quick Start(`--quickstart`) project, Strapi downloads the node modules and the Strapi files needed. Using `--quickstart` automatically completes an **additional** step of **building the administration panel** for Strapi and then **starting** Strapi for you. This opens the browser for you and brings you to the [Welcome](http://localhost:1337/admin/plugins/users-permissions/auth/register) page.
-
-You can replace the `my-project` name with any name you want. E.g., `yarn create strapi-app my-foodadvisor-project --quickstart` creates a folder `./Projects/my-foodadvisor-project`.
-
-:::
-
-You see something like this. The output below indicates that your Strapi project is being downloaded and installed.
-
-```bash
-yarn create v1.17.3
-[1/4] 🔍 Resolving packages...
-[2/4] 🚚 Fetching packages...
-[3/4] 🔗 Linking dependencies...
-[4/4] 🔨 Building fresh packages...
-success Installed "create-strapi-app@3.0.0" with binaries:
- - create-strapi-app
-[#####################################################################] 71/71Creating a new Strapi application at /Users/paulbocuse/Desktop/Projects/my-project.
-
-Creating a quickstart project.
-Creating files.
-Dependencies installed successfully.
-
-Your application was created at /Users/paulbocuse/Desktop/Projects/my-project.
-
-Available commands in your project:
-
- yarn develop
- Start Strapi in watch mode.
-
- yarn start
- Start Strapi without watch mode.
-
- yarn build
- Build Strapi admin panel.
-
- yarn strapi
- Display all available commands.
-
-You can start by doing:
-
- cd /Users/paulbocuse/Desktop/Projects/my-project
- yarn develop
-
-Running your Strapi application.
-
-```
-
-Next, you notice the following that builds your Strapi administration panel and automatically starts up Strapi:
-
-```bash
-> my-project@0.1.0 develop /Users/paulbocuse/Desktop/Projects/my-project
-> strapi develop
-
-Building your admin UI with development configuration ...
-
-✔ Webpack
- Compiled successfully in 52.21s
-
-[2019-07-30T15:21:17.698Z] info File created: /Users/paulbocuse/Desktop/Projects/my-project/extensions/users-permissions/config/jwt.json
-[2019-07-30T15:21:17.701Z] info The server is restarting
-
-[2019-07-30T15:21:19.037Z] info Time: Tue Jul 30 2019 17:21:19 GMT+0200 (Central European Summer Time)
-[2019-07-30T15:21:19.037Z] info Launched in: 910 ms
-[2019-07-30T15:21:19.038Z] info Environment: development
-[2019-07-30T15:21:19.038Z] info Process PID: 70615
-[2019-07-30T15:21:19.038Z] info Version: 3.0.0 (node v10.16.0)
-[2019-07-30T15:21:19.038Z] info To shut down your server, press + C at any time
-
-[2019-07-30T15:21:19.038Z] info ☄️ Admin panel: http://localhost:1337/admin
-[2019-07-30T15:21:19.039Z] info ⚡️ Server: http://localhost:1337
-
-```
-
-
-
-::: tip NOTE
-Using the `--quickstart` flag installs Strapi using an [SQLite](https://www.sqlite.org/index.html) database. You may, at any time, leave off the **--flag**, but you need to follow a few configuration steps for your database choice. **You need to have your database choice installed and running locally before creating your project.**
-
-If you would like to use **MongoDB** in production, you need to [install, run, and use MongoDB to develop your Strapi project (in development)](../guides/databases.md#mongodb-installation).
-:::
-
-You are now ready to create a new **Administrator** and new front-end **User**.
-
-## 2. Create an Administrator and front-end User
-
-The first step is to create an **Administrator** (or "root user") for your project. An **Administrator** has all administrator privileges and access rights. (You can read more about why **Administrators** and front-end **Users** are separate [here](https://strapi.io/blog/why-we-split-the-management-of-the-admin-users-and-end-users/).)
-
-You need to complete the following fields:
-
-- **Username**, create a username for login access to your project, e.g. `paulbocuse`.
-- **Password**, create a unique password for logging into your project.
-- **Email address**, this is used for recovery.
-- Check **Receive news**, this is optional but **recommended**.
-- Click the **Ready to Start** button.
-
-
-
-After your **Administrator** registration is complete, you see the Strapi _Administration Dashboard_:
-
-
-
-**Administrators** and front-end **Users** are separate roles.
-
-**A.** An **Administrator** has access and rights to the Administration Dashboard (or backend) of Strapi. **Administrators** can, for example, add content, add plugins, and upload images.
-
-**B.** A front-end **User** is someone who interacts with your project through the front-end. A front-end **User** can, for example, be an "Author" of an article, make a purchase, has an account, leaves a review, or leaves a comment.
-
-Up until this point, you have created an **Administrator**, and so you next want to create a front-end **User**.
-
-::: tip NOTE
-
-It is not necessary to always create a front-end **User** for your **Administrators**; in this case, the **Administrator** is also a front-end **User** as an "Author" of content in the application.
-
-:::
-
-- Click on `Users` located under **COLLECTION TYPES** in the left-hand menu.
-- Click the blue **+ Add New User** button in the top right corner.
-- Next, complete the `Username`, `Email`, and `Password` fields.
-- Select `ON` for the **Confirmed** toggle field.
-- To the right, under **Role**, select `Authenticated`.
-- Save the new user by clicking the blue **Save** button (top right).
-
-
-
-You are now ready to create your first **Collection Type**.
-
-## 3. Create a new Collection Type called "Restaurant"
-
-A **Content Type** can be considered a sort of _blueprint_ for the data created. In other words, a **Content Type** is the schema of the data structure.
-
-Both **Collection Type** and **Single Type** are types of **Content Type**. **Collection Type** is used for content that repeats such as restaurants, or blog posts (hence "collection"). **Single Type** is used to manage content that will have only one instance - for example, your menu, a static page, or a footer.
-
-**Content Type** can hold data represented by fields. For example, a **Collection Type** called `Restaurant` may be intended to display information regarding restaurants. A `restaurant` **Collection Type** could have fields that include a `name`, the main `image`, and a `description` - _at a minimum_. However, a `restaurant` could also have a `category` or multiple `categories`, and a `restaurant` could perhaps need to show `hoursofoperation`.
-
-The next section guides you through the steps needed for each of these above **Content Type** fields.
-
-::: tip NOTE
-
-Additional **Restaurant** themed **Content Types** and fields can be seen in the [FoodAdvisor demo site](https://foodadvisor.strapi.io/).
-
-:::
-
-### The Restaurant Content Type
-
-Go to the **Content Type Builder** plugin, located in the left menu: Under **PLUGINS** -> **Content Type Builder**
-
-You are now able to see the three available **Content Types**. At this point, three Content Types are available `Permission`, `Role`, and `Users`.
-
-
-
-You need to create a new **Content Type** for `Restaurants`.
-
-1. Complete these steps to **Add a Restaurant Content Type**.
-
-- Click the `+ Create new collection type` link (under existing **CONTENT TYPES**).
-- Enter a **Name** for your new **Content Type** (call this `restaurant`).
-- Click the `Continue` button.
-
-
-
-::: tip NOTE
-
-The Content Type **Name** is always **singular**. For example, `restaurant` not `restaurants`.
-
-:::
-
-2. You are now at the **Field Selection** panel.
-
-You may add your first field, a **Text** field for the **Restaurant** name.
-
-
-
-- Click on the `Text` field.
-- In the **Name** field, type `name`.
-
-
-
-- Click on the `ADVANCED SETTINGS` tab.
-- Check the `Required field` checkbox.
-- Check the `Unique field` checkbox.
-
-
-
-- Click the `+ Add another field` button.
-
-You are now ready to add the second field, a **Rich Text** field for the **Restaurant** description.
-
-
-
-- Click the `Rich Text` field.
-
-- In the **Name** field, type `description`.
-
-
-
-- Click the `+ Add another field` button.
-
-You are now ready to add the third field, a **Media** field for the **Restaurant** thumbnail image.
-
-
-
-- Click the `Media` field.
-
-- In the **Name** field, type `image`.
-
-
-
-- Click on the **ADVANCED SETTINGS** tab.
-- Check the `Required field` checkbox.
-
-
-
-- Click the `Finish` button.
-
-Your new Content Type called **Restaurant** is ready to be **Saved**.
-
-
-
-- Click the `Save` button.
-
-- Wait for Strapi to restart.
-
-
-
-After Strapi has restarted, you are ready to continue to create the `Category` **Content Type**.
-
-## 4. Create a new Content Type called "Category"
-
-### The Category Content Type
-
-The `Category` **Content Type** will have a **Text** field named `category`, and a **Relation field** with a **Many to Many** relationship.
-
-
-
-1. Complete these steps to **add a Category Content Type**.
-
-- Click the `+ Create new collection type` link.
-- Enter a **Name** for your new **Content Type** (call this `category`).
-
-
-
-- Click the `Continue` button.
-
-2. Now, you are ready to add fields to your **Category**.
-
-
-
-- Click on the `Text` field.
-- In the **Name** field, type `name`.
-
-
-
-- Click on the `ADVANCED SETTINGS` tab.
-- Check the `Required field` checkbox.
-- Check the `Unique field` checkbox.
-
-
-
-- Click the `+ Add another field` button.
-
-You are now ready to add the second field, a **Relation** field for creating a **Many to Many** relationship between the **Category** and **Restaurant** Content Types.
-
-- Click on the `Relation` field.
-
-
-
-This brings you to the **Add New Relation** screen.
-
-
-
-- Click on the _right dropdown_ with `Permission (Users-Permissions)` and change it to `Restaurant`.
-
-
-
-- Click the `Many to Many` icon (from the middle icon choices). It should now read, **"Categories has and belongs to many Restaurants"**.
-
-
-
-- Click the `Finish` button.
-
-
-
-- Click the `Save` button.
-
-- Wait for Strapi to restart.
-
-
-
-After Strapi has restarted, you are ready to create a `Component` called **"Hours of Operations"**.
-
-## 5. Create a new Component called, "Hours of Operation"
-
-### The Hours of Operation Component
-
-The `Restaurant` Content Type has a **Component** field named `hours_of_operation`. This Component is **Repeatable** and for displaying the **Opening hours** and **Closing hours** of a **Restaurant**.
-
-1. Complete these steps to **add a new Component**.
-
-- Click the `+ Create new component` link to add a new **Component**.
-- Enter a **Name** for your new **Component** (call this `hours_of_operation`).
-- Select the icon of your choice.
-- Create a new category for your **Component** (call it `hours`).
-
-
-
-- Click the `continue` button.
-
-2. Now, you are ready to add fields to your **Component**.
-
-
-
-- Click on the `Text` field.
-- In the **Name** field, type `day_interval`. This is to enter the **Day (or Days)** with **Hours of Operation**.
-
-
-
-- Click on the `ADVANCED SETTINGS` tab.
-- Check the `Required field` checkbox.
-
-
-
-- Click the `+ Add another field`.
-
-You are now ready to add a second field, another **Text** field for the **Opening Hours**.
-
-
-
-- Click on the `Text` field.
-- In the **Name** field, type `opening_hours`.
-
-
-
-- Click the `+ Add another field` button.
-
-You are now ready to add a third field, another **Text** field for the **Closing Hours**.
-
-
-
-- Click on the `Text` field.
-- In the **Name** field, type `closing_hours`.
-
-
-
-- Click the `Finish` button.
-
-
-
-- Click the `Save` button.
-- Wait for Strapi to restart.
-
-
-
-After Strapi has restarted, you are ready to assign this **Hours_of_operation** Component to the **Restaurant** Content Type.
-
-::: tip NOTE
-
-It would be possible to assign the **Hours_of_operation** Component to another **Content Type**, let's say, a **Cafe** Content Type. You have the option to reuse this component across your application.
-
-:::
-
-3. Next, you need to assign the **Hours_of_operation** Component to the **Restaurant** Content Type.
-
-To access the **Hours_of_operation** Component from within the **Restaurant** Content Type, you need to **edit** the **Restaurant** Content Type in the **Content Type Builder**.
-
-- If needed, navigate back to the **Content Type Builder**.
-
-
-
-- Click on the `Restaurant` Content Type, under **CONTENT TYPES**.
-
-
-
-- Click on the `+ Add another field` button to add the **Component**
-
-
-
-- Click on the `Component` field.
-- Select `Use an existing component` option.
-- Click on the `Select a component` button.
-
-
-
-- Ensure `hours_of_operation` is displayed in the **Select a component** dropdown.
-- Provide a **name** for this component in the **Restaurant** Content Type. E.g. `restaurant_hours`
-- Select the `Repeatable component` option.
-
-
-
-- Click on the `ADVANCED SETTINGS` tab.
-- Check the `Required field` checkbox.
-
-
-
-- Click the `Finish` button.
-
-
-
-- Click the `Save` button.
-
-- Wait for Strapi to restart.
-
-
-
-After Strapi has restarted, you are ready to continue to the next section where you customize the user-interface of your **Restaurant** Content Type.
-
-4. Next, you will edit the **View Settings** for the new **Hoursofoperation Component** from within the **Content Manager**.
-
-You can _drag and drop_ fields into a different layout and _rename the labels_. This are two examples of how you can customize the user interface for your **Content Types**.
-
-- Click on the `Configure the view`, button.
-
-
-
-- Click on the `Set the component's layout`.
-
-
-
-- Rearrange the fields and make them more user friendly. Grab the `opening_hours` and slide it next to `closing_hours`.
-
-
-
-Next, you will change the **field labels** to make them easier to understand.
-
-- Click on the `day_interval` field.
-- Edit the **Label** to read, `Day (or Days)`.
-- Add a **Description**, `You can type in one day or a series of days to complete this field. E.g. "Tuesday" or "Tues - Wed"`.
-
-
-
-- Click on the `opening_hours` field.
-- Edit the **Label** to read, `Opening Hours`.
-
-
-
-- Click on `closing_hours` field.
-- Edit the **Label** to read, `Closing Hours`.
-
-
-
-- Click the `Save` button, and then the `Confirm` button to save your settings.
-
-Your settings have now saved.
-
-Whenever anyone enters in information for a **Restaurant**, the entry form is cleared. With Strapi you can modify these and more settings to provide the best experience possible.
-
-You are ready to start inputting actual content.
-
-## 6. Manage and add content to a "Restaurant" Content Type
-
-You are now ready to add some **Restaurants** and **Categories**.
-
-1. You are now going to enter a new **Restaurant**.
-
-- Navigate to and click on the `Restaurants`, under **CONTENT TYPES** in the left-hand menu.
-
-
-
-- Next, click on the **+ Add new Restaurant** button (in the top right corner).
-- Enter in the following information for your first **Restaurant** called **Biscotte Restaurant**.
- - In the **Name** field, enter `Biscotte Restaurant`.
- - In the **Description** field, enter `Welcome to Biscotte restaurant! Restaurant Biscotte offers a cuisine based on fresh, quality products, often local, organic when possible, and always produced by passionate producers.`.
- - Upload an **Image** to represent the **Restaurant**.
-
-**Note:** At this point, you would generally select the **Categories** for this **Restaurant**. You have not entered any **Categories**, so you do this step after entering this first **Restaurant**.
-
-
-
-- Next scroll down to **RestaurantHours|(0)** and click the `+ ADD NEW ENTRY` button.
- - In the **Create an Entry** section, enter the following details.
- - In the **Day (or Days)** field, enter `Sun - Mon`.
- - In the **Opening Hours** field, enter `Closed`.
- - **Skip** the **Closing Hours** field, as this **Restaurant** is closed all day.
- - Click the `+ ADD NEW ENTRY` button to create another new entry.
- - In the **Day (or Days)** field, enter `Tues - Fri`.
- - In the **Opening Hours** field, enter `12:00`.
- - In the **Closing Hours** field, enter `22:30`.
- - Click the `+ ADD NEW ENTRY` button to create the last entry.
- - In the **Day (or Days)** field, enter `Sat`.
- - In the **Opening Hours** field, enter `11:30`.
- - In the **Closing Hours** field, enter `16:00`.
-
-You have now entered in all the information necessary for your first **Restaurant**.
-
-
-
-- **Scroll up** and click the `Save` button.
-
-Next, you need to enter in some **Categories** that can relate to the above and other **Restaurants**.
-
-- Navigate to and click on `Categories`, under **CONTENT TYPES** in the left-hand menu.
-
-
-
-You are going to enter two **Categories**, but you could add as many **Categories** as you need. Later, you can add additional **Categories** and assign them to existing and new **Restaurants**.
-
-- Click on the `+ Add New Category` button.
- - In the **Name** field, enter `French food`.
- - In the **Restaurants(0)** dropdown, select `Biscotte Restaurant`.
-
-
-
-- Click the `Save` button.
-
-You now enter your second **Category**.
-
-- Click on the `+ Add New Category` button.
- - In the **Name** field, enter `Brunch`.
- - In the **Restaurants(0)** dropdown, select `Biscotte Restaurant`.
-
-
-
-- Click the `Save` button.
-
-You have now entered your first **Restaurant** Content Type. You have also assigned two **Categories** to this **Restaurant**. Your next step is to set the **Roles and Permissions**.
-
-## 7. Set Roles and Permissions
-
-By default, Strapi publishes all **Content Types** with restricted permissions. Which means you have to explicitly give permissions to each **Content Type** you create. You are going to give **Public** API (or URL) access to both the **Restaurant** Content Type and **Category** Content Type.
-
-- Click on the `Roles & Permissions` menu item, under **PLUGINS** in the left-hand-menu.
-
-
-
-- Next, click on the **Public** Role.
-
-
-
-- Next, scroll down under **Permissions** and locate the **Restaurant** and **Category** Content Types.
-- Click the checkbox for **find** and **findone** in the **Restaurant** Content Type.
-- Click the checkbox for **find** and **findone** in the **Category** Content Type.
-
-
-
-- Scroll back to the top, and click the **Save** button.
-
-You have now opened the API and are ready to consume the content.
-
-## 8. Consume the Content Type API
-
-Each of your **Content Types** are accessible by following their automatically generated routes.
-
-Both your **Restaurant** and **Category** Content Types can now be accessed.
-
-- In your browser, follow `http://localhost:1337/restaurants` to return the data for the allowed **Find** value of your **Restaurant** Content Type
-
-
-
-- In your browser, follow `http://localhost:1337/categories` to return the data for the allowed **Find** value of your **Category** Content Type.
-
-
-
-::: tip NOTE
-
-If you have incorrectly (or not at all) set the permissions of your content type, you get a **"403"** permission error. See the below example.
-
-Forbidden Access Looks like this:
-
-
-:::
-
-::: tip NOTE
-
-If you would like to see the route of any specific **Content Type**, you need to navigate to the **Content Type** under the **Roles and Permissions** plugin and click the ⚙️ next to the value. On the right, you see the route:
-
-
-
-:::
-
-::: tip CONGRATULATIONS
-👏 Congratulations, you have now completed the **Strapi Getting Started Tutorial**. Where to go next?
-
-- Learn how to use Strapi with React ([Gatsby](https://strapi.io/blog/building-a-static-website-using-gatsby-and-strapi) or [Next.js](https://strapi.io/blog/strapi-next-setup/)) or Vue.js ([Nuxt.js](https://strapi.io/blog/cooking-a-deliveroo-clone-with-nuxt-vue-js-graphql-strapi-and-stripe-setup-part-1-7/)).
-- Read the **concepts** to deep dive into Strapi.
-- Get help on [Github Discussions](https://github.com/strapi/strapi/discussions).
-- Read the [source code](https://github.com/strapi/strapi), [contribute](https://github.com/strapi/strapi/blob/master/CONTRIBUTING.md) or [give a star](https://github.com/strapi/strapi) on GitHub.
-- Follow us on [Twitter](https://twitter.com/strapijs) to get the latest news.
-- [Join the vibrant and active Strapi community](https://slack.strapi.io) on Slack.
- :::
diff --git a/docs/v3.x/getting-started/quick-start.md b/docs/v3.x/getting-started/quick-start.md
index f1c464f06e..44ec5a39dd 100644
--- a/docs/v3.x/getting-started/quick-start.md
+++ b/docs/v3.x/getting-started/quick-start.md
@@ -1,12 +1,12 @@
# Quick Start Guide
-Get ready to get Strapi up and running in **less than 5 minutes** 🚀.
+Get ready to get Strapi up and running in **less than 3 minutes** 🚀.
-
+
-_For a step-by-step guide, please take a look at the [detailed tutorial](quick-start-tutorial.md)._
+_For a step-by-step guide, please take a look at the following steps. This quickstart is really close to the [FoodAdvisor](https://github.com/strapi/foodadvisor) application._
(Before continuing, please make sure [Node.js and npm are properly installed](../installation/cli.md#step-1-make-sure-requirements-are-met) on your machine. You can [install the Yarn v1.2.0+ package here](https://yarnpkg.com/en/).)
@@ -45,14 +45,14 @@ Navigate to [**PLUGINS** - **Content Type Builder**](http://localhost:1337/admin
- Click the **"+ Create new collection type"** link
- Enter `restaurant`, and click `Continue`
-- A window opens with fields options:
- - Click the **Text** field
- - Type `name` in the **Name** field
- - Click over to the **ADVANCED SETTINGS** tab, and check the `Required field` and the `Unique field`
- - Click the **"+ Add another Field"** button
- - Click the **Rich Text** field
- - Type `description` under the **BASE SETTINGS** tab, in the **Name** field
- - Click `Finish`
+- Click the **"+ Add another Field"** button
+- Click the **Text** field
+- Type `name` in the **Name** field
+- Click over to the **ADVANCED SETTINGS** tab, and check the `Required field` and the `Unique field`
+- Click the **"+ Add another Field"** button
+- Click the **Rich Text** field
+- Type `description` under the **BASE SETTINGS** tab, in the **Name** field
+- Click `Finish`
- Click the **Save** button and wait for Strapi to restart
## 4. Create a Category Content type
@@ -61,15 +61,15 @@ Navigate back to [**PLUGINS** - **Content Type Builder**](http://localhost:1337/
- Click the **"+ Create new collection type"** link
- Enter `category`, and click `Continue`
-- A window opens with fields options:
- - Click the **Text** field
- - Type `name` under the **BASE SETTINGS** tab, in the **Name** field
- - Click over to the **ADVANCED SETTINGS** tab, and check the `Required field` and the `Unique field`
- - Click the **"+ Add another field"** button
- - Click the **Relation** field
- - On the right side, click the **Category** dropdown and select, `Restaurant`
- - In the center, select the icon that represents `many-to-many`. The text should read, `Categories has and belongs to many Restaurants`
- - Click `Finish`
+- Click the **"+ Add another Field"** button
+- Click the **Text** field
+- Type `name` under the **BASE SETTINGS** tab, in the **Name** field
+- Click over to the **ADVANCED SETTINGS** tab, and check the `Required field` and the `Unique field`
+- Click the **"+ Add another field"** button
+- Click the **Relation** field
+- On the right side, click the **Category** dropdown and select, `Restaurant`
+- In the center, select the icon that represents `many-to-many`. The text should read, `Categories has and belongs to many Restaurants`
+- Click `Finish`
- Click the **Save** button and wait for Strapi to restart
## 5. Add content to "Restaurant" Content Type
diff --git a/docs/v3.x/getting-started/troubleshooting.md b/docs/v3.x/getting-started/troubleshooting.md
index 60b7a46a60..a05c0797ca 100644
--- a/docs/v3.x/getting-started/troubleshooting.md
+++ b/docs/v3.x/getting-started/troubleshooting.md
@@ -1,4 +1,4 @@
-# 💬 Troubleshooting
+# Troubleshooting
Below are solutions to some common issues that you may experience when working with Strapi. You can also post questions to [Github Discussions](https://github.com/strapi/strapi/discussions) or reach out to the members of our [Slack](https://slack.strapi.io) community!
@@ -84,7 +84,7 @@ You gain the ability to modify these files without forking the plugin package, h
### Can I add my own 3rd party auth provider
-Yes you can either follow the following [guide](../plugins/users-permissions.md#adding-a-new-provider-to-your-project) or you can take a look at the [users-permissions](https://github.com/strapi/strapi/tree/master/packages/strapi-plugin-users-permissions) and submit a pull request to include the provider for everyone. Eventually Strapi does plan to move from the current grant/purest provider to a split natured system similar to the upload providers.
+Yes, you can either follow the following [guide](../plugins/users-permissions.md#adding-a-new-provider-to-your-project) or you can take a look at the [users-permissions](https://github.com/strapi/strapi/tree/master/packages/strapi-plugin-users-permissions) and submit a pull request to include the provider for everyone. Eventually Strapi does plan to move from the current grant/purest provider to a split natured system similar to the upload providers.
There is currently no ETA on this migration however.
diff --git a/docs/v3.x/global-strapi/usage-information.md b/docs/v3.x/getting-started/usage-information.md
similarity index 100%
rename from docs/v3.x/global-strapi/usage-information.md
rename to docs/v3.x/getting-started/usage-information.md
diff --git a/docs/v3.x/guides/api-token.md b/docs/v3.x/guides/api-token.md
index a0ad14f467..c2785f5343 100644
--- a/docs/v3.x/guides/api-token.md
+++ b/docs/v3.x/guides/api-token.md
@@ -44,6 +44,11 @@ const _ = require('lodash');
module.exports = async (ctx, next) => {
let role;
+ if (ctx.state.user) {
+ // request is already authenticated in a different way
+ return next();
+ }
+
// add the detection of `token` query parameter
if (
(ctx.request && ctx.request.header && ctx.request.header.authorization) ||
diff --git a/docs/v3.x/guides/draft.md b/docs/v3.x/guides/draft.md
index 5971cd3d7d..12df28e4b5 100644
--- a/docs/v3.x/guides/draft.md
+++ b/docs/v3.x/guides/draft.md
@@ -86,7 +86,7 @@ Here we want to force it to fetch articles that have status equal to `published`
The way to do that is to set `ctx.query.status` to `published`.
It will force the filter of the query.
-**Path —** `./api/restaurant/controller/Restaurant.js`
+**Path —** `./api/article/controller/Article.js`
```js
const { sanitizeEntity } = require('strapi-utils');
diff --git a/docs/v3.x/installation/cli.md b/docs/v3.x/installation/cli.md
index 586b5d0ef1..99a6590053 100644
--- a/docs/v3.x/installation/cli.md
+++ b/docs/v3.x/installation/cli.md
@@ -8,7 +8,7 @@ Fast-track local install for getting Strapi running on your computer.
#### Node.js
-Strapi only requires [Node.js](https://nodejs.org). The current recommended version to run strapi is Node v12 (current LTS).
+Strapi only requires [Node.js](https://nodejs.org). The current recommended version to run strapi is **Node v12** (current LTS).
This is everything you need to run Strapi on your local environment.
diff --git a/docs/v3.x/installation/docker.md b/docs/v3.x/installation/docker.md
index c43d22ed75..f081338349 100644
--- a/docs/v3.x/installation/docker.md
+++ b/docs/v3.x/installation/docker.md
@@ -21,7 +21,7 @@ services:
strapi:
image: strapi/strapi
volumes:
- - ./:/srv/app
+ - ./app:/srv/app
ports:
- '1337:1337'
```
@@ -42,22 +42,21 @@ services:
DATABASE_PORT: 5432
DATABASE_USERNAME: strapi
DATABASE_PASSWORD: strapi
- links:
- - postgres:postgres
volumes:
- ./app:/srv/app
ports:
- '1337:1337'
+ depends_on:
+ - postgres
postgres:
image: postgres
environment:
+ POSTGRES_DB: strapi
POSTGRES_USER: strapi
POSTGRES_PASSWORD: strapi
volumes:
- ./data:/var/lib/postgresql/data
- ports:
- - '5432:5432'
```
:::
@@ -76,22 +75,21 @@ services:
DATABASE_PORT: 27017
DATABASE_USERNAME: strapi
DATABASE_PASSWORD: strapi
- links:
- - mongo:mongo
volumes:
- ./app:/srv/app
ports:
- '1337:1337'
+ depends_on:
+ - mongo
mongo:
image: mongo
environment:
+ MONGO_INITDB_DATABASE: strapi
MONGO_INITDB_ROOT_USERNAME: strapi
MONGO_INITDB_ROOT_PASSWORD: strapi
volumes:
- - ./data/db:/data/db
- ports:
- - '27017:27017'
+ - ./data:/data/db
```
:::
diff --git a/docs/v3.x/migration-guide/migration-guide-3.0.x-to-3.1.x.md b/docs/v3.x/migration-guide/migration-guide-3.0.x-to-3.1.x.md
index 36e5f1ade3..9b431e4193 100644
--- a/docs/v3.x/migration-guide/migration-guide-3.0.x-to-3.1.x.md
+++ b/docs/v3.x/migration-guide/migration-guide-3.0.x-to-3.1.x.md
@@ -2,6 +2,12 @@
**Make sure your server is not running until the end of the migration**
+:::warning
+If you are using **extensions** to create custom code or modifying existing code, you will need to update your code and compare your version to the new changes on the repository.
+
+Not updating your **extensions** can break your app in unexpected ways that we cannot predict.
+:::
+
## Summary
[[toc]]
diff --git a/docs/v3.x/plugins/email.md b/docs/v3.x/plugins/email.md
index 06a64844fc..37920ead61 100644
--- a/docs/v3.x/plugins/email.md
+++ b/docs/v3.x/plugins/email.md
@@ -60,9 +60,7 @@ await strapi.plugins.email.services.email.sendTemplatedEmail(
## Configure the plugin
-### Install the provider you want
-
-By default Strapi provides a local email system ([sendmail](https://www.npmjs.com/package/sendmail)). If you want to use a third party to send emails, you need to install the correct provider module. Otherwise you can skip this part and continue to [Configure your provider](#configure-your-provider).
+By default Strapi provides a local email system ([sendmail](https://www.npmjs.com/package/sendmail)). If you want to use a third party to send emails, you need to install the correct provider module. Otherwise you can skip this part and continue to configure your provider.
You can check all the available providers developed by the community on npmjs.org - [Providers list](https://www.npmjs.com/search?q=strapi-provider-email-)
@@ -125,7 +123,7 @@ module.exports = ({ env }) => ({
If you're using a different provider depending on your environment, you can specify the correct configuration in `config/env/${yourEnvironment}/plugins.js`. More info here: [Environments](../concepts/configurations.md#environments)
:::
-## Create new provider
+## Create a provider
If you want to create your own, make sure the name starts with `strapi-provider-email-` (duplicating an existing one will be easier) and customize the `send` function.
diff --git a/docs/v3.x/plugins/upload.md b/docs/v3.x/plugins/upload.md
index fbd6dcbedd..5648bbd75e 100644
--- a/docs/v3.x/plugins/upload.md
+++ b/docs/v3.x/plugins/upload.md
@@ -300,16 +300,26 @@ You can check all the available providers developed by the community on npmjs.or
To install a new provider run:
-```
-$ npm install strapi-provider-upload-aws-s3 --save
-```
+:::: tabs
-or
+::: tab yarn
```
-$ yarn add strapi-provider-upload-aws-s3
+yarn add strapi-provider-upload-aws-s3
```
+:::
+
+::: tab npm
+
+```
+npm install strapi-provider-upload-aws-s3 --save
+```
+
+:::
+
+::::
+
### Using scoped packages as providers
If your package name is [scoped](https://docs.npmjs.com/about-scopes) (for example `@username/strapi-provider-upload-aws2`) you need to take an extra step by aliasing it in `package.json`. Go to the `dependencies` section and change the provider line to look like this:
diff --git a/examples/getstarted/package.json b/examples/getstarted/package.json
index d4e7f1be39..ab5d232115 100644
--- a/examples/getstarted/package.json
+++ b/examples/getstarted/package.json
@@ -1,7 +1,7 @@
{
"name": "getstarted",
"private": true,
- "version": "3.1.1",
+ "version": "3.1.2",
"description": "A Strapi application.",
"scripts": {
"develop": "strapi develop",
@@ -13,26 +13,26 @@
},
"dependencies": {
"knex": "^0.20.0",
- "lodash": "^4.17.5",
+ "lodash": "4.17.19",
"mysql": "^2.17.1",
"pg": "^7.10.0",
"sqlite3": "^4.0.6",
- "strapi": "3.1.1",
- "strapi-admin": "3.1.1",
- "strapi-connector-bookshelf": "3.1.1",
- "strapi-connector-mongoose": "3.1.1",
- "strapi-middleware-views": "3.1.1",
- "strapi-plugin-content-manager": "3.1.1",
- "strapi-plugin-content-type-builder": "3.1.1",
- "strapi-plugin-documentation": "3.1.1",
- "strapi-plugin-email": "3.1.1",
- "strapi-plugin-graphql": "3.1.1",
- "strapi-plugin-upload": "3.1.1",
- "strapi-plugin-users-permissions": "3.1.1",
- "strapi-provider-email-mailgun": "3.1.1",
- "strapi-provider-upload-aws-s3": "3.1.1",
- "strapi-provider-upload-cloudinary": "3.1.1",
- "strapi-utils": "3.1.1"
+ "strapi": "3.1.2",
+ "strapi-admin": "3.1.2",
+ "strapi-connector-bookshelf": "3.1.2",
+ "strapi-connector-mongoose": "3.1.2",
+ "strapi-middleware-views": "3.1.2",
+ "strapi-plugin-content-manager": "3.1.2",
+ "strapi-plugin-content-type-builder": "3.1.2",
+ "strapi-plugin-documentation": "3.1.2",
+ "strapi-plugin-email": "3.1.2",
+ "strapi-plugin-graphql": "3.1.2",
+ "strapi-plugin-upload": "3.1.2",
+ "strapi-plugin-users-permissions": "3.1.2",
+ "strapi-provider-email-mailgun": "3.1.2",
+ "strapi-provider-upload-aws-s3": "3.1.2",
+ "strapi-provider-upload-cloudinary": "3.1.2",
+ "strapi-utils": "3.1.2"
},
"strapi": {
"uuid": "getstarted"
diff --git a/lerna.json b/lerna.json
index eb88b17a04..74c9d1dbe1 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
{
- "version": "3.1.1",
+ "version": "3.1.2",
"packages": [
"packages/*",
"examples/*"
diff --git a/packages/create-strapi-app/package.json b/packages/create-strapi-app/package.json
index 1778be11bc..ca77b5d177 100644
--- a/packages/create-strapi-app/package.json
+++ b/packages/create-strapi-app/package.json
@@ -1,6 +1,6 @@
{
"name": "create-strapi-app",
- "version": "3.1.1",
+ "version": "3.1.2",
"description": "Generate a new Strapi application.",
"license": "SEE LICENSE IN LICENSE",
"homepage": "http://strapi.io",
@@ -21,7 +21,7 @@
],
"dependencies": {
"commander": "^2.20.0",
- "strapi-generate-new": "3.1.1"
+ "strapi-generate-new": "3.1.2"
},
"scripts": {
"test": "echo \"no tests yet\""
diff --git a/packages/strapi-admin/admin/src/containers/Onboarding/StaticLinks/index.js b/packages/strapi-admin/admin/src/containers/Onboarding/StaticLinks/index.js
index b00885986b..49ddcc22d0 100644
--- a/packages/strapi-admin/admin/src/containers/Onboarding/StaticLinks/index.js
+++ b/packages/strapi-admin/admin/src/containers/Onboarding/StaticLinks/index.js
@@ -5,18 +5,23 @@
*/
import React from 'react';
-import { FormattedMessage } from 'react-intl';
+import { useIntl } from 'react-intl';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
-
import StyledLink from './StyledLink';
function StaticLinks() {
+ const { formatMessage } = useIntl();
const staticLinks = [
{
icon: 'book',
- label: 'documentation',
+ label: formatMessage({ id: 'app.components.LeftMenuFooter.documentation' }),
destination: 'https://strapi.io/documentation',
},
+ {
+ icon: 'file',
+ label: formatMessage({ id: 'app.static.links.cheatsheet' }),
+ destination: 'https://strapi-showcase.s3-us-west-2.amazonaws.com/CheatSheet.pdf',
+ }
];
return (
@@ -28,7 +33,7 @@ function StaticLinks() {