From 691a2ac7885eae4b753ffe3ac41722dcee564787 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Wed, 23 Jun 2021 11:26:49 +0200 Subject: [PATCH 01/35] Add consistency --- .../content-api/integrations/11ty.md | 2 +- .../content-api/integrations/angular.md | 2 +- .../content-api/integrations/dart.md | 4 +-- .../content-api/integrations/flutter.md | 4 +-- .../content-api/integrations/gatsby.md | 2 +- .../content-api/integrations/go.md | 4 +-- .../content-api/integrations/graphql.md | 2 +- .../content-api/integrations/gridsome.md | 2 +- .../content-api/integrations/jekyll.md | 2 +- .../content-api/integrations/next-js.md | 2 +- .../content-api/integrations/nuxt-js.md | 2 +- .../content-api/integrations/php.md | 4 +-- .../content-api/integrations/python.md | 2 +- .../content-api/integrations/react.md | 2 +- .../content-api/integrations/ruby.md | 2 +- .../content-api/integrations/sapper.md | 2 +- .../content-api/integrations/svelte.md | 2 +- .../content-api/integrations/vue-js.md | 2 +- .../latest/development/plugins/i18n.md | 24 +++++++++++++ .../setup-deployment-guides/configurations.md | 34 ++++++++++++++++--- .../configurations/databases/mongodb.md | 4 +-- .../setup-deployment-guides/deployment.md | 25 +++++++++++++- .../deployment/hosting-guides/21yunbox.md | 28 +++++++++++++-- .../installation/digitalocean-one-click.md | 21 ++++++++---- .../installation/platformsh.md | 24 +++++++++++++ .../installation/render.md | 24 +++++++++++++ 26 files changed, 190 insertions(+), 38 deletions(-) diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/11ty.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/11ty.md index 90a2a5211c..5909a0236b 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/11ty.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/11ty.md @@ -7,7 +7,7 @@ description: Build powerful applications using Strapi, the leading open-source h This integration guide is following the [Quick Start Guide](/developer-docs/latest/getting-started/quick-start.md). We assume that you have fully completed its "Hands-on" path, and therefore can consume the API by browsing this [url](http://localhost:1337/restaurants). -If you haven't gone through the getting started guide, the way you request a Strapi API with [11ty](https://www.11ty.dev/) remains the same except that you will not fetch the same content. +If you haven't gone through the Quick Start Guide, the way you request a Strapi API with [11ty](https://www.11ty.dev/) remains the same except that you will not fetch the same content. ## Create an 11ty app diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/angular.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/angular.md index 04ecd728d7..a7e3aa82a2 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/angular.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/angular.md @@ -7,7 +7,7 @@ description: Build powerful applications using Strapi, the leading open-source h This integration guide is following the [Quick Start Guide](/developer-docs/latest/getting-started/quick-start.md). We assume that you have fully completed its "Hands-on" path, and therefore can consume the API by browsing this [url](http://localhost:1337/restaurants). -If you haven't gone through the getting started guide, the way you request a Strapi API with [Angular](https://angular.io) remains the same except that you will not fetch the same content. +If you haven't gone through the Quick Start Guide, the way you request a Strapi API with [Angular](https://angular.io) remains the same except that you will not fetch the same content. ## Create a Angular app diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/dart.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/dart.md index b69eeee5d5..7789bcfca4 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/dart.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/dart.md @@ -5,9 +5,9 @@ description: Build powerful applications using Strapi, the leading open-source h # Getting Started with Dart -This integration guide is following the [Getting started guide](/developer-docs/latest/getting-started/quick-start.html). We assume that you have completed [Step 8](/developer-docs/latest/getting-started/quick-start.html#_8-publish-the-content) and therefore can consume the API by browsing this [url](http://localhost:1337/restaurants). +This integration guide is following the [Quick Start Guide](/developer-docs/latest/getting-started/quick-start.md). We assume that you have fully completed its "Hands-on" path, and therefore can consume the API by browsing this [url](http://localhost:1337/restaurants). -If you haven't gone through the getting started guide, the way you request a Strapi API with [Dart](https://dart.dev/) remains the same except that you will not fetch the same content. +If you haven't gone through the Quick Start Guide, the way you request a Strapi API with [Dart](https://dart.dev/) remains the same except that you will not fetch the same content. ## Create a Dart file diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/flutter.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/flutter.md index 4671f7b68d..dd88f08ac2 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/flutter.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/flutter.md @@ -5,9 +5,9 @@ description: Build powerful applications using Strapi, the leading open-source h # Getting Started with Flutter -This integration guide is following the [Getting started guide](/developer-docs/latest/getting-started/quick-start.html). We assume that you have completed [Step 8](/developer-docs/latest/getting-started/quick-start.html#_8-publish-the-content) and therefore can consume the API by browsing this [url](http://localhost:1337/restaurants). +This integration guide is following the [Quick Start Guide](/developer-docs/latest/getting-started/quick-start.md). We assume that you have fully completed its "Hands-on" path, and therefore can consume the API by browsing this [url](http://localhost:1337/restaurants). -If you haven't gone through the getting started guide, the way you request a Strapi API with [Flutter](https://flutter.dev/) remains the same except that you will not fetch the same content. +If you haven't gone through the Quick Start Guide, the way you request a Strapi API with [Flutter](https://flutter.dev/) remains the same except that you will not fetch the same content. ## Create a Flutter application diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/gatsby.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/gatsby.md index 2160c3470c..915dab2a36 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/gatsby.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/gatsby.md @@ -7,7 +7,7 @@ description: Build powerful applications using Strapi, the leading open-source h This integration guide is following the [Quick Start Guide](/developer-docs/latest/getting-started/quick-start.md). We assume that you have fully completed its "Hands-on" path, and therefore can consume the API by browsing this [url](http://localhost:1337/restaurants). -If you haven't gone through the getting started guide, the way you request a Strapi API with [Gatsby](https://www.gatsbyjs.org/) remains the same except that you will not fetch the same content. +If you haven't gone through the Quick Start Guide, the way you request a Strapi API with [Gatsby](https://www.gatsbyjs.org/) remains the same except that you will not fetch the same content. ## Create a Gatsby app diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/go.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/go.md index 732e93460c..cb56b8c11c 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/go.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/go.md @@ -5,9 +5,9 @@ description: Build powerful applications using Strapi, the leading open-source h # Getting Started with GO -This integration guide is following the [Getting started guide](/developer-docs/latest/getting-started/quick-start.md). We assume that you have completed [Step 8](/developer-docs/latest/getting-started/quick-start.html#_8-publish-the-content) and therefore can consume the API by browsing this [url](http://localhost:1337/restaurants). +This integration guide is following the [Quick Start Guide](/developer-docs/latest/getting-started/quick-start.md). We assume that you have fully completed its "Hands-on" path, and therefore can consume the API by browsing this [url](http://localhost:1337/restaurants). -If you haven't gone through the getting started guide, the way you request a Strapi API with [GO](https://golang.org/) remains the same except that you will not fetch the same content. +If you haven't gone through the Quick Start guide, the way you request a Strapi API with [GO](https://golang.org/) remains the same except that you will not fetch the same content. ## Create a Go file diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/graphql.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/graphql.md index 4761bd65e3..5587d87272 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/graphql.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/graphql.md @@ -7,7 +7,7 @@ description: Build powerful applications using Strapi, the leading open-source h This integration guide is following the [Quick Start Guide](/developer-docs/latest/getting-started/quick-start.md). We assume that you have fully completed its "Hands-on" path, and therefore can consume the API by browsing this [url](http://localhost:1337/restaurants). -If you haven't gone through the getting started guide, the way you request a Strapi API with [GraphQL](https://graphql.org/) remains the same except that you will not fetch the same content. +If you haven't gone through the Quick Start Guide, the way you request a Strapi API with [GraphQL](https://graphql.org/) remains the same except that you will not fetch the same content. ## Install the GraphQL plugin diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/gridsome.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/gridsome.md index 317ac16c61..e2adee7461 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/gridsome.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/gridsome.md @@ -7,7 +7,7 @@ description: Build powerful applications using Strapi, the leading open-source h This integration guide is following the [Quick Start Guide](/developer-docs/latest/getting-started/quick-start.md). We assume that you have fully completed its "Hands-on" path, and therefore can consume the API by browsing this [url](http://localhost:1337/restaurants). -If you haven't gone through the getting started guide, the way you request a Strapi API with [Gridsome](https://gridsome.org/) remains the same except that you will not fetch the same content. +If you haven't gone through the Quick Start Guide, the way you request a Strapi API with [Gridsome](https://gridsome.org/) remains the same except that you will not fetch the same content. ## Create a Gridsome app diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/jekyll.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/jekyll.md index 97ba4b5c55..fdf464c649 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/jekyll.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/jekyll.md @@ -7,7 +7,7 @@ description: Build powerful applications using Strapi, the leading open-source h This integration guide is following the [Quick Start Guide](/developer-docs/latest/getting-started/quick-start.md). We assume that you have fully completed its "Hands-on" path, and therefore can consume the API by browsing this [url](http://localhost:1337/restaurants). -If you haven't gone through the getting started guide, the way you request a Strapi API with [Jekyll](https://jekyllrb.com) remains the same except that you will not fetch the same content. +If you haven't gone through the Quick Start Guide, the way you request a Strapi API with [Jekyll](https://jekyllrb.com) remains the same except that you will not fetch the same content. ## Create a Jekyll app diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/next-js.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/next-js.md index 01b55df7db..df27dde5b0 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/next-js.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/next-js.md @@ -7,7 +7,7 @@ description: Build powerful applications using Strapi, the leading open-source h This integration guide is following the [Quick Start Guide](/developer-docs/latest/getting-started/quick-start.md). We assume that you have fully completed its "Hands-on" path, and therefore can consume the API by browsing this [url](http://localhost:1337/restaurants). -If you haven't gone through the getting started guide, the way you request a Strapi API with [Next.js](https://nextjs.org/) remains the same except that you will not fetch the same content. +If you haven't gone through the Quick Start Guide, the way you request a Strapi API with [Next.js](https://nextjs.org/) remains the same except that you will not fetch the same content. ## Create a Next.js app diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/nuxt-js.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/nuxt-js.md index b78670c049..2865dec7c3 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/nuxt-js.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/nuxt-js.md @@ -7,7 +7,7 @@ description: Build powerful applications using Strapi, the leading open-source h This integration guide is following the [Quick Start Guide](/developer-docs/latest/getting-started/quick-start.md). We assume that you have fully completed its "Hands-on" path, and therefore can consume the API by browsing this [url](http://localhost:1337/restaurants). -If you haven't gone through the getting started guide, the way you request a Strapi API with [Nuxt.js](https://nuxtjs.org/) remains the same except that you will not fetch the same content. +If you haven't gone through the Quick Start Guide, the way you request a Strapi API with [Nuxt.js](https://nuxtjs.org/) remains the same except that you will not fetch the same content. ## Create a Nuxt.js app diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/php.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/php.md index a0abc41fc1..e4fe387a0a 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/php.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/php.md @@ -5,9 +5,9 @@ description: Build powerful applications using Strapi, the leading open-source h # Getting Started with PHP -This integration guide is following the [Getting started guide](/developer-docs/latest/getting-started/quick-start.md). We assume that you have completed [Step 8](/developer-docs/latest/getting-started/quick-start.html#_8-publish-the-content) and therefore can consume the API by browsing this [url](http://localhost:1337/restaurants). +This integration guide is following the [Quick Start Guide](/developer-docs/latest/getting-started/quick-start.md). We assume that you have fully completed its "Hands-on" path, and therefore can consume the API by browsing this [url](http://localhost:1337/restaurants). -If you haven't gone through the getting started guide, the way you request a Strapi API with [PHP](https://php.net/) remains the same except that you will not fetch the same content. +If you haven't gone through the Quick Start Guide, the way you request a Strapi API with [PHP](https://php.net/) remains the same except that you will not fetch the same content. ## Create a PHP file diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/python.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/python.md index 2e4c410539..2cb4133e76 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/python.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/python.md @@ -7,7 +7,7 @@ description: Build powerful applications using Strapi, the leading open-source h This integration guide is following the [Quick Start Guide](/developer-docs/latest/getting-started/quick-start.md). We assume that you have fully completed its "Hands-on" path, and therefore can consume the API by browsing this [url](http://localhost:1337/restaurants). -If you haven't gone through the getting started guide, the way you request a Strapi API with [Python](https://www.python.org/) remains the same except that you will not fetch the same content. +If you haven't gone through the Quick Start Guide, the way you request a Strapi API with [Python](https://www.python.org/) remains the same except that you will not fetch the same content. ## Create a Python file diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/react.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/react.md index d8974cbb4a..78c10ea656 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/react.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/react.md @@ -7,7 +7,7 @@ description: Build powerful applications using Strapi, the leading open-source h This integration guide is following the [Quick Start Guide](/developer-docs/latest/getting-started/quick-start.md). We assume that you have fully completed its "Hands-on" path, and therefore can consume the API by browsing this [url](http://localhost:1337/restaurants). -If you haven't gone through the getting started guide, the way you request a Strapi API with [React](https://reactjs.org/) remains the same except that you will not fetch the same content. +If you haven't gone through the Quick Start Guide, the way you request a Strapi API with [React](https://reactjs.org/) remains the same except that you will not fetch the same content. ## Create a React app diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/ruby.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/ruby.md index 7d2c34d913..56c25b3ce2 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/ruby.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/ruby.md @@ -7,7 +7,7 @@ description: Build powerful applications using Strapi, the leading open-source h This integration guide is following the [Quick Start Guide](/developer-docs/latest/getting-started/quick-start.md). We assume that you have fully completed its "Hands-on" path, and therefore can consume the API by browsing this [url](http://localhost:1337/restaurants). -If you haven't gone through the getting started guide, the way you request a Strapi API with [Ruby](https://www.ruby-lang.org/en/) remains the same except that you will not fetch the same content. +If you haven't gone through the Quick Start Guide, the way you request a Strapi API with [Ruby](https://www.ruby-lang.org/en/) remains the same except that you will not fetch the same content. ## Create a Ruby file diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/sapper.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/sapper.md index 401a673818..59c28561ff 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/sapper.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/sapper.md @@ -7,7 +7,7 @@ description: Build powerful applications using Strapi, the leading open-source h This integration guide is following the [Quick Start Guide](/developer-docs/latest/getting-started/quick-start.md). We assume that you have fully completed its "Hands-on" path, and therefore can consume the API by browsing this [url](http://localhost:1337/restaurants). -If you haven't gone through the getting started guide, the way you request a Strapi API with [Sapper](https://sapper.svelte.dev) remains the same except that you will not fetch the same content. +If you haven't gone through the Quick Start Guide, the way you request a Strapi API with [Sapper](https://sapper.svelte.dev) remains the same except that you will not fetch the same content. ## Create a Sapper app diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/svelte.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/svelte.md index bab7aa2e94..73de09b030 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/svelte.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/svelte.md @@ -7,7 +7,7 @@ description: Build powerful applications using Strapi, the leading open-source h This integration guide is following the [Quick Start Guide](/developer-docs/latest/getting-started/quick-start.md). We assume that you have fully completed its "Hands-on" path, and therefore can consume the API by browsing this [url](http://localhost:1337/restaurants). -If you haven't gone through the getting started guide, the way you request a Strapi API with [Svelte](https://svelte.dev) remains the same except that you will not fetch the same content. +If you haven't gone through the Quick Start Guide, the way you request a Strapi API with [Svelte](https://svelte.dev) remains the same except that you will not fetch the same content. ## Create a Svelte app diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/vue-js.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/vue-js.md index ce5c78c417..04f835ebf9 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/vue-js.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/vue-js.md @@ -7,7 +7,7 @@ description: Build powerful applications using Strapi, the leading open-source h This integration guide is following the [Quick Start Guide](/developer-docs/latest/getting-started/quick-start.md). We assume that you have fully completed its "Hands-on" path, and therefore can consume the API by browsing this [url](http://localhost:1337/restaurants). -If you haven't gone through the getting started guide, the way you request a Strapi API with [Vue.js](https://vuejs.org/) remains the same except that you will not fetch the same content. +If you haven't gone through the Quick Start Guide, the way you request a Strapi API with [Vue.js](https://vuejs.org/) remains the same except that you will not fetch the same content. ## Create a Vue.js app diff --git a/docs/developer-docs/latest/development/plugins/i18n.md b/docs/developer-docs/latest/development/plugins/i18n.md index b5ccff1c62..a7511b32ff 100644 --- a/docs/developer-docs/latest/development/plugins/i18n.md +++ b/docs/developer-docs/latest/development/plugins/i18n.md @@ -3,6 +3,30 @@ title: Internationalization (i18n) - Strapi Developer Documentation description: Instructions on how to use Strapi Content API with the Internationalization (i18n) optional plugin --- + + # 🌍 Internationalization (i18n) The Internationalization (i18n) plugin allows Strapi users to create, manage and distribute localized content in different languages, called "locales". For more information about the concept of internationalization, please refer to the diff --git a/docs/developer-docs/latest/setup-deployment-guides/configurations.md b/docs/developer-docs/latest/setup-deployment-guides/configurations.md index 8f40bedf19..c4ba626e72 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/configurations.md +++ b/docs/developer-docs/latest/setup-deployment-guides/configurations.md @@ -4,6 +4,30 @@ description: Learn how you can manage and customize the configuration of your St sidebarDepth: 3 --- + + # Configurations Your application configuration lives in the `config` folder. All the configuration files are loaded on startup and can be accessed through the configuration provider. @@ -1141,16 +1165,16 @@ The dotfiles are not exposed. It means that every file name that starts with `.` Single-Sign-On on Strapi allows you to configure additional sign-in and sign-up methods for your administration panel. -::: warning CAUTION -It is currently not possible to associate a unique SSO provider to an email address used for a Strapi account, meaning that the access to a Strapi account cannot be restricted to only one SSO provider. For more information and workarounds to solve this issue, [please refer to the dedicated GitHub issue](https://github.com/strapi/strapi/issues/9466#issuecomment-783587648). -::: - -::: warning PREREQUISITES +::: danger PREREQUISITES - A Strapi application running on version 3.5.0 or higher is required. - To configure SSO on your application, you will need an EE license with a Gold plan. - Make sure Strapi is part of the applications you can access with your provider. For example, with Microsoft (Azure) Active Directory, you must first ask someone with the right permissions to add Strapi to the list of allowed applications. Please refer to your provider(s) documentation to learn more about that. ::: +::: warning CAUTION +It is currently not possible to associate a unique SSO provider to an email address used for a Strapi account, meaning that the access to a Strapi account cannot be restricted to only one SSO provider. For more information and workarounds to solve this issue, [please refer to the dedicated GitHub issue](https://github.com/strapi/strapi/issues/9466#issuecomment-783587648). +::: + #### Usage SSO configuration lives in the server configuration of your application found within `/config/server.js`. diff --git a/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/mongodb.md b/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/mongodb.md index 5fb6a7e6c6..06878f9a59 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/mongodb.md +++ b/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/mongodb.md @@ -59,7 +59,7 @@ brew install mongodb-community@4.4 3. Get the mongod process running in order to connect and use MongoDB: -For macOS running Intel processors: +For macOS running on Intel processors: ```bash mongod --config /usr/local/etc/mongod.conf @@ -71,7 +71,7 @@ For macOS running on Apple M1 processors: mongod --config /opt/homebrew/etc/mongod.conf ``` -You have now installed MongoDB for _Mac_. You are now ready to [install Strapi with MongoDB locally](#_2-install-strapi-locally-with-mongodb). +You have now installed MongoDB for macOS. You are now ready to [install Strapi with MongoDB locally](#_2-install-strapi-locally-with-mongodb). ::: diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment.md b/docs/developer-docs/latest/setup-deployment-guides/deployment.md index 691444adf5..415418903d 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment.md @@ -3,6 +3,29 @@ title: Deployment - Strapi Developer Documentation description: Learn how to develop locally with Strapi and deploy Strapi with various hosting options. --- + # Deployment Strapi gives you many possible deployment options for your project or application. Strapi can be deployed on traditional hosting servers or services such as 21YunBox, Render, Heroku, AWS, Azure and others. The following documentation covers how to develop locally with Strapi and deploy Strapi with various hosting options. @@ -13,7 +36,7 @@ Deploying **databases** along with Strapi is covered in the [Databases Guide](/d ## General guidelines -::: warning PREREQUISITES +::: danger PREREQUISITES To provide the best possible environment for Strapi there are a few requirements, these apply in both a development (local) as well as a staging and production workflow. - Node LTS (v12 or V14) **Note that odd-number releases of Node will never be supported (e.g. v13, v15).** diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/21yunbox.md b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/21yunbox.md index 8ebb2b90f8..990ce23d99 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/21yunbox.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/21yunbox.md @@ -3,6 +3,30 @@ title: 21YunBox Deployment - Strapi Developer Documentation description: Learn in this guide how to update an existing Strapi project so it can be deployed on 21YunBox. --- + + # 21YunBox This guide explains how to update an existing Strapi project so it can be deployed on [21YunBox](https://www.21yunbox.com). @@ -15,13 +39,13 @@ With persistent disks and managed PostgreSQL databases, 21YunBox gives you multi For more information consult [21YunBox's Deploy Strapi guide](https://www.21yunbox.com/docs/#/deploy-strapi) ::: - -## Prerequisites +:::danger PREREQUISITES This guide assumes you already have a Strapi project to deploy. If you need a project, use the [Quick Start](/developer-docs/latest/getting-started/quick-start.md) to get started or fork 21YunBox's Strapi Examples: - [Strapi with SQLite Starter](https://gitee.com/eryiyunbox-examples/hello-strapi-sqlite) - [Strapi with Postgres Starter](https://gitee.com/eryiyunbox-examples/hello-strapi-postgres) +::: ## Setup Follow the procedure below to set up a Strapi CMS on 21YunBox: diff --git a/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-one-click.md b/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-one-click.md index 2f9982aff1..6873b6a0aa 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-one-click.md +++ b/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-one-click.md @@ -11,6 +11,21 @@ description: Quickly deploy a Strapi application on DigitalOcean by simply using Eventually this will be turned into custom blocks or VuePress components, once I understand better how markdown-it and markdown-it-custom-block work. */ + .custom-block.warning { + border-left-width: .25rem; + background-color: #f8f8f8; + border-color: #bbbbba; + /* margin-top: 2em; */ + /* margin-bottom: 2em; */ + + .custom-block-title, p, li { + color: rgb(44, 62, 80); + } + a { + color: #007eff; + } + } + .custom-block.danger { border-left-width: .25rem; background-color: rgba(129,107,250, .05); @@ -37,9 +52,6 @@ The following documentation will guide you through the one-click creation of a n DigitalOcean is a cloud platform that helps to deploy and scale applications by offering an Infrastructure as a Service (IaaS) platform for developers. - - - :::warning PREREQUISITES A DigitalOcean account is necessary to follow this installation guide. Please visit the [DigitalOcean website](https://try.digitalocean.com/strapi/) to create an account if you don't already have one. ::: @@ -53,7 +65,6 @@ A DigitalOcean account is necessary to follow this installation guide. Please vi 5. Select your virtual machine size (minimum of 2 GB/1 CPU). 6. Choose a datacenter region (closest to you or your target area). 7. Add a new SSH key. You can follow [this guide](https://docs.digitalocean.com/products/droplets/how-to/add-ssh-keys/). - 8. Give your virtual machine a hostname. 9. Click **Create Droplet**. It may take from 30 seconds to a few minutes for the droplet to start, and a few minutes more to finish the Strapi installation. @@ -68,8 +79,6 @@ To visit your Strapi application: 3. Copy the public ipv4 address of the droplet. 4. Use this address to access the Strapi application. - - Visiting the Strapi application page for the first time will require to create the first administrator user. ::: danger πŸ€“ Customization options for the DigitalOcean droplet diff --git a/docs/developer-docs/latest/setup-deployment-guides/installation/platformsh.md b/docs/developer-docs/latest/setup-deployment-guides/installation/platformsh.md index 3c284d4a59..8d5c8b889f 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/installation/platformsh.md +++ b/docs/developer-docs/latest/setup-deployment-guides/installation/platformsh.md @@ -4,6 +4,30 @@ description: Quickly deploy a Strapi application using the official Platform.sh sidebarDepth: 1 --- + + # Platform.sh One-Click The following documentation will guide you through the one-click creation of a new Strapi project hosted on [Platform.sh](https://platform.sh/). diff --git a/docs/developer-docs/latest/setup-deployment-guides/installation/render.md b/docs/developer-docs/latest/setup-deployment-guides/installation/render.md index 3c5bb4439b..cdfec06b60 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/installation/render.md +++ b/docs/developer-docs/latest/setup-deployment-guides/installation/render.md @@ -3,6 +3,30 @@ title: Render One-Click - Strapi Developer Documentation description: Quickly deploy a Strapi application on Render by simply using their One-click button. --- + + # Render One-Click The following documentation will guide you through the one-click creation of a new Strapi project hosted on [Render](https://render.com). From 45635a96344feac31e5ee136b7acedffe4c4256f Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Wed, 30 Jun 2021 17:20:02 +0200 Subject: [PATCH 02/35] Add strapi & prerequisites Markdown containers Note: Using babel-style for plugins declarations as it seems to work better with multiple declarations for vuepress-plugin-container --- docs/.vuepress/config.js | 33 +++++++++++-------- docs/.vuepress/styles/index.styl | 4 ++- .../styles/strapi-custom-blocks.styl | 28 ++++++++++++++++ docs/package.json | 3 +- docs/yarn.lock | 2 +- 5 files changed, 54 insertions(+), 16 deletions(-) create mode 100644 docs/.vuepress/styles/strapi-custom-blocks.styl diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 4a58744d14..1d5067467b 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -378,25 +378,32 @@ module.exports = { port: 8080, description: 'The headless CMS developers love.', base: '/documentation/', - plugins: { - '@vuepress/medium-zoom': {}, - 'vuepress-plugin-element-tabs': {}, - '@vuepress/google-analytics': { + plugins: [ + ['vuepress-plugin-element-tabs', {}], + ['@vuepress/google-analytics', { ga: 'UA-54313258-1', - }, - 'check-md': { + }], + ['check-md', { ignore: checklinksIgnoredFiles, - }, - seo: { + }], + ['seo', { siteTitle: (_, $site) => $site.title, title: $page => $page.title, - }, - 'vuepress-plugin-code-copy': { + }], + ['vuepress-plugin-code-copy', { color: '#ffffff', successText: 'Copied to clipboard!', - }, - '@vuepress/back-to-top': {}, - }, + }], + ['@vuepress/back-to-top', {}], + ['vuepress-plugin-container', { + type: 'strapi', + defaultTitle: 'πŸ€“ ' + }], + ['vuepress-plugin-container', { + type: 'prerequisites', + defaultTitle: 'PREREQUISITES' + }] + ], head: [ [ 'link', diff --git a/docs/.vuepress/styles/index.styl b/docs/.vuepress/styles/index.styl index 6e34e9968d..10b26c1a7d 100644 --- a/docs/.vuepress/styles/index.styl +++ b/docs/.vuepress/styles/index.styl @@ -2,4 +2,6 @@ color: $accentColor !important .el-tabs__item:not(.is-disabled):hover - color: $accentColor !important \ No newline at end of file + color: $accentColor !important + +@import "strapi-custom-blocks.styl" diff --git a/docs/.vuepress/styles/strapi-custom-blocks.styl b/docs/.vuepress/styles/strapi-custom-blocks.styl new file mode 100644 index 0000000000..1565a27eb6 --- /dev/null +++ b/docs/.vuepress/styles/strapi-custom-blocks.styl @@ -0,0 +1,28 @@ +.custom-block + .custom-block-title + font-weight 600 + margin-bottom -0.4rem + &.strapi + &.prerequisites + padding .1rem 1.5rem + margin-top 2rem + margin-bottom 2rem + border-left-width: .25rem + border-left-style solid + &.strapi + background-color rgba(129,107,250, .05) + border-color rgb(129,107,250) + .custom-block-title + color #816bfa + font-weight 700 + p, li + color #2c3e50 + a + color #007eff + &.prerequisites + background-color #f8f8f8; + border-color #bbbbba; + + +.custom-block.details + color rgb(44, 62, 80) diff --git a/docs/package.json b/docs/package.json index 338d0ad6e5..c3ce79bc87 100644 --- a/docs/package.json +++ b/docs/package.json @@ -19,7 +19,8 @@ }, "devDependencies": { "@vuepress/plugin-back-to-top": "^1.8.2", - "vuepress-plugin-check-md": "^0.0.2" + "vuepress-plugin-check-md": "^0.0.2", + "vuepress-plugin-container": "^2.1.5" }, "author": { "email": "hi@strapi.io", diff --git a/docs/yarn.lock b/docs/yarn.lock index 3fab5eab47..66d8cddb87 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -8165,7 +8165,7 @@ vuepress-plugin-code-copy@^1.0.6: resolved "https://registry.yarnpkg.com/vuepress-plugin-code-copy/-/vuepress-plugin-code-copy-1.0.6.tgz#6431dab764b48b5b203e4936d98b1943651ce4ad" integrity sha512-FiqwMtlb4rEsOI56O6sSkekcd3SlESxbkR2IaTIQxsMOMoalKfW5R9WlR1Pjm10v6jmU661Ex8MR11k9IzrNUg== -vuepress-plugin-container@^2.0.2: +vuepress-plugin-container@^2.0.2, vuepress-plugin-container@^2.1.5: version "2.1.5" resolved "https://registry.yarnpkg.com/vuepress-plugin-container/-/vuepress-plugin-container-2.1.5.tgz#37fff05662fedbd63ffd3a5463b2592c7a7f3133" integrity sha512-TQrDX/v+WHOihj3jpilVnjXu9RcTm6m8tzljNJwYhxnJUW0WWQ0hFLcDTqTBwgKIFdEiSxVOmYE+bJX/sq46MA== From cc62f4eed99b73a63d773f28bfb18dd471cee117 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Thu, 1 Jul 2021 15:18:34 +0200 Subject: [PATCH 03/35] Use :::strapi and :::prerequisites in existing docs --- .../latest/development/plugins/i18n.md | 26 +------- .../latest/getting-started/introduction.md | 51 +--------------- .../latest/getting-started/quick-start.md | 59 ++----------------- .../setup-deployment-guides/configurations.md | 26 +------- .../setup-deployment-guides/deployment.md | 25 +------- .../deployment/hosting-guides/21yunbox.md | 26 +------- .../installation/cli.md | 6 +- .../installation/digitalocean-one-click.md | 47 +-------------- .../installation/platformsh.md | 26 +------- .../installation/render.md | 26 +------- 10 files changed, 19 insertions(+), 299 deletions(-) diff --git a/docs/developer-docs/latest/development/plugins/i18n.md b/docs/developer-docs/latest/development/plugins/i18n.md index a7511b32ff..3957f47d66 100644 --- a/docs/developer-docs/latest/development/plugins/i18n.md +++ b/docs/developer-docs/latest/development/plugins/i18n.md @@ -3,30 +3,6 @@ title: Internationalization (i18n) - Strapi Developer Documentation description: Instructions on how to use Strapi Content API with the Internationalization (i18n) optional plugin --- - - # 🌍 Internationalization (i18n) The Internationalization (i18n) plugin allows Strapi users to create, manage and distribute localized content in different languages, called "locales". For more information about the concept of internationalization, please refer to the @@ -43,7 +19,7 @@ The i18n plugin does not automatically translate the users' content nor adapt th ## Installation -::: warning PREREQUISITES +::: prerequisites PREREQUISITES The Internationalization plugin is installed by default on all Strapi applications running on version 3.6.0 or higher. For lower versions, a migration is needed (see [Update Strapi version](/developer-docs/latest/update-migration-guides/update-version.md)), as well as a manual installation of the plugin. ::: diff --git a/docs/developer-docs/latest/getting-started/introduction.md b/docs/developer-docs/latest/getting-started/introduction.md index a0ca95c264..5819e12fcf 100644 --- a/docs/developer-docs/latest/getting-started/introduction.md +++ b/docs/developer-docs/latest/getting-started/introduction.md @@ -3,58 +3,11 @@ title: Strapi Developer Documentation description: This documentation contains all technical documentation related to the setup, deployment, update and customization of your Strapi application. --- - - # Welcome to the Strapi developer documentation! This documentation contains all technical documentation related to the setup, deployment, update and customization of your Strapi application. -::: danger πŸ€“ Can't wait to start using Strapi? +::: strapi πŸ€“ Can't wait to start using Strapi? You can directly head to the [Quick Start](quick-start.md)!
If demos are more your thing, we have a [video demo](https://youtu.be/zd0_S_FPzKg), or you can request a [live demo](https://strapi.io/demo)! ::: @@ -79,7 +32,7 @@ Strapi is a community-oriented project with an emphasis on transparency. The Str Community members also take great part in providing the whole community a plethora of resources about Strapi. You can find [tutorials](https://strapi.io/tutorials/) on the Strapi website, where you can also create your own. Also, as an open-source project, the technical documentation of Strapi is open to contributions (see [Open-source & Contribution](#open-source-contribution)). -::: danger πŸ€“ Want to join the community? +::: strapi πŸ€“ Want to join the community? You can join [GitHub](https://github.com/strapi/strapi) and the [forum](https://forum.strapi.io/) and share your ideas and opinions with other community members and members of the Strapi team. If you're looking for news and updates about Strapi, [Twitter](https://twitter.com/strapijs) and the [blog](https://strapi.io/blog) are pretty good places to start! ::: diff --git a/docs/developer-docs/latest/getting-started/quick-start.md b/docs/developer-docs/latest/getting-started/quick-start.md index 3ac6346ce6..dbd3b1c112 100644 --- a/docs/developer-docs/latest/getting-started/quick-start.md +++ b/docs/developer-docs/latest/getting-started/quick-start.md @@ -34,51 +34,6 @@ next: ./troubleshooting padding-left: .3em; } - /* - We override the :::warning and :::danger callouts for specific uses here. - The CSS is scoped so this won't affect the rest of the docs. - - Eventually this will be turned into custom blocks or VuePress components, - once I understand better how markdown-it and markdown-it-custom-block work. - */ - .custom-block.congrats, - .custom-block.warning, - .custom-block.danger { - border-left-width: .25rem; - } - - .custom-block.warning { - background-color: #f8f8f8; - border-color: #bbbbba; - } - - .custom-block.warning, - .custom-block.danger { - margin-top: 2em; - margin-bottom: 2em; - - .custom-block-title, p, li { - color: rgb(44, 62, 80); - } - a { - color: #007eff; - } - } - - .custom-block.danger { - background-color: rgba(129,107,250, .05); - border-color: rgb(129,107,250); - - .custom-block-title { - color: rgb(129,107,250); - font-weight: bold; - } - } - - .custom-block.details { - color: rgb(44, 62, 80); - } - @@ -136,10 +91,8 @@ next: ./troubleshooting Strapi offers a lot of flexibility. Whether you want to go fast and quickly see the final result, or would rather dive deeper into the product, we got you covered. -:::warning PREREQUISITES - +::: prerequisites Make sure [Node.js and npm are properly installed](/developer-docs/latest/setup-deployment-guides/installation/cli.md#preparing-the-installation) on your machine. It is also possible to use Yarn instead of npm (see [install the Yarn package](https://yarnpkg.com/en/)). - ::: πŸ‘‡ Let's get started! Using the big buttons below, please choose between: @@ -188,7 +141,7 @@ Once the installation is complete, your browser automatically opens 2 tabs: By completing the form in the first tab, you create your own account. Once done, you become the first administator user of this Strapi application. Welcome aboard, commander! -:::warning CONGRATULATIONS! πŸ₯³ +::: prerequisites CONGRATULATIONS! πŸ₯³ Your blog is ready! You can start playing with Strapi and discover the product by yourself using our [User Guide](/user-docs/latest/getting-started/introduction.md), or proceed to part B below. Writing a blog is not your cup of tea? You can leave this guide and play with other [Starters](https://strapi.io/starters) on your own. @@ -267,7 +220,7 @@ After a few moments, you should see your blog with its updated title running at ![GIF: Updated Gatsby blog front end](../assets/quick-start-guide/qsg-starters-part2-04-restart_servers.gif) -:::warning CONGRATULATIONS! πŸ₯³ +::: prerequisites CONGRATULATIONS! πŸ₯³ Now you know how to use Strapi to create and update your blog. Keep on creating amazing content! ::: @@ -279,7 +232,7 @@ The beauty of using Strapi [starters](https://strapi.io/starters) is that the St πŸ‘‰ Deploying the front end mostly depends on the technology it's based on. The easiest way to deploy your Gatsby blog front end is probably to [deploy on Gatsby Cloud](https://support.gatsbyjs.com/hc/en-us/articles/360052324714-Connecting-to-Strapi). -:::danger πŸ€“ To go further with starters +:::strapi πŸ€“ To go further with starters * Read more about the [starters CLI](https://strapi.io/blog/announcing-the-strapi-starter-cli) on our blog. * Start another project! We have lots of other [Starters](https://strapi.io/starters) you can use to kickstart your blog, e-commerce, corporate website, or portfolio project. @@ -318,7 +271,7 @@ You now have access to the [admin panel](http://localhost:1337/admin): ![admin panel screenshot glimpse](../assets/quick-start-guide//qsg-handson-part1-01-admin_panel.png) -:::warning πŸ₯³ CONGRATULATIONS! +::: prerequisites πŸ₯³ CONGRATULATIONS! You have just created a new Strapi project! You can start playing with Strapi and discover the product by yourself using our [User Guide](/user-docs/latest/getting-started/introduction.md), or proceed to part B below. ::: @@ -482,7 +435,7 @@ Try it now! The result should be similar to the example response below πŸ‘‡. ::: -:::warning πŸ₯³ CONGRATULATIONS! +::: prerequisites πŸ₯³ CONGRATULATIONS! Now your content is created, published, and you have permissions to request it through the API. Keep on creating amazing content! ::: diff --git a/docs/developer-docs/latest/setup-deployment-guides/configurations.md b/docs/developer-docs/latest/setup-deployment-guides/configurations.md index c4ba626e72..cbea294ff8 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/configurations.md +++ b/docs/developer-docs/latest/setup-deployment-guides/configurations.md @@ -4,30 +4,6 @@ description: Learn how you can manage and customize the configuration of your St sidebarDepth: 3 --- - - # Configurations Your application configuration lives in the `config` folder. All the configuration files are loaded on startup and can be accessed through the configuration provider. @@ -1165,7 +1141,7 @@ The dotfiles are not exposed. It means that every file name that starts with `.` Single-Sign-On on Strapi allows you to configure additional sign-in and sign-up methods for your administration panel. -::: danger PREREQUISITES +::: prerequisites PREREQUISITES - A Strapi application running on version 3.5.0 or higher is required. - To configure SSO on your application, you will need an EE license with a Gold plan. - Make sure Strapi is part of the applications you can access with your provider. For example, with Microsoft (Azure) Active Directory, you must first ask someone with the right permissions to add Strapi to the list of allowed applications. Please refer to your provider(s) documentation to learn more about that. diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment.md b/docs/developer-docs/latest/setup-deployment-guides/deployment.md index 415418903d..a2988a0e81 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment.md @@ -3,29 +3,6 @@ title: Deployment - Strapi Developer Documentation description: Learn how to develop locally with Strapi and deploy Strapi with various hosting options. --- - # Deployment Strapi gives you many possible deployment options for your project or application. Strapi can be deployed on traditional hosting servers or services such as 21YunBox, Render, Heroku, AWS, Azure and others. The following documentation covers how to develop locally with Strapi and deploy Strapi with various hosting options. @@ -36,7 +13,7 @@ Deploying **databases** along with Strapi is covered in the [Databases Guide](/d ## General guidelines -::: danger PREREQUISITES +::: prerequisites PREREQUISITES To provide the best possible environment for Strapi there are a few requirements, these apply in both a development (local) as well as a staging and production workflow. - Node LTS (v12 or V14) **Note that odd-number releases of Node will never be supported (e.g. v13, v15).** diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/21yunbox.md b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/21yunbox.md index 990ce23d99..4b3bb19110 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/21yunbox.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/21yunbox.md @@ -3,30 +3,6 @@ title: 21YunBox Deployment - Strapi Developer Documentation description: Learn in this guide how to update an existing Strapi project so it can be deployed on 21YunBox. --- - - # 21YunBox This guide explains how to update an existing Strapi project so it can be deployed on [21YunBox](https://www.21yunbox.com). @@ -39,7 +15,7 @@ With persistent disks and managed PostgreSQL databases, 21YunBox gives you multi For more information consult [21YunBox's Deploy Strapi guide](https://www.21yunbox.com/docs/#/deploy-strapi) ::: -:::danger PREREQUISITES +:::prerequisites PREREQUISITES This guide assumes you already have a Strapi project to deploy. If you need a project, use the [Quick Start](/developer-docs/latest/getting-started/quick-start.md) to get started or fork 21YunBox's Strapi Examples: - [Strapi with SQLite Starter](https://gitee.com/eryiyunbox-examples/hello-strapi-sqlite) diff --git a/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md b/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md index eaeec71283..194a29372b 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md +++ b/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md @@ -3,7 +3,7 @@ title: Installing from CLI - Strapi Developer Documentation description: Fast-track local install for getting Strapi running on your computer in less than a minute. --- - + --> # Installing from CLI @@ -70,7 +70,7 @@ Starting from the release of Strapi v4, MongoDB is not supported natively anymor ## Creating a Strapi project -::: danger πŸ€“ CLI installation options +::: strapi πŸ€“ CLI installation options The following installation guide covers the most basic installation option using the CLI. There are however other options that can be used when creating a new Strapi project: - Using the `--quickstart` flag at the end of the command to directly create the project in quickstart mode. diff --git a/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-one-click.md b/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-one-click.md index 6873b6a0aa..9a4f7b37f1 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-one-click.md +++ b/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-one-click.md @@ -3,56 +3,13 @@ title: DigitalOcean One-click - Strapi Developer Documentation description: Quickly deploy a Strapi application on DigitalOcean by simply using their One-click button. --- - - # DigitalOcean One-click The following documentation will guide you through the one-click creation of a new Strapi project hosted on [DigitalOcean](https://www.digitalocean.com/). DigitalOcean is a cloud platform that helps to deploy and scale applications by offering an Infrastructure as a Service (IaaS) platform for developers. -:::warning PREREQUISITES +::: prerequisites PREREQUISITES A DigitalOcean account is necessary to follow this installation guide. Please visit the [DigitalOcean website](https://try.digitalocean.com/strapi/) to create an account if you don't already have one. ::: @@ -81,6 +38,6 @@ To visit your Strapi application: Visiting the Strapi application page for the first time will require to create the first administrator user. -::: danger πŸ€“ Customization options for the DigitalOcean droplet +::: strapi πŸ€“ Customization options for the DigitalOcean droplet The DigitalOcean droplet includes everything you need to run Strapi. However, should you need to access and customize the droplet environment and change some of its settings, you may want to refer to [our dedicated documentation](/developer-docs/latest/setup-deployment-guides/installation/digitalocean-customization.md). You can also find the image generation [source code](https://github.com/strapi/one-click-deploy/tree/master/digital-ocean) on Strapi's GitHub. ::: diff --git a/docs/developer-docs/latest/setup-deployment-guides/installation/platformsh.md b/docs/developer-docs/latest/setup-deployment-guides/installation/platformsh.md index 8d5c8b889f..96c37969d7 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/installation/platformsh.md +++ b/docs/developer-docs/latest/setup-deployment-guides/installation/platformsh.md @@ -4,37 +4,13 @@ description: Quickly deploy a Strapi application using the official Platform.sh sidebarDepth: 1 --- - - # Platform.sh One-Click The following documentation will guide you through the one-click creation of a new Strapi project hosted on [Platform.sh](https://platform.sh/). Platform.sh is a Platform as a Service (PaaS) that allows the management of multiple websites and applications. In particular, it allows to quickly install and deploy a Strapi application. -::: warning PREREQUISITES +::: prerequisites PREREQUISITES A Platform.sh account is necessary to follow this installation guide. Please visit the [Platform.sh website](https://console.platform.sh/) to create an account if you don't already have one. ::: diff --git a/docs/developer-docs/latest/setup-deployment-guides/installation/render.md b/docs/developer-docs/latest/setup-deployment-guides/installation/render.md index cdfec06b60..a313159e96 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/installation/render.md +++ b/docs/developer-docs/latest/setup-deployment-guides/installation/render.md @@ -3,37 +3,13 @@ title: Render One-Click - Strapi Developer Documentation description: Quickly deploy a Strapi application on Render by simply using their One-click button. --- - - # Render One-Click The following documentation will guide you through the one-click creation of a new Strapi project hosted on [Render](https://render.com). Render is a cloud provider with persistent disks and managed PostgreSQL databases, that offers multiple different ways to store content. -::: warning PREREQUISITES +::: prerequisites PREREQUISITES A Render account is necessary to follow this installation guide. Please visit [the Render dashboard](https://dashboard.render.com) to create an account if you do not already have one. ::: From adfd4c3cd737d17b2ae8c2f72e99e66241db3344 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Fri, 2 Jul 2021 12:10:24 +0200 Subject: [PATCH 04/35] Add generic callout, tweak strapi & tip callouts, and clean config file --- docs/.vuepress/config.js | 69 ++++++++++++------- .../styles/strapi-custom-blocks.styl | 13 +++- 2 files changed, 53 insertions(+), 29 deletions(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 1d5067467b..be70aae48a 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -373,37 +373,54 @@ const checklinksIgnoredFiles = [ './developer-docs/latest/update-migration-guides/migration-guides/migration-guide-beta.20-to-3.0.0.md', // line 93 ]; +const plugins = [ + ['vuepress-plugin-element-tabs', {}], + ['@vuepress/google-analytics', { + ga: 'UA-54313258-1', + }], + ['check-md', { + ignore: checklinksIgnoredFiles, + }], + ['seo', { + siteTitle: (_, $site) => $site.title, + title: $page => $page.title, + }], + ['vuepress-plugin-code-copy', { + color: '#ffffff', + successText: 'Copied to clipboard!', + }], + ['@vuepress/back-to-top', {}], + ['vuepress-plugin-container', { + type: 'callout', + defaultTitle: '' + }], + ['vuepress-plugin-container', { + type: 'callout-alt', + defaultTitle: '' + }], + ['vuepress-plugin-container', { + type: 'strapi', + defaultTitle: '', + before: info => `

πŸ€“ ${info}

`, + after: '
' + }], + ['vuepress-plugin-container', { + type: 'tip', + before: info => `

πŸ’‘ ${info}

`, + after: '
' + }], + ['vuepress-plugin-container', { + type: 'prerequisites', + defaultTitle: 'PREREQUISITES' + }], +]; + module.exports = { title: '', port: 8080, description: 'The headless CMS developers love.', base: '/documentation/', - plugins: [ - ['vuepress-plugin-element-tabs', {}], - ['@vuepress/google-analytics', { - ga: 'UA-54313258-1', - }], - ['check-md', { - ignore: checklinksIgnoredFiles, - }], - ['seo', { - siteTitle: (_, $site) => $site.title, - title: $page => $page.title, - }], - ['vuepress-plugin-code-copy', { - color: '#ffffff', - successText: 'Copied to clipboard!', - }], - ['@vuepress/back-to-top', {}], - ['vuepress-plugin-container', { - type: 'strapi', - defaultTitle: 'πŸ€“ ' - }], - ['vuepress-plugin-container', { - type: 'prerequisites', - defaultTitle: 'PREREQUISITES' - }] - ], + plugins: plugins, head: [ [ 'link', diff --git a/docs/.vuepress/styles/strapi-custom-blocks.styl b/docs/.vuepress/styles/strapi-custom-blocks.styl index 1565a27eb6..def0c3fd6a 100644 --- a/docs/.vuepress/styles/strapi-custom-blocks.styl +++ b/docs/.vuepress/styles/strapi-custom-blocks.styl @@ -2,6 +2,8 @@ .custom-block-title font-weight 600 margin-bottom -0.4rem + &.callout + &.callout-alt &.strapi &.prerequisites padding .1rem 1.5rem @@ -19,10 +21,15 @@ color #2c3e50 a color #007eff + &.callout + &.callout-alt &.prerequisites - background-color #f8f8f8; - border-color #bbbbba; - + background-color #f8f8f8 + border-color #bbbbba + &.callout-alt + border-radius: 10px + background-color: #eff5f7 + border: none .custom-block.details color rgb(44, 62, 80) From f048b7cd9f4b1f10b84c67a2a25c271b4ae80583 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Fri, 2 Jul 2021 12:12:22 +0200 Subject: [PATCH 05/35] Clean up unused inline styles from Markdown files --- .../latest/getting-started/quick-start.md | 6 --- .../installation/cli.md | 40 ------------------- 2 files changed, 46 deletions(-) diff --git a/docs/developer-docs/latest/getting-started/quick-start.md b/docs/developer-docs/latest/getting-started/quick-start.md index dbd3b1c112..2ddd8118bf 100644 --- a/docs/developer-docs/latest/getting-started/quick-start.md +++ b/docs/developer-docs/latest/getting-started/quick-start.md @@ -65,12 +65,6 @@ next: ./troubleshooting border: solid 1px #bbbbba !important; } - .el-tabs--card > .el-tabs__header > .el-tabs__nav-wrap > .el-tabs__nav-scroll > .el-tabs__nav > .el-tabs__item.is-active { - /* border: none; */ - /* height: 62px; */ - /* border-bottom: solid 1px red !important; */ - } - .el-tabs--card > .el-tabs__header > .el-tabs__nav-wrap > .el-tabs__nav-scroll > .el-tabs__nav > .el-tabs__item:first-child { border-radius: 8px 0 0 8px !important; border-right: none !important; diff --git a/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md b/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md index 194a29372b..9925c40262 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md +++ b/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md @@ -3,46 +3,6 @@ title: Installing from CLI - Strapi Developer Documentation description: Fast-track local install for getting Strapi running on your computer in less than a minute. --- - - # Installing from CLI Strapi CLI (Command Line Interface) installation scripts are the fastest way to get Strapi running locally. The following guide is the installation option most recommended by Strapi. From 4b0f29f75ad85748f42114c10b401cac2aa24eef Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Fri, 2 Jul 2021 12:12:57 +0200 Subject: [PATCH 06/35] =?UTF-8?q?Remove=20=F0=9F=A4=93=20from=20Markdown?= =?UTF-8?q?=20files=20in=20strapi=20callouts=20as=20it's=20now=20included?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/developer-docs/latest/getting-started/quick-start.md | 2 +- .../latest/setup-deployment-guides/installation/cli.md | 2 +- .../installation/digitalocean-one-click.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/developer-docs/latest/getting-started/quick-start.md b/docs/developer-docs/latest/getting-started/quick-start.md index 2ddd8118bf..81cbcd6695 100644 --- a/docs/developer-docs/latest/getting-started/quick-start.md +++ b/docs/developer-docs/latest/getting-started/quick-start.md @@ -226,7 +226,7 @@ The beauty of using Strapi [starters](https://strapi.io/starters) is that the St πŸ‘‰ Deploying the front end mostly depends on the technology it's based on. The easiest way to deploy your Gatsby blog front end is probably to [deploy on Gatsby Cloud](https://support.gatsbyjs.com/hc/en-us/articles/360052324714-Connecting-to-Strapi). -:::strapi πŸ€“ To go further with starters +:::strapi To go further with starters * Read more about the [starters CLI](https://strapi.io/blog/announcing-the-strapi-starter-cli) on our blog. * Start another project! We have lots of other [Starters](https://strapi.io/starters) you can use to kickstart your blog, e-commerce, corporate website, or portfolio project. diff --git a/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md b/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md index 9925c40262..8a10b7f848 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md +++ b/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md @@ -30,7 +30,7 @@ Starting from the release of Strapi v4, MongoDB is not supported natively anymor ## Creating a Strapi project -::: strapi πŸ€“ CLI installation options +::: strapi CLI installation options The following installation guide covers the most basic installation option using the CLI. There are however other options that can be used when creating a new Strapi project: - Using the `--quickstart` flag at the end of the command to directly create the project in quickstart mode. diff --git a/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-one-click.md b/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-one-click.md index 9a4f7b37f1..879c456f38 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-one-click.md +++ b/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-one-click.md @@ -38,6 +38,6 @@ To visit your Strapi application: Visiting the Strapi application page for the first time will require to create the first administrator user. -::: strapi πŸ€“ Customization options for the DigitalOcean droplet +::: strapi Customization options for the DigitalOcean droplet The DigitalOcean droplet includes everything you need to run Strapi. However, should you need to access and customize the droplet environment and change some of its settings, you may want to refer to [our dedicated documentation](/developer-docs/latest/setup-deployment-guides/installation/digitalocean-customization.md). You can also find the image generation [source code](https://github.com/strapi/one-click-deploy/tree/master/digital-ocean) on Strapi's GitHub. ::: From 1497732ef653fd790277bea6b8451dea84f977c6 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Fri, 2 Jul 2021 12:16:30 +0200 Subject: [PATCH 07/35] Use generic callout for congratulations in QSG --- docs/developer-docs/latest/getting-started/quick-start.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/developer-docs/latest/getting-started/quick-start.md b/docs/developer-docs/latest/getting-started/quick-start.md index 81cbcd6695..e9ae85fe7a 100644 --- a/docs/developer-docs/latest/getting-started/quick-start.md +++ b/docs/developer-docs/latest/getting-started/quick-start.md @@ -135,7 +135,7 @@ Once the installation is complete, your browser automatically opens 2 tabs: By completing the form in the first tab, you create your own account. Once done, you become the first administator user of this Strapi application. Welcome aboard, commander! -::: prerequisites CONGRATULATIONS! πŸ₯³ +::: callout CONGRATULATIONS! πŸ₯³ Your blog is ready! You can start playing with Strapi and discover the product by yourself using our [User Guide](/user-docs/latest/getting-started/introduction.md), or proceed to part B below. Writing a blog is not your cup of tea? You can leave this guide and play with other [Starters](https://strapi.io/starters) on your own. @@ -214,7 +214,7 @@ After a few moments, you should see your blog with its updated title running at ![GIF: Updated Gatsby blog front end](../assets/quick-start-guide/qsg-starters-part2-04-restart_servers.gif) -::: prerequisites CONGRATULATIONS! πŸ₯³ +::: callout CONGRATULATIONS! πŸ₯³ Now you know how to use Strapi to create and update your blog. Keep on creating amazing content! ::: @@ -265,7 +265,7 @@ You now have access to the [admin panel](http://localhost:1337/admin): ![admin panel screenshot glimpse](../assets/quick-start-guide//qsg-handson-part1-01-admin_panel.png) -::: prerequisites πŸ₯³ CONGRATULATIONS! +::: callout πŸ₯³ CONGRATULATIONS! You have just created a new Strapi project! You can start playing with Strapi and discover the product by yourself using our [User Guide](/user-docs/latest/getting-started/introduction.md), or proceed to part B below. ::: @@ -429,7 +429,7 @@ Try it now! The result should be similar to the example response below πŸ‘‡. ::: -::: prerequisites πŸ₯³ CONGRATULATIONS! +::: callout πŸ₯³ CONGRATULATIONS! Now your content is created, published, and you have permissions to request it through the API. Keep on creating amazing content! ::: From 0b55b021152c412e71267d317e1d4d7a6583f95c Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Wed, 7 Jul 2021 14:34:06 +0200 Subject: [PATCH 08/35] Add api-call, request and response custom containers --- docs/.vuepress/config.js | 51 ++++++++----- docs/.vuepress/styles/index.styl | 4 +- .../styles/strapi-custom-blocks.styl | 74 +++++++++++++++++++ 3 files changed, 109 insertions(+), 20 deletions(-) create mode 100644 docs/.vuepress/styles/strapi-custom-blocks.styl diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 4a58744d14..752d65d809 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -373,30 +373,43 @@ const checklinksIgnoredFiles = [ './developer-docs/latest/update-migration-guides/migration-guides/migration-guide-beta.20-to-3.0.0.md', // line 93 ]; +const plugins = [ + ['vuepress-plugin-element-tabs', {}], + ['@vuepress/google-analytics', { + ga: 'UA-54313258-1', + }], + ['check-md', { + ignore: checklinksIgnoredFiles, + }], + ['seo', { + siteTitle: (_, $site) => $site.title, + title: $page => $page.title, + }], + ['vuepress-plugin-code-copy', { + color: '#ffffff', + successText: 'Copied to clipboard!', + }], + ['@vuepress/back-to-top', {}], + ['vuepress-plugin-container', { + type: 'api-call', + defaultTitle: '' + }], + ['vuepress-plugin-container', { + type: 'request', + defaultTitle: 'Request' + }], + ['vuepress-plugin-container', { + type: 'response', + defaultTitle: 'Response' + }] +]; + module.exports = { title: '', port: 8080, description: 'The headless CMS developers love.', base: '/documentation/', - plugins: { - '@vuepress/medium-zoom': {}, - 'vuepress-plugin-element-tabs': {}, - '@vuepress/google-analytics': { - ga: 'UA-54313258-1', - }, - 'check-md': { - ignore: checklinksIgnoredFiles, - }, - seo: { - siteTitle: (_, $site) => $site.title, - title: $page => $page.title, - }, - 'vuepress-plugin-code-copy': { - color: '#ffffff', - successText: 'Copied to clipboard!', - }, - '@vuepress/back-to-top': {}, - }, + plugins: plugins, head: [ [ 'link', diff --git a/docs/.vuepress/styles/index.styl b/docs/.vuepress/styles/index.styl index 6e34e9968d..041f95328f 100644 --- a/docs/.vuepress/styles/index.styl +++ b/docs/.vuepress/styles/index.styl @@ -2,4 +2,6 @@ color: $accentColor !important .el-tabs__item:not(.is-disabled):hover - color: $accentColor !important \ No newline at end of file + color: $accentColor !important + +@import 'strapi-custom-blocks.styl' diff --git a/docs/.vuepress/styles/strapi-custom-blocks.styl b/docs/.vuepress/styles/strapi-custom-blocks.styl new file mode 100644 index 0000000000..1f4dc186b1 --- /dev/null +++ b/docs/.vuepress/styles/strapi-custom-blocks.styl @@ -0,0 +1,74 @@ +.custom-block + .custom-block-title + font-weight 600 + margin-bottom -0.4rem + /* + * CALLOUTS + */ + &.callout + &.callout-alt + &.strapi + &.prerequisites + padding .1rem 1.5rem + margin-top 2rem + margin-bottom 2rem + border-left-width: .25rem + border-left-style solid + &.strapi + background-color rgba(129,107,250, .05) + border-color rgb(129,107,250) + .custom-block-title + color #816bfa + font-weight 700 + p, li + color #2c3e50 + a + color #007eff + &.callout + &.callout-alt + &.prerequisites + background-color #f8f8f8 + border-color #bbbbba + &.callout-alt + border-radius: 10px + background-color: #eff5f7 + border: none + /* + * API CALLS + */ + &.api-call + background-color: rgba(250,250,250,.2) + border: solid 1px #eaeaea + border-radius: 12px + padding: .75rem 0 0 1.5rem + margin: 2rem 0 23rem + @media (min-width: 1536px) + display: flex + margin: 3rem -6rem 2rem + justify-content: space-between + .request + .extra-class + // background-color: #7a7a7a + @media (min-width: 1536px) + flex: 0 0 48% + max-width: 48% + .response + margin-top: 2rem + @media (min-width: 1536px) + margin-top: 0 + flex: 0 0 48% + p, ul + padding-right: 1rem + .custom-block-title + margin-bottom: .5rem + .request + .response + .extra-class + font-size: 90% + border-radius: 6px 0 6px 0 + pre + white-space: pre-wrap + word-break: break-word + margin-bottom: 0 +.custom-block.details + color rgb(44, 62, 80) From 4f77efd742bd69c680f3d493562537587eb1d543 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Wed, 7 Jul 2021 16:36:00 +0200 Subject: [PATCH 09/35] Fully redesign style for request & response containers --- .../styles/strapi-custom-blocks.styl | 133 ++++++++++++++++-- 1 file changed, 121 insertions(+), 12 deletions(-) diff --git a/docs/.vuepress/styles/strapi-custom-blocks.styl b/docs/.vuepress/styles/strapi-custom-blocks.styl index 1f4dc186b1..e9433c7a74 100644 --- a/docs/.vuepress/styles/strapi-custom-blocks.styl +++ b/docs/.vuepress/styles/strapi-custom-blocks.styl @@ -37,30 +37,108 @@ * API CALLS */ &.api-call - background-color: rgba(250,250,250,.2) - border: solid 1px #eaeaea + padding: 0 border-radius: 12px - padding: .75rem 0 0 1.5rem - margin: 2rem 0 23rem + margin: 2rem 0 2rem @media (min-width: 1536px) display: flex - margin: 3rem -6rem 2rem - justify-content: space-between + margin: 3rem -12rem 2rem 0 + align-items: stretch .request - .extra-class - // background-color: #7a7a7a + background-color: rgba(62,67,88,.7) + padding: 0 1rem 1rem + border-radius: 12px + font-size: 90% + color: rgba(241,251,255,.8) @media (min-width: 1536px) flex: 0 0 48% - max-width: 48% + border-radius: 12px 0 0 12px + .custom-block-title + text-transform: uppercase + margin-left: -1rem + margin-right: -1rem + margin-top: 0 + border-radius: 12px 12px 0 0 + padding: .5rem 1rem + font-weight: 400 + background-color: #373D4F + background-color: rgba(55,61,79,1) + color: #cacaca; + font-size: 90%; + @media (min-width: 1536px) + border-radius: 12px 0 0 0 + .custom-block-title+p + padding-top: 1rem + p, ul, ol + color: #2c3e50 + color: rgba(241,251,255,.8) + p + padding-left: 1rem + ul, ol + padding-left: 3rem + [class^="language-"] + background-color: transparent + font-size: 110% + pre + padding: 1rem 0 0 1rem + code + color: rgb(241,251,255) + background-color: rgba(90,90,90,.5) + .token + color: rgb(241,251,255) + &.punctuation + &.operator + color: rgba(241,251,255,.6) + &.property + color: rgb(241,251,255) + &.string + color: rgba(133, 217, 150, 1) + &.number + // color: rgb(245,106,11) + color: rgb(244,244,0) + // color: rgb(164, 205, 254) .response + background-color: rgba(220,226,234,.4) margin-top: 2rem + padding: 0 1rem 1rem + border-radius: 12px + font-size: 90% @media (min-width: 1536px) + flex: 0 0 45% margin-top: 0 - flex: 0 0 48% - p, ul - padding-right: 1rem + border-radius: 0 12px 12px 0 + .extra-class::before + color: rgba(42,64,80,.4) .custom-block-title + background-color: rgba(220,226,234,1) + border-radius: 12px 12px 0 0 + margin-left: -1rem + margin-right: -1rem + text-transform: uppercase + padding: .5rem 1rem + margin-top: 0 + font-weight: 400 + font-size: 90%; margin-bottom: .5rem + @media (min-width: 1536px) + border-radius: 0 12px 0 0 + [class^="language-"] + background-color: transparent + font-size: 110% + pre + padding: 1rem 0 0 1rem + code + .token + color: rgb(241,251,255) + &.punctuation + &.operator + color: rgba(42,64,80,.4) + &.property + color: rgba(42,64,80,.8) + &.string + color: rgba(27,137,70,1) + &.number + color: rgb(245,106,11) .request .response .extra-class @@ -72,3 +150,34 @@ margin-bottom: 0 .custom-block.details color rgb(44, 62, 80) + + +/** + * Uncomment this alternate style below + to highlight non-code text that would be + inside a request container + */ +// .custom-block +// .request +// [class^="language-"] +// &+p +// &~ol +// &~ul +// background-color: #eeeeee +// margin-left: -1rem +// margin-right: -1rem +// padding: 1rem 2rem +// color: #2c3e50 +// code +// color: #2c3e50 +// &~ol +// &~ul +// padding: 1rem 4rem +// &+p+ol +// &+p+ul +// margin-top: -1rem +// &~ol:last-of-type +// &~ul:last-of-type +// &~p:last-of-type +// margin-bottom: -1.5rem +// border-radius: 0 0 12px 12px From d738becd8c14c734d208be3c2823b7afa4369cba Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Wed, 7 Jul 2021 19:15:52 +0200 Subject: [PATCH 10/35] Use api-callout container on existing documentation --- .../content-api/content-api.md | 88 ++++------- .../latest/development/plugins/i18n.md | 139 ++++++------------ 2 files changed, 68 insertions(+), 159 deletions(-) diff --git a/docs/developer-docs/latest/developer-resources/content-api/content-api.md b/docs/developer-docs/latest/developer-resources/content-api/content-api.md index 80d26632d1..a29cf12589 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/content-api.md +++ b/docs/developer-docs/latest/developer-resources/content-api/content-api.md @@ -299,21 +299,15 @@ Here are some Content Type examples Returns entries matching the query filters. You can read more about parameters [here](#api-parameters). -:::: tabs - -::: tab Request +:::: api-call -**Example request** +::: request Example request -```js -GET http://localhost:1337/restaurants -``` +`GET http://localhost:1337/restaurants` ::: -::: tab Response - -**Example response** +::: response Example response ```json [ @@ -382,21 +376,15 @@ GET http://localhost:1337/restaurants Returns an entry by id. -:::: tabs - -::: tab Request +:::: api-call -**Example request** +::: request Example request -```js -GET http://localhost:1337/restaurants/1 -``` +`GET http://localhost:1337/restaurants/1` ::: -::: tab Response - -**Example response** +::: response Example response ```json { @@ -463,25 +451,17 @@ GET http://localhost:1337/restaurants/1 Returns the count of entries matching the query filters. You can read more about parameters [here](#api-parameters). -:::: tabs - -::: tab Request +:::: api-call -**Example request** +::: request Example request -```js -GET http://localhost:1337/restaurants/count -``` +`GET http://localhost:1337/restaurants/count` ::: -::: tab Response +::: response Example response -**Example response** - -``` -1 -``` +`1` ::: @@ -493,15 +473,11 @@ Creates an entry and returns its value. If the [Internationalization (i18n) plugin](/developer-docs/latest/development/plugins/i18n.md) is installed, it's possible to use POST requests to the Content API to [create localized entries](/developer-docs/latest/development/plugins/i18n.md#creating-a-new-localized-entry). -:::: tabs - -::: tab Request +:::: api-call -**Example request** +::: request Example request -```js -POST http://localhost:1337/restaurants -``` +`POST http://localhost:1337/restaurants` ```json { @@ -532,9 +508,7 @@ POST http://localhost:1337/restaurants ::: -::: tab Response - -**Example response** +::: response Example response ```json { @@ -607,15 +581,11 @@ Fields that aren't sent in the query are not changed in the database. Send a `nu It's currently not possible to [update the locale of an entry](/developer-docs/latest/development/plugins/i18n.md#updating-an-entry). ::: -:::: tabs - -::: tab Request +:::: api-call -**Example request** +::: request Example request -```js -PUT http://localhost:1337/restaurants/1 -``` +`PUT http://localhost:1337/restaurants/1` ```json { @@ -655,9 +625,7 @@ PUT http://localhost:1337/restaurants/1 ::: -::: tab Response - -**Example response** +::: response Example response ```json { @@ -730,21 +698,15 @@ PUT http://localhost:1337/restaurants/1 Deletes an entry by id and returns its value. -:::: tabs - -::: tab Request +:::: api-call -**Example request** +::: request Example request -```js -DELETE http://localhost:1337/restaurants/1 -``` +`DELETE http://localhost:1337/restaurants/1` ::: -::: tab Response - -**Example response** +::: response Example response ```json { diff --git a/docs/developer-docs/latest/development/plugins/i18n.md b/docs/developer-docs/latest/development/plugins/i18n.md index a7511b32ff..e73463a7d1 100644 --- a/docs/developer-docs/latest/development/plugins/i18n.md +++ b/docs/developer-docs/latest/development/plugins/i18n.md @@ -109,22 +109,15 @@ When the i18n plugin is installed, the response to requests includes fields that - `locale`(string) is the locale code for the localized content entry - `published_at` (string) is the date and time when the localized content entry was [published](/developer-docs/latest/concepts/draft-and-publish.md#publishing-a-draft), in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format +:::: api-call -:::: tabs - -::: tab Request +::: request Example request -**Example request** - -```http -GET http://localhost:1337/restaurants?_locale=fr -``` +`GET http://localhost:1337/restaurants?_locale=fr` ::: -::: tab Response - -**Example response** +::: response Example Response ```json [ @@ -151,12 +144,13 @@ GET http://localhost:1337/restaurants?_locale=fr ] ``` +::: +:::: + In the example response above: - restaurant with `"id": 4` is a French (`"locale": "fr"`) localization of the existing restaurant with `"id": 3` (created for the default `en` locale), as shown in the `localizations` object included in the response (see [creating a localization for an existing entry](#creating-a-localization-for-an-existing-entry)). - restaurant with `"id": "8"` was created from scratch using the API, passing the `locale: fr` in the request body (see [creating a new localized entry](#creating-a-new-localized-entry)). -::: -:::: ### Creating a new localized entry @@ -164,14 +158,10 @@ To create a localized entry from scratch, send a POST request to the Content API If no locale has been passed in the request body, the entry is created using the default locale for the application: -:::: tabs -::: tab Request - -**Example request** +:::: api-call +::: request Example request -```http -POST http://localhost:1337/restaurants -``` +`POST http://localhost:1337/restaurants` ```json { @@ -182,9 +172,7 @@ POST http://localhost:1337/restaurants ::: -::: tab Response - -**Example response** +::: response Example response ```json { @@ -201,14 +189,10 @@ POST http://localhost:1337/restaurants To create a localized entry for a locale different from the default one, add the `locale` attribute to the body of the POST request: -:::: tabs -::: tab Request +:::: api-call +::: request Example request -**Example request** - -```http -POST http://localhost:1337/restaurants -``` +`POST http://localhost:1337/restaurants` ```json { @@ -220,8 +204,7 @@ POST http://localhost:1337/restaurants ::: -::: tab Response -**Example response** +::: response Example response ```json { @@ -258,20 +241,17 @@ When sending a POST request to a collection type, Strapi will: 1. use the `id` as a base entry for the non-localized fields and copy them in the new entry 2. then create a new entry for the given locale and link it with the base entry. -:::: tabs - -::: tab Request +:::: api-call -**Example request** +::: request Example request -```http -POST http://localhost:1337/restaurants/8/localizations -``` +`POST http://localhost:1337/restaurants/8/localizations` ```json { "locale": "en", "name": "She's Cake", + "test": 9, "description": "She's Cake restaurant description in English" } ``` @@ -281,12 +261,9 @@ This request: 1. creates a new entry in `en` 2. links the created entry with `restaurant:8` (they will share the same `localizations` object) 3. copies every non-localized fields from `restaurant:8` into the new entry and keeps the localized fields from the request's body - ::: -::: tab Response - -**Example reponse** +::: response Example reponse ```json { @@ -308,17 +285,14 @@ This request: :::: + #### Creating a localization for a single type -:::: tabs +:::: api-call -::: tab Request +::: request Example request -**Example request** - -```http -POST http://localhost:1337/homepage/localizations -``` +`POST http://localhost:1337/homepage/localizations` ```json { @@ -329,9 +303,7 @@ POST http://localhost:1337/homepage/localizations ::: -::: tab Response - -**Example reponse** +::: response Example reponse ```json { @@ -377,11 +349,9 @@ To fetch entries for all locales, use `locale: "all"` in the query. ::: #### Fetching a collection type -:::: tabs +:::: api-call -::: tab Query - -**Example query** +::: request Example query ```graphql query { @@ -399,9 +369,7 @@ query { ::: -::: tab Response - -**Example response** +::: response Example response ```json { @@ -445,11 +413,9 @@ query { :::: #### Fetching a single type -:::: tabs - -::: tab Query +:::: api-call -**Example query** +::: request Example query ```graphql query { @@ -467,9 +433,7 @@ query { ::: -::: tab Response - -**Example response** +::: response Example response ```json { @@ -501,11 +465,9 @@ The `locale` field can be passed in the `data` object of the mutation to create #### Creating a new localization for a collection type -:::: tabs +:::: api-call -::: tab Mutation - -**Example mutation** +::: request Example mutation ```graphql mutation { @@ -531,9 +493,7 @@ mutation { ::: -::: tab Response - -**Example response** +::: response Example response ```json { @@ -562,11 +522,9 @@ mutation { #### Creating a new localization for a single type -:::: tabs - -::: tab Mutation +:::: api-call -**Example mutation** +::: request Example mutation ```graphql mutation { @@ -592,9 +550,7 @@ mutation { ::: -::: tab Response - -**Example response** +::: response Example response ```json { @@ -624,11 +580,9 @@ A `locale` argument can be passed in the mutation to update content for a given Currently, it is not possible to change the locale of an existing localized entry. If you set a `locale` field in the `data` object of the mutation, it will be ignored. -:::: tabs - -::: tab Mutation +:::: api-call -**Example mutation** +::: request Example mutation ```graphql mutation { @@ -647,9 +601,7 @@ mutation { ::: -::: tab Response - -**Example response** +::: response Example response ```json { @@ -665,18 +617,15 @@ mutation { ``` ::: - :::: ### Deleting a localization for a single type with GraphQL Pass the `locale` argument in the mutation to delete a specific localization for a single type: -:::: tabs - -::: tab Mutation +:::: api-call -**Example mutation** +::: request Example mutation ```graphql mutation { @@ -691,9 +640,7 @@ mutation { ::: -::: tab Response - -**Example response** +::: response Example response ```json { From ba3b5c2b480356be246d289144e99d88dec7e4c3 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Fri, 16 Jul 2021 09:56:38 +0200 Subject: [PATCH 11/35] Remove emoji from :::strapi as it's included --- docs/developer-docs/latest/getting-started/introduction.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/developer-docs/latest/getting-started/introduction.md b/docs/developer-docs/latest/getting-started/introduction.md index 5819e12fcf..4aebe82bde 100644 --- a/docs/developer-docs/latest/getting-started/introduction.md +++ b/docs/developer-docs/latest/getting-started/introduction.md @@ -7,7 +7,7 @@ description: This documentation contains all technical documentation related to This documentation contains all technical documentation related to the setup, deployment, update and customization of your Strapi application. -::: strapi πŸ€“ Can't wait to start using Strapi? +::: strapi Can't wait to start using Strapi? You can directly head to the [Quick Start](quick-start.md)!
If demos are more your thing, we have a [video demo](https://youtu.be/zd0_S_FPzKg), or you can request a [live demo](https://strapi.io/demo)! ::: @@ -32,7 +32,7 @@ Strapi is a community-oriented project with an emphasis on transparency. The Str Community members also take great part in providing the whole community a plethora of resources about Strapi. You can find [tutorials](https://strapi.io/tutorials/) on the Strapi website, where you can also create your own. Also, as an open-source project, the technical documentation of Strapi is open to contributions (see [Open-source & Contribution](#open-source-contribution)). -::: strapi πŸ€“ Want to join the community? +::: strapi Want to join the community? You can join [GitHub](https://github.com/strapi/strapi) and the [forum](https://forum.strapi.io/) and share your ideas and opinions with other community members and members of the Strapi team. If you're looking for news and updates about Strapi, [Twitter](https://twitter.com/strapijs) and the [blog](https://strapi.io/blog) are pretty good places to start! ::: From 6d6de6091357307a7cb2e4976fd969a0e88e5450 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Fri, 16 Jul 2021 10:19:37 +0200 Subject: [PATCH 12/35] Add 'note' custom callout --- docs/.vuepress/config.js | 5 +++++ docs/.vuepress/styles/strapi-custom-blocks.styl | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index be70aae48a..3d70c20696 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -409,6 +409,11 @@ const plugins = [ before: info => `

πŸ’‘ ${info}

`, after: '
' }], + ['vuepress-plugin-container', { + type: 'note', + before: info => `

✏️ ${info}

`, + after: '
' + }], ['vuepress-plugin-container', { type: 'prerequisites', defaultTitle: 'PREREQUISITES' diff --git a/docs/.vuepress/styles/strapi-custom-blocks.styl b/docs/.vuepress/styles/strapi-custom-blocks.styl index def0c3fd6a..02604db40f 100644 --- a/docs/.vuepress/styles/strapi-custom-blocks.styl +++ b/docs/.vuepress/styles/strapi-custom-blocks.styl @@ -6,6 +6,7 @@ &.callout-alt &.strapi &.prerequisites + &.note padding .1rem 1.5rem margin-top 2rem margin-bottom 2rem @@ -30,6 +31,9 @@ border-radius: 10px background-color: #eff5f7 border: none + &.note + background-color #f4fcff + border-color #0193C2 .custom-block.details color rgb(44, 62, 80) From 90728e86d800033b49b1c7fd56c571a99a452009 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Fri, 16 Jul 2021 17:09:09 +0200 Subject: [PATCH 13/35] Add 'important', 'caution' and 'warning' custom callouts In our mind, they are 3 different levels: - important, the less strong - caution, medium importance ( = VuePress's default 'warning') - warning, the strongest ( = VuePress's default 'danger') --- docs/.vuepress/config.js | 15 +++++++++++ .../styles/strapi-custom-blocks.styl | 27 ++++++++++++++++++- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 3d70c20696..fb03766c64 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -414,10 +414,25 @@ const plugins = [ before: info => `

✏️ ${info}

`, after: '
' }], + ['vuepress-plugin-container', { + type: 'caution', + before: info => `

⚠️ ${info}

`, + after: '
' + }], + ['vuepress-plugin-container', { + type: 'warning', + before: info => `

${info}

`, + after: '
' + }], ['vuepress-plugin-container', { type: 'prerequisites', defaultTitle: 'PREREQUISITES' }], + ['vuepress-plugin-container', { + type: 'important', + before: info => `

οΈβœ‹ ${info}

`, + after: '
' + }], ]; module.exports = { diff --git a/docs/.vuepress/styles/strapi-custom-blocks.styl b/docs/.vuepress/styles/strapi-custom-blocks.styl index 02604db40f..8093922d9a 100644 --- a/docs/.vuepress/styles/strapi-custom-blocks.styl +++ b/docs/.vuepress/styles/strapi-custom-blocks.styl @@ -7,6 +7,11 @@ &.strapi &.prerequisites &.note + &.tip + &.important + &.warning + &.danger + &.caution padding .1rem 1.5rem margin-top 2rem margin-bottom 2rem @@ -32,8 +37,28 @@ background-color: #eff5f7 border: none &.note - background-color #f4fcff + // background-color #f4fcff + background-color #f3f5f7 border-color #0193C2 + &.important + border-color #DDA537 + background-color #F3F5F7 + &.caution + border-color #E7C000 + background-color rgba(255,229,100,.3) + color #6b5900 + .custom-block-title + color #B29400 + a + color #2c3e50 + &.warning + border-color #cc0000 + background-color rgb(255, 230, 230) + color #4d0000 + .custom-block-title + color #900 + a + color #2c3e50 .custom-block.details color rgb(44, 62, 80) From b55e21ed9eeec39c1d41b8cb73c96e4a5e36822a Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Mon, 19 Jul 2021 11:50:29 +0200 Subject: [PATCH 14/35] Remove important callout & cleanup CSS We decided that we'll go with a unique callout, "caution". The title can still be adjusted when necessary. --- docs/.vuepress/config.js | 9 ++------- docs/.vuepress/styles/strapi-custom-blocks.styl | 9 +++------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index fb03766c64..3a2b9d29e3 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -416,23 +416,18 @@ const plugins = [ }], ['vuepress-plugin-container', { type: 'caution', - before: info => `

⚠️ ${info}

`, + before: info => `

βœ‹ ${info}

`, after: '
' }], ['vuepress-plugin-container', { type: 'warning', - before: info => `

${info}

`, + before: info => `

⚠️ ${info}

`, after: '
' }], ['vuepress-plugin-container', { type: 'prerequisites', defaultTitle: 'PREREQUISITES' }], - ['vuepress-plugin-container', { - type: 'important', - before: info => `

οΈβœ‹ ${info}

`, - after: '
' - }], ]; module.exports = { diff --git a/docs/.vuepress/styles/strapi-custom-blocks.styl b/docs/.vuepress/styles/strapi-custom-blocks.styl index 8093922d9a..5045ededa0 100644 --- a/docs/.vuepress/styles/strapi-custom-blocks.styl +++ b/docs/.vuepress/styles/strapi-custom-blocks.styl @@ -8,7 +8,6 @@ &.prerequisites &.note &.tip - &.important &.warning &.danger &.caution @@ -37,12 +36,8 @@ background-color: #eff5f7 border: none &.note - // background-color #f4fcff - background-color #f3f5f7 + background-color #f4fcff border-color #0193C2 - &.important - border-color #DDA537 - background-color #F3F5F7 &.caution border-color #E7C000 background-color rgba(255,229,100,.3) @@ -59,6 +54,8 @@ color #900 a color #2c3e50 + &.tip + background-color #EFFDF6 .custom-block.details color rgb(44, 62, 80) From e3042509d729090ed9a5189f168c3edbb351a5e2 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Tue, 20 Jul 2021 17:34:30 +0200 Subject: [PATCH 15/35] Merge branch 'repo/snippets' into repo/vuepress-enhanced --- docs/.vuepress/config.js | 6 ++++++ .../configurations/databases/mongodb.md | 4 ++-- .../latest/setup-deployment-guides/installation/cli.md | 4 ++-- .../latest/setup-deployment-guides/installation/docker.md | 5 +++-- docs/developer-docs/latest/snippets/mongodb-warning.md | 2 ++ docs/package.json | 1 + docs/yarn.lock | 5 +++++ 7 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 docs/developer-docs/latest/snippets/mongodb-warning.md diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 6de9c33419..628e0c902f 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -676,4 +676,10 @@ module.exports = { '/user-docs/latest/': sidebar.user, }, }, + markdown: { + extendMarkdown: md => { + // use more markdown-it plugins! + md.use(require('markdown-it-include')) + } + } }; diff --git a/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/mongodb.md b/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/mongodb.md index 4dc21e0df4..2bf599102d 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/mongodb.md +++ b/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/mongodb.md @@ -5,8 +5,8 @@ description: Learn how to install MongoDB on your computer and using it for your # MongoDB Installation -::: warning WARNING -Starting from the release of Strapi v4, MongoDB is not supported natively anymore and no connector is available. For more information, please refer to [the official communication on the topic](https://strapi.io/blog/mongo-db-support-in-strapi-past-present-and-future). +::: caution +!!!include(developer-docs/latest/snippets/mongodb-warning.md)!!! ::: ## Install MongoDB locally diff --git a/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md b/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md index 8a10b7f848..8f2a4e1489 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md +++ b/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md @@ -16,8 +16,8 @@ The CLI installation guide requires at least two software prerequisites to be al A database is also required for any Strapi project. Strapi currently supports the following databases: -::: warning WARNING -Starting from the release of Strapi v4, MongoDB is not supported natively anymore and no connector is available. For more information, please refer to [the official communication on the topic](https://strapi.io/blog/mongo-db-support-in-strapi-past-present-and-future). +::: caution +!!!include(developer-docs/latest/snippets/mongodb-warning.md)!!! ::: | Database | Minimum version | diff --git a/docs/developer-docs/latest/setup-deployment-guides/installation/docker.md b/docs/developer-docs/latest/setup-deployment-guides/installation/docker.md index 268abe6ac7..edc1340092 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/installation/docker.md +++ b/docs/developer-docs/latest/setup-deployment-guides/installation/docker.md @@ -70,8 +70,9 @@ You can find the official Docker image for Strapi in the [Docker Hub](https://hu :::: tab MongoDB - - ::: warning WARNING + :::caution + + Starting from the release of Strapi v4, MongoDB is not supported natively anymore and no connector is available. For more information, please refer to [the official communication on the topic](https://strapi.io/blog/mongo-db-support-in-strapi-past-present-and-future). ::: diff --git a/docs/developer-docs/latest/snippets/mongodb-warning.md b/docs/developer-docs/latest/snippets/mongodb-warning.md new file mode 100644 index 0000000000..fb2362d4c8 --- /dev/null +++ b/docs/developer-docs/latest/snippets/mongodb-warning.md @@ -0,0 +1,2 @@ + +Starting from the release of Strapi v4, MongoDB is not supported natively anymore and no connector is available. For more information, please refer to [the official communication on the topic](https://strapi.io/blog/mongo-db-support-in-strapi-past-present-and-future). diff --git a/docs/package.json b/docs/package.json index c3ce79bc87..f42aa668ce 100644 --- a/docs/package.json +++ b/docs/package.json @@ -11,6 +11,7 @@ "dependencies": { "@vuepress/plugin-google-analytics": "^1.7.1", "@vuepress/plugin-medium-zoom": "^1.7.1", + "markdown-it-include": "^2.0.0", "vuepress": "^1.7.1", "vuepress-plugin-code-copy": "^1.0.6", "vuepress-plugin-element-tabs": "^0.2.8", diff --git a/docs/yarn.lock b/docs/yarn.lock index 66d8cddb87..e0246054a7 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -5079,6 +5079,11 @@ markdown-it-emoji@^1.4.0: resolved "https://registry.yarnpkg.com/markdown-it-emoji/-/markdown-it-emoji-1.4.0.tgz#9bee0e9a990a963ba96df6980c4fddb05dfb4dcc" integrity sha1-m+4OmpkKljupbfaYDE/dsF37Tcw= +markdown-it-include@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/markdown-it-include/-/markdown-it-include-2.0.0.tgz#e86e3b3c68c8f0e0437e179ba919ffd28443127a" + integrity sha512-wfgIX92ZEYahYWiCk6Jx36XmHvAimeHN420csOWgfyZjpf171Y0xREqZWcm/Rwjzyd0RLYryY+cbNmrkYW2MDw== + markdown-it-table-of-contents@^0.4.0: version "0.4.4" resolved "https://registry.yarnpkg.com/markdown-it-table-of-contents/-/markdown-it-table-of-contents-0.4.4.tgz#3dc7ce8b8fc17e5981c77cc398d1782319f37fbc" From bf37efa480bf9078a9dc59b6fc7d661d09058b3a Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Tue, 20 Jul 2021 19:05:15 +0200 Subject: [PATCH 16/35] Apply new callouts and minimal tab styles everywhere --- .../latest/developer-resources/cli/CLI.md | 8 +-- .../content-api/content-api.md | 34 ++++----- .../global-strapi/api-reference.md | 2 +- .../latest/development/admin-customization.md | 21 +++--- .../development/backend-customization.md | 70 ++++++++++--------- .../local-plugins-customization.md | 12 ++-- .../development/plugin-customization.md | 2 +- .../development/plugins/documentation.md | 6 +- .../latest/development/plugins/email.md | 2 +- .../latest/development/plugins/graphql.md | 10 +-- .../latest/development/plugins/i18n.md | 2 +- .../latest/development/plugins/upload.md | 16 ++--- .../development/plugins/users-permissions.md | 8 +-- .../getting-started/usage-information.md | 4 +- .../latest/guides/auth-request.md | 2 +- docs/developer-docs/latest/guides/client.md | 10 ++- .../latest/guides/custom-admin.md | 4 +- .../latest/guides/custom-data-response.md | 2 +- docs/developer-docs/latest/guides/draft.md | 2 +- .../latest/guides/error-catching.md | 2 +- docs/developer-docs/latest/guides/is-owner.md | 2 +- .../latest/guides/jwt-validation.md | 2 +- .../latest/guides/process-manager.md | 10 ++- .../guides/registering-a-field-in-admin.md | 12 ++-- .../latest/guides/secure-your-app.md | 10 ++- docs/developer-docs/latest/guides/slug.md | 4 +- .../latest/guides/unit-testing.md | 15 ++-- .../setup-deployment-guides/configurations.md | 41 ++++++----- .../configurations/databases/mongodb.md | 21 +++--- .../configurations/databases/sqlite.md | 2 +- .../setup-deployment-guides/deployment.md | 4 +- .../deployment/hosting-guides/21yunbox.md | 2 +- .../deployment/hosting-guides/amazon-aws.md | 2 +- .../digitalocean-app-platform.md | 2 +- .../deployment/hosting-guides/digitalocean.md | 4 +- .../hosting-guides/google-app-engine.md | 4 +- .../deployment/hosting-guides/heroku.md | 26 +++---- .../deployment/hosting-guides/qovery.md | 10 +-- .../deployment/hosting-guides/render.md | 2 +- .../optional-software/caddy-proxy.md | 8 +-- .../optional-software/haproxy-proxy.md | 8 +-- .../optional-software/nginx-proxy.md | 8 +-- .../installation/docker.md | 2 +- .../installation/render.md | 2 +- .../update-migration-guides/update-version.md | 6 +- 45 files changed, 224 insertions(+), 204 deletions(-) diff --git a/docs/developer-docs/latest/developer-resources/cli/CLI.md b/docs/developer-docs/latest/developer-resources/cli/CLI.md index dc90034510..9b2c6a1882 100644 --- a/docs/developer-docs/latest/developer-resources/cli/CLI.md +++ b/docs/developer-docs/latest/developer-resources/cli/CLI.md @@ -59,7 +59,7 @@ options: [--no-build |--watch-admin |--browser ] - **strapi develop --watch-admin --browser 'google chrome'**
Starts your application with the autoReload enabled and the front-end development server. It allows you to customize the administration panel. Provide a browser name to use instead of the default one, `false` means stop opening the browser. -::: tip +:::warning You should never use this command to run a Strapi application in production. ::: @@ -120,7 +120,7 @@ Options: All these examples are equivalent. -::: warning +:::caution When configuring your application you often enter credentials for third party services (e.g authentication providers). Be aware that those credentials will also be dumped into the output of this command. In case of doubt, you should avoid committing the dump file into a versioning system. Here are some methods you can explore: @@ -372,7 +372,7 @@ strapi install Example: `strapi install graphql` will install the plugin `strapi-plugin-graphql` -::: warning +:::caution Some plugins have admin panel integrations, your admin panel might have to be rebuilt. This can take some time. ::: @@ -396,7 +396,7 @@ options [--delete-files] Example: `strapi uninstall graphql --delete-files` will remove the plugin `strapi-plugin-graphql` and all the files in `./extensions/graphql` -::: warning +:::caution Some plugins have admin panel integrations, your admin panel might have to be rebuilt. This can take some time. ::: diff --git a/docs/developer-docs/latest/developer-resources/content-api/content-api.md b/docs/developer-docs/latest/developer-resources/content-api/content-api.md index 80d26632d1..29415860c5 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/content-api.md +++ b/docs/developer-docs/latest/developer-resources/content-api/content-api.md @@ -10,8 +10,8 @@ sidebarDepth: 3 When you create a `Content Type` you will have a certain number of **REST API endpoints** available to interact with it. -::: warning -Components don't have API endpoints +:::caution +Components don't have API endpoints. ::: As an **example**, let's consider the following models: @@ -29,7 +29,7 @@ As an **example**, let's consider the following models: --- -:::: tabs +:::: tabs card ::: tab Content Types @@ -117,7 +117,7 @@ Here is the list of endpoints generated for each of your **Content Types**. -:::: tabs +:::: tabs card ::: tab Collection Type @@ -158,7 +158,7 @@ Here are some Content Type examples ##### Single Types -:::: tabs +:::: tabs card ::: tab Homepage @@ -196,7 +196,7 @@ Here are some Content Type examples ##### Collection Types -:::: tabs +:::: tabs card ::: tab Restaurant @@ -603,7 +603,7 @@ POST http://localhost:1337/restaurants Partially updates an entry by `id` and returns its value. Fields that aren't sent in the query are not changed in the database. Send a `null` value if you want to clear them. -::: tip NOTE +:::note It's currently not possible to [update the locale of an entry](/developer-docs/latest/development/plugins/i18n.md#updating-an-entry). ::: @@ -819,7 +819,7 @@ DELETE http://localhost:1337/restaurants/1 -::: warning +:::caution By default, the filters can only be used from `find` and `count` endpoints generated by the Content-Types Builder and the [CLI](../cli/CLI.md). ::: @@ -881,7 +881,7 @@ or #### Complex queries -::: tip NOTE +:::note `OR` and `AND` operations are available starting from v3.1.0 ::: @@ -891,7 +891,7 @@ We are taking advantage of the capability of `qs` to parse nested objects to cre This will give you full power to create complex queries with logical `AND` and `OR` operations. -::: tip NOTE +:::caution We strongly recommend using `qs` directly to generate complex queries instead of creating them manually. ::: @@ -966,7 +966,7 @@ await request(`/restaurant?${query}`); // GET /restaurants?_where[stars][0]=1&_where[stars][1]=2 ``` -::: tip NOTE +:::note When using the `in` and `nin` filters the array is not transformed into a OR. ::: @@ -1006,8 +1006,8 @@ await request(`/restaurants?${query}`); // GET /restaurants?_where[_or][0][0][stars]=2&_where[_or][0][1][pricing_lt]=80&_where[_or][1][0][stars]=1&_where[_or][1][1][categories.name]=French ``` -::: warning -When creating nested queries, make sure the depth is less than 20 or the query string parsing will fail for now. +:::caution +When creating nested queries, make sure the depth is less than 20 or the query string parsing will fail. ::: #### Deep filtering @@ -1030,8 +1030,8 @@ To achieve this, there are three options: - Use [GraphQL](/developer-docs/latest/development/plugins/graphql.md#query-api). ::: -::: warning -This feature isn't available for **polymorphic** relations. This relation type is used in `media`, `component` and `dynamic zone` fields. +:::caution +This feature isn't available for polymorphic relations. This relation type is used in `media`, `component` and `dynamic zone` fields. ::: ### Sort @@ -1076,7 +1076,7 @@ Skip a specific number of entries (especially useful for pagination). ### Publication State -::: tip NOTE +:::note This parameter can only be used on models with the **Draft & Publish** feature activated ::: @@ -1099,7 +1099,7 @@ OR `GET /articles?_publicationState=preview` -::: tip NOTE +:::note If you only want to retrieve your draft entries, you can combine the `preview` mode and the `published_at` field. `GET /articles?_publicationState=preview&published_at_null=true` ::: diff --git a/docs/developer-docs/latest/developer-resources/global-strapi/api-reference.md b/docs/developer-docs/latest/developer-resources/global-strapi/api-reference.md index 2d1f0bdc91..76f2eed385 100644 --- a/docs/developer-docs/latest/developer-resources/global-strapi/api-reference.md +++ b/docs/developer-docs/latest/developer-resources/global-strapi/api-reference.md @@ -46,7 +46,7 @@ Returns an object that represents the configurations of the project. Every JavaS Returns an object of the controllers which is available in the project. Every JavaScript file located in the `./api/**/controllers` folder will be parsed into the `strapi.controllers` object. Thanks to this object, you can access every controller's actions everywhere in the project. -::: tip +:::note This object doesn't include the admin's controllers and plugin's controllers. ::: diff --git a/docs/developer-docs/latest/development/admin-customization.md b/docs/developer-docs/latest/development/admin-customization.md index 7e4e915def..aecb2e388a 100644 --- a/docs/developer-docs/latest/development/admin-customization.md +++ b/docs/developer-docs/latest/development/admin-customization.md @@ -18,8 +18,8 @@ In this folder you will be able to override admin files and functions. The administration panel can be customized according to your needs, so you can make it reflect your identity. -::: warning -To apply your changes you need to [rebuild](#build) your admin panel +:::caution +To apply changes you need to [rebuild](#build) the admin panel. ::: ### Change access URL @@ -86,7 +86,7 @@ export default trads; ``` ::: tip -With this modification only English and French will be available in your admin +With this modification only English and French will be available in your admin. ::: #### Customize a plugin @@ -143,8 +143,8 @@ cp ./node_modules/strapi-admin/admin/src/components/LeftMenu/LeftMenuHeader/Wrap Thus, files in `admin/src/some/file/path` take precedence over `node_modules/strapi-admin/admin/src/file/path`. -::: warning -To apply your changes you need to [rebuild](#build) your admin panel +:::caution +To apply changes you need to [rebuild](#build) the admin panel. ::: #### Logo @@ -154,7 +154,7 @@ To change the top-left displayed admin panel's logo, add your custom image at `. To change the login page's logo, add your custom image at `./admin/src/assets/images/logo_strapi.png`. ::: tip -make sure the size of your image is the same as the existing one (434px x 120px). +Make sure the size of your image is the same as the existing one (434px x 120px). ::: #### Tutorial videos @@ -191,7 +191,7 @@ module.exports = ({ env }) => ({ To build the administration, run the following command from the root directory of your project. -:::: tabs +:::: tabs card ::: tab yarn @@ -238,7 +238,6 @@ module.exports = { }; ``` - ## Deployment The administration is nothing more than a React front-end application calling an API. The front-end and the back-end are independent and can be deployed on different servers which brings us to different scenarios: @@ -266,7 +265,7 @@ module.exports = ({ env }) => ({ }); ``` -::: warning +:::caution To apply your changes you need to [rebuild](#build) your admin panel ::: @@ -292,8 +291,8 @@ After running `yarn build` with this configuration, the folder `build` will be c The administration URL will then be `http://yourfrontend.com` and every request from the panel will hit the backend at `http://yourbackend.com`. -::: tip NOTE -If you add a path to the `url` option, it won't prefix your app. To do so, you need to also use a proxy server like Nginx. More [here](/developer-docs/latest/setup-deployment-guides/deployment.md#optional-software-guides). +:::note +If you add a path to the `url` option, it won't prefix your app. To do so, you need to also use a proxy server like Nginx (see [optional software guides](/developer-docs/latest/setup-deployment-guides/deployment.md#optional-software-guides)). ::: diff --git a/docs/developer-docs/latest/development/backend-customization.md b/docs/developer-docs/latest/development/backend-customization.md index 29c2d61695..42b9d02087 100644 --- a/docs/developer-docs/latest/development/backend-customization.md +++ b/docs/developer-docs/latest/development/backend-customization.md @@ -153,7 +153,7 @@ In this example, we are verifying that a session is open. If it is the case, we To apply policies to a route, you need to associate an array of policies to it. There are two kinds of policies: global and scoped. -::: warning +:::caution To apply policies with GraphQL please see the [following guide](/developer-docs/latest/development/plugins/graphql.md#execute-a-policy-before-a-resolver). ::: @@ -311,8 +311,8 @@ When you create a new `Content Type` you will see a new empty controller has bee Here are the core methods (and their current implementation). You can simply copy and paste this code in your own controller file to customize the methods. -::: warning -In the following example we will assume your controller, service and model are named `restaurant` +:::caution +In the following example we will assume your controller, service and model are named `restaurant`. ::: ##### Utils @@ -328,7 +328,7 @@ const { parseMultipartData, sanitizeEntity } = require('strapi-utils'); ##### Collection Type -:::: tabs +:::: tabs card ::: tab find @@ -499,7 +499,7 @@ module.exports = { ##### Single Type -:::: tabs +:::: tabs card ::: tab find @@ -686,7 +686,7 @@ const { isDraft } = require('strapi-utils').contentTypes; ##### Collection Type -:::: tabs +:::: tabs card ::: tab find @@ -972,7 +972,7 @@ module.exports = { ##### Single Type -:::: tabs +:::: tabs card ::: tab find @@ -1153,7 +1153,7 @@ These queries handle for you specific Strapi features like `components`, `dynami ### API Reference -:::: tabs +:::: tabs card ::: tab find @@ -1479,7 +1479,7 @@ strapi.query(modelName, plugin).model; Then you can run any queries available on the model. You should refer to the specific ORM documentation for more details: -:::: tabs +:::: tabs card ::: tab SQL @@ -1696,7 +1696,7 @@ Additional settings can be set on models: In this example, the model `Restaurant` will be accessible through the `Restaurants` global variable. The data will be stored in the `Restaurants_v1` collection or table and the model will use the `mongo` connection defined in `./config/database.js` -::: warning +:::caution If not set manually in the JSON file, Strapi will adopt the filename as `globalId`. The `globalId` serves as a reference to your model within relations and Strapi APIs. If you chose to rename it (either by renaming your file or by changing the value of the `globalId`), you'd have to migrate your tables manually and update the references. Please note that you should not alter the Strapi's models `globalId` (plugins and core models) since they are used directly within Strapi APIs and other models' relations. @@ -1829,7 +1829,7 @@ To improve the Developer Experience when developing or using the administration Relations let you create links (relations) between your Content Types. -:::: tabs +:::: tabs card ::: tab One-Way @@ -2196,9 +2196,9 @@ Lets say we created an `openinghours` component in `restaurant` category. - `repeatable` (boolean): Could be `true` or `false` that let you create a list of data. - `component` (string): It follows this format `.`. -:::: tabs +::::: tabs card -::: tab Create +:::: tab Create Create a restaurant with non-repeatable component @@ -2241,9 +2241,9 @@ xhr.send( ); ``` -::: +:::: -::: tab Update +:::: tab Update Update a restaurant with non-repeatable component @@ -2289,11 +2289,13 @@ xhr.send( ); ``` -**NOTE** if you don't specify the `ID` it will delete and re-create the entry and you will see the `ID` value change. - +:::note +If you don't specify the `ID` it will delete and re-create the entry and you will see the `ID` value change. ::: -::: tab Delete +:::: + +:::: tab Delete Delete a restaurant with non-repeatable component @@ -2328,10 +2330,10 @@ xhr.send( ); ``` -::: - :::: +::::: + ### Dynamic Zone Dynamic Zone fields let you create a flexible space in which to compose content, based on a mixed list of components. @@ -2355,9 +2357,9 @@ Lets say we created an `slider` and `content` component in `article` category. - `components` (array): Array of components that follows this format `.`. -:::: tabs +::::: tabs card -::: tab Create +:::: tab Create ```js const xhr = new XMLHttpRequest(); @@ -2379,9 +2381,9 @@ xhr.send( ); ``` -::: +:::: -::: tab Update +:::: tab Update ```js const xhr = new XMLHttpRequest(); @@ -2405,11 +2407,13 @@ xhr.send( ); ``` -**NOTE** if you don't specify the `ID` it will delete and re-create the entry and you will see the `ID` value change. - +:::note +If you don't specify the `ID` it will delete and re-create the entry and you will see the `ID` value change. ::: -::: tab Delete +:::: + +:::: tab Delete ```js const xhr = new XMLHttpRequest(); @@ -2428,10 +2432,10 @@ xhr.send( ); ``` -::: - :::: +::::: + ### Lifecycle hooks The lifecycle hooks are functions that get triggered when the Strapi [`queries`](/developer-docs/latest/development/backend-customization.md#queries) are called. They will get triggered automatically when you manage your content in the Admin Panel or when you develop custom code using `queries`Β· @@ -2440,7 +2444,7 @@ To configure a `ContentType` lifecycle hook you can set a `lifecycles` key in th #### Available Lifecycle hooks -:::: tabs +:::: tabs card ::: tab find @@ -2654,7 +2658,7 @@ module.exports = { ::: tip You can mutate one of the parameters to change its properties. Make sure not to reassign the parameter as it will have no effect: -**This will Work** +This will work: ```js module.exports = { @@ -2666,7 +2670,7 @@ module.exports = { }; ``` -**This will NOT Work** +This will NOT work: ```js module.exports = { @@ -2749,7 +2753,7 @@ Another way is to define `defaultHeaders` to add to every webhook requests. You can configure these global headers by updating the file at `./config/server.js`: -:::: tabs +:::: tabs card ::: tab Simple token diff --git a/docs/developer-docs/latest/development/local-plugins-customization.md b/docs/developer-docs/latest/development/local-plugins-customization.md index dac7ee053f..c0a163e875 100644 --- a/docs/developer-docs/latest/development/local-plugins-customization.md +++ b/docs/developer-docs/latest/development/local-plugins-customization.md @@ -22,7 +22,7 @@ In a new terminal window: Generate a new plugin: `cd /path/to/myDevelopmentProject && strapi generate:plugin my-plugin` -::: tip NOTE +:::note After you have successfully generated a plugin, you need to run `strapi build` which adds the new plugin to the admin panel. ::: @@ -176,7 +176,7 @@ The admin panel is a [React](https://facebook.github.io/react/) application whic To enable local plugin development, you need to start your application with the front-end development mode activated: -:::: tabs +:::: tabs card ::: tab yarn @@ -342,7 +342,7 @@ export default strapi => { The component is generated by default when you create a new plugin. Use this component to execute some logic when the app is loading. When the logic has been executed this component should emit the `isReady` event so the user can interact with the application. -::: tip NOTE +:::note Below is the Initializer component of the content-type-builder plugin. It checks whether or not the auto-reload feature is enabled and depending on this value changes the mainComponent of the plugin. @@ -545,7 +545,7 @@ class Foo extends React.Component { As plugins developer you may need to add custom fields in your application. To do so, a **Field API** is available in order for a plugin to register a field which will be available for all plugins. -::: warning NOTE +:::caution Currently, only the content manager uses this API to extend its current fields. @@ -1036,6 +1036,6 @@ export default strapi => { }; ``` -::: danger -It is currently not possible to add a link into another plugin's setting section +:::caution +It is currently not possible to add a link into another plugin's setting section. ::: diff --git a/docs/developer-docs/latest/development/plugin-customization.md b/docs/developer-docs/latest/development/plugin-customization.md index 2bd3159c39..798d2e1495 100644 --- a/docs/developer-docs/latest/development/plugin-customization.md +++ b/docs/developer-docs/latest/development/plugin-customization.md @@ -19,7 +19,7 @@ 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 +:::caution 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](/developer-docs/latest/update-migration-guides/migration-guides.md). ::: diff --git a/docs/developer-docs/latest/development/plugins/documentation.md b/docs/developer-docs/latest/development/plugins/documentation.md index 9058a862f4..c0cbcc0eab 100644 --- a/docs/developer-docs/latest/development/plugins/documentation.md +++ b/docs/developer-docs/latest/development/plugins/documentation.md @@ -15,7 +15,7 @@ You'll be able to visualize all your end-points directly from the SWAGGER UI. As usual run the following in your terminal: -:::: tabs +:::: tabs card ::: tab yarn @@ -137,13 +137,13 @@ Here are the file that needs to be created in order to change the documentation The `openapi`, `info`, `x-strapi-config`, `servers`, `externalDocs` and `security` fields are located in the `./extensions/documentation/config/settings.json` file. Here you can specify all your environment variables, licenses, external documentation and so on... You can add all the entries listed in the [specification](https://swagger.io/specification/). -::: danger +:::warning Do not change the `openapi` field of the `settings.json` ::: -::: tip NOTE +:::note When you change a field in the settings.json file you need to manually restart your server. diff --git a/docs/developer-docs/latest/development/plugins/email.md b/docs/developer-docs/latest/development/plugins/email.md index a308221c51..ee9e755675 100644 --- a/docs/developer-docs/latest/development/plugins/email.md +++ b/docs/developer-docs/latest/development/plugins/email.md @@ -71,7 +71,7 @@ You can check all the available providers developed by the community on npmjs.or To install a new provider run: -:::: tabs +:::: tabs card ::: tab yarn diff --git a/docs/developer-docs/latest/development/plugins/graphql.md b/docs/developer-docs/latest/development/plugins/graphql.md index b2e54b93a3..33d724663d 100644 --- a/docs/developer-docs/latest/development/plugins/graphql.md +++ b/docs/developer-docs/latest/development/plugins/graphql.md @@ -11,7 +11,7 @@ By default Strapi create [REST endpoints](/developer-docs/latest/developer-resou To get started with GraphQL in your app, please install the plugin first. To do that, open your terminal and run the following command: -:::: tabs +:::: tabs card ::: tab yarn @@ -75,7 +75,7 @@ You can also setup any [Apollo Server options](https://www.apollographql.com/doc You can edit these configurations by creating following file. -::: warning +:::caution Please note the setting for GraphQL `tracing` as changed and has been moved to `apolloServer.tracing` ::: @@ -310,7 +310,7 @@ query { To simplify and automate the build of the GraphQL schema, we introduced the Shadow CRUD feature. It automatically generates the type definition, queries, mutations and resolvers based on your models. The feature also lets you make complex query with many arguments such as `limit`, `sort`, `start` and `where`. -::: tip NOTE +:::note If you use a local plugin, the controller methods of your plugin are not created by default. In order for the Shadow CRUD to work you have to define them in your controllers for each of your models. You can find examples of controllers `findOne`, `find`, `create`, `update` and `delete` there : [Core controllers](/developer-docs/latest/development/backend-customization.md#controllers). ::: @@ -371,7 +371,7 @@ The queries and mutations will use the generated controller's actions as resolve ## Aggregation & Grouping -::: warning +:::caution This feature is only available on Mongoose ORM. ::: @@ -720,7 +720,7 @@ One of the most powerful features of GraphQL is the auto-documentation of the sc It might happen that you want to add a description to a query or deprecate it. To do that, you need to use the `schema.graphql.js` file. -::: warning +:::caution The `schema.graphql.js` file has to be placed into the config folder of each API `./api/*/config/schema.graphql.js` or plugin `./extensions/*/config/schema.graphql.js`. ::: diff --git a/docs/developer-docs/latest/development/plugins/i18n.md b/docs/developer-docs/latest/development/plugins/i18n.md index fcdfd9acfe..b9d8548b68 100644 --- a/docs/developer-docs/latest/development/plugins/i18n.md +++ b/docs/developer-docs/latest/development/plugins/i18n.md @@ -28,7 +28,7 @@ The plugin can be installed: - [from the Marketplace](/user-docs/latest/plugins/installing-plugins-via-marketplace.md), - or using the Terminal, by running one of the following commands: -:::: tabs +:::: tabs card ::: tab yarn diff --git a/docs/developer-docs/latest/development/plugins/upload.md b/docs/developer-docs/latest/development/plugins/upload.md index fc23a50e93..e43bd3e7d9 100644 --- a/docs/developer-docs/latest/development/plugins/upload.md +++ b/docs/developer-docs/latest/development/plugins/upload.md @@ -54,7 +54,7 @@ module.exports = { } } ``` -::: warning +:::caution Breakpoint changes will only apply to new images, existing images will not be resized or have new sizes generated. ::: @@ -126,8 +126,8 @@ To upload files into your application. ``` -::: warning -You have to send FormData in your request body +:::caution +You have to send FormData in your request body. ::: ## Upload files related to an entry @@ -187,8 +187,8 @@ Code ``` -::: warning -You have to send FormData in your request body +:::caution +You have to send FormData in your request body. ::: ## Upload file during entry creation @@ -273,8 +273,8 @@ If you want to upload files for a component, you will have to specify the index Example `files.my_component_name[the_index].attribute_name` ::: -::: warning -You have to send FormData in your request body +:::caution +You have to send FormData in your request body. ::: ## Models definition @@ -336,7 +336,7 @@ You can check all the available providers developed by the community on npmjs.or To install a new provider run: -:::: tabs +:::: tabs card ::: tab yarn diff --git a/docs/developer-docs/latest/development/plugins/users-permissions.md b/docs/developer-docs/latest/development/plugins/users-permissions.md index 5689cdda19..53bff5097f 100644 --- a/docs/developer-docs/latest/development/plugins/users-permissions.md +++ b/docs/developer-docs/latest/development/plugins/users-permissions.md @@ -206,7 +206,7 @@ In the following examples, the frontend app will be the [react login example app It (the frontend app) will be running on `http://localhost:3000`.
Strapi (the backend) will be running on `http://localhost:1337`. -:::: tabs +:::: tabs card ::: tab GitHub @@ -704,7 +704,7 @@ Once you have configured strapi and the provider, in your frontend app you have Now you can make authenticated requests πŸŽ‰ More info here: [token usage](#token-usage). -:::warning Troubleshooting +:::caution Troubleshooting - **Error 429**: It's most likely because your login flow fell into a loop. To make new requests to the backend, you need to wait a few minutes or restart the backend. - **Grant: missing session or misconfigured provider**: It may be due to many things. @@ -786,7 +786,7 @@ Congrats, you're done! ### Email validation -:::tip NOTE +:::note In production, make sure the `url` config property is set. Otherwise the validation link will redirect to `localhost`. More info on the config [here](/developer-docs/latest/setup-deployment-guides/configurations.md#server). ::: @@ -993,5 +993,5 @@ module.exports = { ``` ::: tip -You can learn more on configuration in the documentation [here](/developer-docs/latest/setup-deployment-guides/configurations.md) +You can learn more on configuration in the documentation [here](/developer-docs/latest/setup-deployment-guides/configurations.md). ::: diff --git a/docs/developer-docs/latest/getting-started/usage-information.md b/docs/developer-docs/latest/getting-started/usage-information.md index ce717df02b..2e328c83a9 100644 --- a/docs/developer-docs/latest/getting-started/usage-information.md +++ b/docs/developer-docs/latest/getting-started/usage-information.md @@ -33,7 +33,7 @@ The following data is collected: - System information (OS) - Build configurations -::: warning GDPR +::: caution GDPR The collected data are of a non-sensitive nature and no personal data is collected. We are compliant with the European GDPR recommendations (see our [Privacy Policy](https://strapi.io/privacy)). We do not collect databases configurations, password or custom variables. Any data collected (as above) is secured, encrypted and anonymized. ::: @@ -54,6 +54,6 @@ Should you decide to opt-out, you may do so by removing the `uuid` property in t } ``` -::: tip NOTE +::: note Should you have any questions regarding this feature, feel free to email [privacy@strapi.io](mailto:privacy@strapi.io). ::: diff --git a/docs/developer-docs/latest/guides/auth-request.md b/docs/developer-docs/latest/guides/auth-request.md index 437f2041ea..0206ead533 100644 --- a/docs/developer-docs/latest/guides/auth-request.md +++ b/docs/developer-docs/latest/guides/auth-request.md @@ -70,7 +70,7 @@ Here is the API route for the authentication `/auth/local`. You have to request it in **POST**. -:::: tabs +:::: tabs card ::: tab axios diff --git a/docs/developer-docs/latest/guides/client.md b/docs/developer-docs/latest/guides/client.md index fd18de0fe6..13d03094fc 100644 --- a/docs/developer-docs/latest/guides/client.md +++ b/docs/developer-docs/latest/guides/client.md @@ -15,14 +15,18 @@ This guide could also be used to setup an Axios client instance. First you will have to install the client package in your application by running one of the following commands: -:::: tabs +:::: tabs card ::: tab yarn -`yarn add @octokit/rest` +```sh +yarn add @octokit/rest +``` ::: ::: tab npm -`npm install @octokit/rest` +```sh +npm install @octokit/rest +``` ::: :::: diff --git a/docs/developer-docs/latest/guides/custom-admin.md b/docs/developer-docs/latest/guides/custom-admin.md index c19b3b596e..a1bbf04d88 100644 --- a/docs/developer-docs/latest/guides/custom-admin.md +++ b/docs/developer-docs/latest/guides/custom-admin.md @@ -36,7 +36,7 @@ In this new file, paste the current [HomePage container](https://github.com/stra To run your application, run the following command: -:::: tabs +:::: tabs card ::: tab yarn @@ -114,7 +114,7 @@ In this new file, paste the current [dateFormats](https://github.com/strapi/stra To run your application, run the following command: -:::: tabs +:::: tabs card ::: tab yarn diff --git a/docs/developer-docs/latest/guides/custom-data-response.md b/docs/developer-docs/latest/guides/custom-data-response.md index 8a590bb85f..79422865ef 100644 --- a/docs/developer-docs/latest/guides/custom-data-response.md +++ b/docs/developer-docs/latest/guides/custom-data-response.md @@ -115,6 +115,6 @@ module.exports = { And tada! The email disappeared. -::: tip +:::tip This guide can be applied to any other controller action. ::: diff --git a/docs/developer-docs/latest/guides/draft.md b/docs/developer-docs/latest/guides/draft.md index 2f46eff4bd..6ef376b1ae 100644 --- a/docs/developer-docs/latest/guides/draft.md +++ b/docs/developer-docs/latest/guides/draft.md @@ -7,7 +7,7 @@ description: Learn in this guide how to create a draft system that will allow yo This guide will explain how to create a draft system that will allow you to manage draft, published, and archive status. -::: warning +:::caution The native **Draft & Publish feature** has been released in **version 3.2**. We suggest you to use the native feature instead of this guide. This guide is still useful if you want to see the concept of "force filtering" in action. diff --git a/docs/developer-docs/latest/guides/error-catching.md b/docs/developer-docs/latest/guides/error-catching.md index b1b0009bc4..346836185a 100644 --- a/docs/developer-docs/latest/guides/error-catching.md +++ b/docs/developer-docs/latest/guides/error-catching.md @@ -64,7 +64,7 @@ module.exports = strapi => { }; ``` -::: warning +:::caution It's important to call `throw(error);` to avoid stopping the middleware stack. If you don't re-throw the error, it won't be handled by the Strapi's error formatter and the api will never respond to the client. ::: diff --git a/docs/developer-docs/latest/guides/is-owner.md b/docs/developer-docs/latest/guides/is-owner.md index ee18d0f3d8..ce9763e10e 100644 --- a/docs/developer-docs/latest/guides/is-owner.md +++ b/docs/developer-docs/latest/guides/is-owner.md @@ -131,6 +131,6 @@ module.exports = { And tada! -::: tip +:::tip For the delete action, it will be the exact same check as the update action. ::: diff --git a/docs/developer-docs/latest/guides/jwt-validation.md b/docs/developer-docs/latest/guides/jwt-validation.md index 0fd6494788..ce3af4f04b 100644 --- a/docs/developer-docs/latest/guides/jwt-validation.md +++ b/docs/developer-docs/latest/guides/jwt-validation.md @@ -101,6 +101,6 @@ module.exports = async (ctx, next) => { } ``` -::: warning +:::caution In the code example we use `axios`, so you will have to install the dependency to make it work. You can choose another library if you prefer. ::: diff --git a/docs/developer-docs/latest/guides/process-manager.md b/docs/developer-docs/latest/guides/process-manager.md index 06373c3e8b..e95eb07724 100644 --- a/docs/developer-docs/latest/guides/process-manager.md +++ b/docs/developer-docs/latest/guides/process-manager.md @@ -18,14 +18,18 @@ PM2 allows you to keep your Strapi project alive and to reload it without downti You will install PM2 globally -:::: tabs +:::: tabs card ::: tab yarn -`yarn global add pm2` +```sh +yarn global add pm2 +``` ::: ::: tab npm -`npm install pm2 -g` +```sh +npm install pm2 -g +``` ::: :::: diff --git a/docs/developer-docs/latest/guides/registering-a-field-in-admin.md b/docs/developer-docs/latest/guides/registering-a-field-in-admin.md index 23ef8e73dc..0c06bce134 100644 --- a/docs/developer-docs/latest/guides/registering-a-field-in-admin.md +++ b/docs/developer-docs/latest/guides/registering-a-field-in-admin.md @@ -15,7 +15,7 @@ For this example, we will see how to change the WYSIWYG with [CKEditor](https:// 1. Create a new project: -:::: tabs +:::: tabs card ::: tab yarn @@ -41,7 +41,7 @@ npx create-strapi-app my-app --quickstart --no-run 2. Generate a plugin: -:::: tabs +:::: tabs card ::: tab yarn @@ -74,7 +74,7 @@ strapi generate:plugin wysiwyg 3. Install the needed dependencies: -:::: tabs +:::: tabs card ::: tab yarn @@ -98,7 +98,7 @@ npm install @ckeditor/ckeditor5-react @ckeditor/ckeditor5-build-classic 4. Start your application with the front-end development mode: -:::: tabs +:::: tabs card ::: tab yarn @@ -429,9 +429,9 @@ export default strapi => { }; ``` -Finally you will have to rebuild strapi so the new plugin is loaded correctly +Finally you will have to rebuild strapi so the new plugin is loaded correctly: -:::: tabs +:::: tabs card ::: tab yarn diff --git a/docs/developer-docs/latest/guides/secure-your-app.md b/docs/developer-docs/latest/guides/secure-your-app.md index 13bd73ce62..c5b160f0a7 100644 --- a/docs/developer-docs/latest/guides/secure-your-app.md +++ b/docs/developer-docs/latest/guides/secure-your-app.md @@ -19,14 +19,18 @@ Sqreen is an Application Security Management tool that enables protection tailor You will have to install Sqreen node_module in your application. -:::: tabs +:::: tabs card ::: tab yarn -`yarn add sqreen` +```sh +yarn add sqreen +``` ::: ::: tab npm -`npm install sqreen` +```sh +npm install sqreen +``` ::: :::: diff --git a/docs/developer-docs/latest/guides/slug.md b/docs/developer-docs/latest/guides/slug.md index 46bab2b4e6..ade36d0c4b 100644 --- a/docs/developer-docs/latest/guides/slug.md +++ b/docs/developer-docs/latest/guides/slug.md @@ -30,7 +30,7 @@ Here we will be able to setup the `slug` field. - And click **OFF** for **Editable field** option. - Don't forget to save your updates. -:::: tabs +:::: tabs card ::: tab View before @@ -60,7 +60,7 @@ When it's done, you have to update the life cycle of the **Article** Content Typ **Path β€”** `./api/article/models/Article.js` -:::: tabs +:::: tabs card ::: tab Mongoose diff --git a/docs/developer-docs/latest/guides/unit-testing.md b/docs/developer-docs/latest/guides/unit-testing.md index af14a52452..2b983cca8a 100644 --- a/docs/developer-docs/latest/guides/unit-testing.md +++ b/docs/developer-docs/latest/guides/unit-testing.md @@ -13,8 +13,8 @@ In this example we will use [Jest](https://jestjs.io/) Testing Framework with a [Supertest](https://github.com/visionmedia/supertest) Super-agent driven library for testing node.js HTTP servers using a fluent API ::: -::: warning -Please note that this guide will not work if you are on Windows using the SQLite database due to how windows locks the SQLite file +:::caution +Please note that this guide will not work if you are on Windows using the SQLite database due to how windows locks the SQLite file. ::: ## Install test tools @@ -25,7 +25,7 @@ Please note that this guide will not work if you are on Windows using the SQLite `sqlite3` is used to create an on-disk database that is created and deleted between tests. -:::: tabs +:::: tabs card ::: tab yarn `yarn add --dev jest supertest sqlite3` @@ -184,7 +184,10 @@ Ran all test suites. ✨ Done in 5.73s. ``` -> Note: if you receive a timeout error for Jest, please add the following line right before the `beforeAll` method in the `app.test.js` file: `jest.setTimeout(15000)` and adjust the milliseconds value as you need. +:::tip +If you receive a timeout error for Jest, please add the following line right before the `beforeAll` method in the `app.test.js` file: `jest.setTimeout(15000)` and adjust the milliseconds value as you need. +::: + ### Testing basic endpoint controller. @@ -239,7 +242,9 @@ Ran all test suites. ✨ Done in 9.09s. ``` -> Note: if you receive an error `Jest has detected the following 1 open handles potentially keeping Jest from exiting` check `jest` version as `26.6.3` works without an issue. +:::tip +If you receive an error `Jest has detected the following 1 open handles potentially keeping Jest from exiting` check `jest` version as `26.6.3` works without an issue. +::: ### Testing `auth` endpoint controller. diff --git a/docs/developer-docs/latest/setup-deployment-guides/configurations.md b/docs/developer-docs/latest/setup-deployment-guides/configurations.md index 06f3fbcf2f..3ae674a55a 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/configurations.md +++ b/docs/developer-docs/latest/setup-deployment-guides/configurations.md @@ -24,7 +24,7 @@ strapi.config.get('server.host', 'defaultValueIfUndefined'); Nested keys are accessible with `dot-notation`. -:::tip NOTE +:::note Notice that the filename is used as a prefix to access the configurations. ::: @@ -34,13 +34,13 @@ Notice that the filename is used as a prefix to access the configurations. This file lets you define database connections that will be used to store your application content. -::: tip NOTE +:::note You can find [supported database and versions](/developer-docs/latest/setup-deployment-guides/installation/cli.html#preparing-the-installation) in the local installation process. ::: **Path β€”** `./config/database.js`. -:::: tabs +:::: tabs card ::: tab Bookshelf @@ -96,7 +96,7 @@ You can find [supported database and versions](/developer-docs/latest/setup-depl :::: -::::: tabs +::::: tabs card :::: tab PostgreSQL @@ -124,7 +124,7 @@ module.exports = ({ env }) => ({ }); ``` -::: warning +:::caution We are aware that there is an issue regarding **SSL support for the server**. In order to fix it, you have to to set the `ssl:{}` object as a boolean in order to disable it. See below for example: ```js @@ -216,6 +216,11 @@ module.exports = ({ env }) => ({ :::: tab MongoDB +:::caution +!!!include(developer-docs/latest/snippets/mongodb-warning.md)!!! +::: + + ```js module.exports = ({ env }) => ({ defaultConnection: 'default', @@ -307,7 +312,7 @@ Deploying **Strapi** itself is covered in the [Deployment Guide](/developer-docs ### Server -:::: tabs +:::: tabs card ::: tab Minimal @@ -1017,7 +1022,7 @@ CRON tasks allow you to schedule jobs (arbitrary functions) for execution at spe This feature is powered by [`node-schedule`](https://www.npmjs.com/package/node-schedule) node modules. Check it for more information. -::: warning +:::caution Make sure the `enabled` cron config is set to `true` in `./config/server.js` file. ::: @@ -1079,7 +1084,7 @@ When present, they are loaded to let you customize your database connection inst You will need to install the plugin using the normal `npm install the-plugin-name` or any of the other supported package tools such as yarn then follow the below examples to load them. -:::: tabs +:::: tabs card ::: tab Mongoose @@ -1131,7 +1136,7 @@ An image named `company-logo.png` in `./public/` is accessible through `/company `index.html` files are served if the request corresponds to a folder name (`/pictures` url will try to serve `public/pictures/index.html` file). ::: -::: warning +:::caution The dotfiles are not exposed. It means that every file name that starts with `.`, such as `.htaccess` or `.gitignore`, are not served. ::: @@ -1147,7 +1152,7 @@ Single-Sign-On on Strapi allows you to configure additional sign-in and sign-up - Make sure Strapi is part of the applications you can access with your provider. For example, with Microsoft (Azure) Active Directory, you must first ask someone with the right permissions to add Strapi to the list of allowed applications. Please refer to your provider(s) documentation to learn more about that. ::: -::: warning CAUTION +:::caution It is currently not possible to associate a unique SSO provider to an email address used for a Strapi account, meaning that the access to a Strapi account cannot be restricted to only one SSO provider. For more information and workarounds to solve this issue, [please refer to the dedicated GitHub issue](https://github.com/strapi/strapi/issues/9466#issuecomment-783587648). ::: @@ -1225,7 +1230,7 @@ Adding a new provider means adding a new way for your administrators to log-in. To achieve a great flexibility and a large choice of provider, Strapi uses [Passport.js](http://www.passportjs.org/). Any valid passport strategy that doesn't need additional custom data should therefore work with Strapi. -::: warning +:::caution Strategies such as [ldapauth](https://github.com/vesse/passport-ldapauth) don't work out of the box since they require extra data to be sent from the admin panel. If you want to add an LDAP provider to your application, you will need to write a [custom strategy](http://www.passportjs.org/packages/passport-custom/). You can also use services such as Okta and Auth0 as bridge services. @@ -1241,13 +1246,13 @@ To configure a provider, follow the procedure below: ##### Examples -:::::: tabs +:::::: tabs card ::::: tab Google Using: [passport-google-oauth2](https://github.com/mstade/passport-google-oauth2) -:::: tabs +:::: tabs card ::: tab yarn @@ -1315,7 +1320,7 @@ module.exports = ({ env }) => ({ Using: [passport-github](https://github.com/cfsghost/passport-github) -:::: tabs +:::: tabs card ::: tab yarn @@ -1381,7 +1386,7 @@ module.exports = ({ env }) => ({ Using: [passport-discord](https://github.com/nicholastay/passport-discord#readme) -:::: tabs +:::: tabs card ::: tab yarn @@ -1446,7 +1451,7 @@ module.exports = ({ env }) => ({ Using: [passport-azure-ad-oauth2](https://github.com/auth0/passport-azure-ad-oauth2#readme) -:::: tabs +:::: tabs card ::: tab yarn @@ -1598,7 +1603,7 @@ module.exports = () => ({ ### Role-Based Access Control -::: warning 🚧 This API is considered unstable for now. +:::caution 🚧 This API is considered unstable for now.
::: @@ -1616,7 +1621,7 @@ Declare a single condition as an object, and multiple conditions as an array of Declare and register conditions in your [`./config/functions/bootstrap.js`](/developer-docs/latest/setup-deployment-guides/configurations.md#bootstrap) file (see [Registering conditions](#registering-conditions)). -:::tip NOTE +:::note The condition `name` property acts as a [unique id](https://github.com/strapi/strapi/blob/master/packages/strapi-admin/services/permission/condition-provider.js#L22) within its namespace, that is either the plugin if the `plugin` property is defined, or the root namespace. ::: diff --git a/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/mongodb.md b/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/mongodb.md index 2bf599102d..59c384800e 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/mongodb.md +++ b/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/mongodb.md @@ -17,7 +17,7 @@ If you already have MongoDB installed locally and running as a background servic Please complete the installation steps appropriate to your operating system. -:::: tabs +:::: tabs card ::: tab Windows 10 @@ -141,7 +141,7 @@ MongoDB must already be running in the background. `Path: ./` -:::: tabs +:::: tabs card ::: tab yarn @@ -272,17 +272,14 @@ MongoDB Atlas automatically exposes the database credentials into a single envir - Under `Atlas` in the left-hand, click on `Clusters`. This should take you to your `cluster`. Next, click `CONNECT` and then `Connect Your Application`. - Under `1. Choose your driver version`, select **DRIVER** as `Node.js` and **VERSION** as `3.6 or later`. - ::: warning - You **must** use `Version: 3.6 or later`. + :::caution + You must use `Version: 3.6 or later`. ::: - This should show a **Connection String Only** similar to this: `mongodb+srv://username:@cluster0.blah.mongodb.net/myFirstDatabase?retryWrites=true&w=majority` - - - -::: warning +:::caution Please note the `` after your `username`. In this example, after `mongodb+srv://username:`. You will need to replace the `` with the password you created earlier for this user in your **MongoDB Atlas** account. ::: @@ -292,9 +289,9 @@ Replace the contents of `/database.js` with the following and replace **< passwo `Path: ./config/database.js`. -:::: tabs +:::: tabs card -::: tab Uri Method +::: tab URI Method This method uses the URI string aqcuired from Atlas in step 4. @@ -327,7 +324,6 @@ DATABASE_URI=mongodb+srv://username:@cluster0.blah.mongodb.net/myFirst DATABASE_NAME=myFirstDatabase ``` - ::: ::: tab Combined Method @@ -372,9 +368,8 @@ DATABASE_PASSWORD=yourpassword :::: -::: danger WARNING +:::warning We recommend replacing sensitive (eg. "URI string" above) information in your database configuration files before uploading your project to a public repository such as GitHub. For more information about using environment variables, please read [configurations](/developer-docs/latest/setup-deployment-guides/configurations.md). - ::: You are now ready use Strapi locally or to deploy your project to an external hosting provider and use MongoDB Atlas as your database server. diff --git a/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md b/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md index e245171a41..1498cebef4 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md +++ b/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md @@ -11,7 +11,7 @@ SQLite is the default ([Quick Start](/developer-docs/latest/getting-started/quic Simply use one of the following commands. -:::: tabs +:::: tabs card ::: tab yarn diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment.md b/docs/developer-docs/latest/setup-deployment-guides/deployment.md index 2fbfccfb1f..3daca1df78 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment.md @@ -68,7 +68,7 @@ To learn more about configuration details, you can read the [configurations](/de Before running your server in production you need to build your admin panel for production -:::: tabs +:::: tabs card ::: tab yarn @@ -104,7 +104,7 @@ Then in your `package.json` scripts section: Run the server with the `production` settings. -:::: tabs +:::: tabs card ::: tab yarn diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/21yunbox.md b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/21yunbox.md index fe88e0f6ff..d8b05fffb2 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/21yunbox.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/21yunbox.md @@ -12,7 +12,7 @@ This guide explains how to update an existing Strapi project so it can be deploy With persistent disks and managed PostgreSQL databases, 21YunBox gives you multiple different ways to store your content. 21YunBox services come with fully managed SSL, so it's no longer necessary to set up a proxy server to secure your Strapi app. Since 21YunBox services are automatically restarted if they become unresponsive, you don't need to use a process manager like `pm2` either. ::: tip -For more information consult [21YunBox's Deploy Strapi guide](https://www.21yunbox.com/docs/#/deploy-strapi) +For more information consult [21YunBox's Deploy Strapi guide](https://www.21yunbox.com/docs/#/deploy-strapi). ::: :::prerequisites diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/amazon-aws.md b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/amazon-aws.md index 3e96678b58..0ea0cdbc6b 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/amazon-aws.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/amazon-aws.md @@ -100,7 +100,7 @@ In the top menu, near your IAM Account User name, select, from the dropdown, the - Review the details, in the **Step 7: Review Instance Launch**, then click the blue `Launch` button. Now, you need to **select an existing key pair** or **create a new key pair**. To create a new key pair, do the following: - Select the dropdown option `Create a new key pair`. - Name your the key pair name, e.g. `ec2-strapi-key-pair` - ::: warning + ::: caution Download the **private key file** (.pem file). This file is needed, so note where it was downloaded. ::: - After downloading the file, click the blue `Launch Instances` button. diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform.md b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform.md index 31ae6505a7..c1d7d28725 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform.md @@ -7,7 +7,7 @@ description: Learn in this guide how to deploy your Strapi application on Digita This is a step-by-step guide for deploying a Strapi project to [DigitalOcean's App Platform](https://digitalocean.com). App Platform is DigitalOcean's Platform as a Service (PaaS) that will handle deploying, networking, SSL, and more for your app. It is the easiest way to deploy Strapi to DigitalOcean. -::: warning +:::caution Please note that as of June 18th, 2021 we were made aware that there is a critical security issue when using DigitalOcean Managed databases with the DigitalOcean App platform. We do not currently recommend using this combination and if you require a managed database, you should use a DigitalOcean Droplet instead. More information can be found on the DigitalOcean [forum thread](https://www.digitalocean.com/community/questions/how-to-add-my-digitalocean-app-as-a-trusted-resource-for-my-managed-database) and [feature request](https://ideas.digitalocean.com/ideas/APPX-I-73) pages. ::: diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean.md b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean.md index dedb1d12cf..d2107e5e1e 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean.md @@ -118,7 +118,7 @@ git --version #### 2. **OPTIONAL:** Install Git. -::: tip NOTE +:::note Only do this step if _not installed_, as above. Please follow these directions on [how to install Git on Ubuntu 18.04](https://www.digitalocean.com/community/tutorials/how-to-install-git-on-ubuntu-18-04). ::: @@ -130,7 +130,7 @@ After installing and configuring Git on your Droplet. Please continue to the nex DigitalOcean has excellent documentation regarding the installation and use of the major databases that work with Strapi. The previous steps above should all be completed prior to continuing. You can find links, and any further instructions, below: -:::: tabs +:::: tabs card ::: tab PostgreSQL diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/google-app-engine.md b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/google-app-engine.md index f9a5630f71..f1d434536c 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/google-app-engine.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/google-app-engine.md @@ -14,7 +14,7 @@ In this guide we are going to: ### New Strapi project -:::: tabs +:::: tabs card ::: tab yarn @@ -106,7 +106,7 @@ The `myapi-123456` part is the project identifier. (The number is automatically The following is an example config for `Standard Environment` or `Flexible Environment`. -:::: tabs +:::: tabs card ::: tab Standard Environment diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md index b9df424f7d..993c9eedea 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md @@ -18,7 +18,7 @@ If you already have the Heroku CLI installed locally on your computer. Skip to [ Download and install the `Heroku CLI` for your operating system: -:::: tabs +:::: tabs card ::: tab Ubuntu Run the following from your terminal: @@ -63,7 +63,7 @@ Follow the instructions and return to your command line. Create a [new Strapi project](/developer-docs/latest/getting-started/quick-start.md) (if you want to deploy an existing project go to step 4). -::: tip NOTE +:::note If you plan to use **MongoDB** with your project, [refer to the create a Strapi project with MongoDB section of the documentation](/developer-docs/latest/setup-deployment-guides/configurations/databases/mongodb.md#install-mongodb-locally) then, jump to step 4. @@ -71,7 +71,7 @@ If you plan to use **MongoDB** with your project, [refer to the create a Strapi `Path: ./` -:::: tabs +:::: tabs card ::: tab yarn @@ -136,8 +136,8 @@ heroku create You can use `heroku create custom-project-name`, to have Heroku create a `custom-project-name.heroku.com` URL. Otherwise, Heroku will automatically generate a random project name (and URL) for you. -::: tip NOTE -If you have a Heroku project app already created. You would use the following step to initialize your local project folder: +:::tip +If you have a Heroku project app already created, you would use the following step to initialize your local project folder: `Path: ./my-project/` @@ -153,9 +153,9 @@ Your local development environment is now set-up and configured to work with Her Below you will find database options when working with Heroku. Please choose the correct database (e.g. PostgreSQL, MongoDB, etc.) and follow those instructions. -:::: tabs +:::::: tabs card -::: tab PostgreSQL +::::: tab PostgreSQL ### Heroku Postgres @@ -268,7 +268,7 @@ Unless you originally installed Strapi with PostgreSQL, you need to install the `Path: ./my-project/` -:::: tabs +:::: tabs card ::: tab npm ```bash @@ -283,9 +283,9 @@ yarn add pg ::: :::: -::: +::::: -::: tab MongoDB +::::: tab MongoDB ### MongoDB Atlas @@ -395,9 +395,9 @@ module.exports = ({ env }) => ({ }); ``` -::: +::::: -:::: +:::::: #### 8. Commit your changes @@ -445,7 +445,7 @@ If you see the Strapi Welcome page, you have correctly set-up, configured and de You can now continue with the [Quick Start Guide](/developer-docs/latest/getting-started/quick-start.md), if you have any questions on how to proceed. -::: warning +::: caution For security reasons, the Content-Types Builder plugin is disabled in production. To update content structure, please make your changes locally and deploy again. ::: diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/qovery.md b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/qovery.md index 24c21efdd3..723fdb59a8 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/qovery.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/qovery.md @@ -21,9 +21,9 @@ Visit [the Qovery dashboard](https://start.qovery.com) to create an account if y * Click on the **create a project** button and give a name to your project. * Click on **next**. - ::: tip NOTE - One project can have multiple apps running. This is convenient to group your backend, frontend, database etc. - ::: +::: note +One project can have multiple apps running. This is convenient to group your backend, frontend, database etc. +::: ### 3. Add your Strapi app * Click on the **create an application** button and select your Github or Gitlab repository where your Strapi app is located. @@ -77,11 +77,11 @@ routers: - /* ``` -::: tip TIP +::: tip For more information about the `.qovery.yml` file, please refer to [the Qovery application documentation](https://docs.qovery.com/docs/using-qovery/configuration/applications). ::: -::: tip NOTE +:::note Alternatively, you can deploy your Strapi application with a PostgreSQL database in the Qovery dashboard. ::: diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/render.md b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/render.md index 9da3fb81c9..5950c8b7cc 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/render.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/render.md @@ -31,7 +31,7 @@ Below are descriptions of 3 approaches that make different trade-offs between sc Select the [render.yaml file](https://render.com/docs/yaml-spec) that matches your storage preferences and add it to the root of your Strapi project. -:::: tabs +:::: tabs card ::: tab strapi-sqlite diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment/optional-software/caddy-proxy.md b/docs/developer-docs/latest/setup-deployment-guides/deployment/optional-software/caddy-proxy.md index f42f826ed2..d6b7822ec9 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment/optional-software/caddy-proxy.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment/optional-software/caddy-proxy.md @@ -25,7 +25,7 @@ Below are 3 example Caddy configurations: - Sub-folder based with both the API and Admin on the same sub-folder such as `example.com/api` and `example.com/api/admin` - Sub-folder based with split API and Admin such as `example.com/api` and `example.com/dashboard` -::::: tabs +::::: tabs card :::: tab Sub-Domain @@ -54,7 +54,7 @@ http://api.example.com { This config is using a sub-folder that is dedicated to Strapi only. It will bind to port 80 HTTP and hosts the "frontend" files on `/var/www` like a normal web server, but proxies all Strapi requests on the `example.com/api` sub-path. -::: warning +:::caution Please note that this config is not focused on the frontend hosting, you will most likely need to adjust this to your frontend software requirements, it is only being shown here as an example. ::: @@ -85,7 +85,7 @@ This config is using two sub-folders that are dedicated to Strapi. It will bind Alternatively for the admin, you can replace the proxy instead with serving the admin `build` folder directly from Caddy, such centralizing the admin but load balancing the backend APIs. The example for this is not shown, but it would likely be something you would build into your CI/CD platform. -::: warning +:::caution Please note that this config is not focused on the frontend hosting, you will most likely need to adjust this to your frontend software requirements, it is only being shown here as an example. ::: @@ -119,7 +119,7 @@ http://api.example.com { In order to take full advantage of a proxied Strapi application you will need to configure Strapi to make it aware of the upstream proxy. Like with the above Caddy configurations there are 3 matching examples. To read more about this server configuration file please see the [server configuration](/developer-docs/latest/setup-deployment-guides/configurations.md#server) documentation. -::::: tabs +::::: tabs card :::: tab Sub-Domain diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment/optional-software/haproxy-proxy.md b/docs/developer-docs/latest/setup-deployment-guides/deployment/optional-software/haproxy-proxy.md index b6f3f57999..65a60cb3ea 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment/optional-software/haproxy-proxy.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment/optional-software/haproxy-proxy.md @@ -21,7 +21,7 @@ Below are 3 example HAProxy configurations: - Sub-folder based with both the API and Admin on the same sub-folder such as `example.com/api` and `example.com/api/admin` - Sub-folder based with split API and Admin such as `example.com/api` and `example.com/dashboard` -::::: tabs +::::: tabs card :::: tab Sub-Domain @@ -91,7 +91,7 @@ backend strapi-backend This config is using a sub-folder that is dedicated to Strapi only. It will redirect normal HTTP traffic over to SSL and proxies the "frontend" to `localhost:8080`, but proxies all Strapi requests on the `example.com/api` sub-path to the locally running Strapi application. -::: warning +:::caution HAProxy **cannot** serve static content, the below example is proxying frontend traffic to some other web server running on the localhost port 8080 ::: @@ -166,7 +166,7 @@ backend strapi-backend This config is using a sub-folder that is dedicated to Strapi only. It will redirect normal HTTP traffic over to SSL and proxies the "frontend" to `localhost:8080`, but proxies all strapi api requests on the `example.com/api` sub-path to the locally running Strapi application. Likewise it will proxy all admin requests on the `example.com/dashboard` sub-path. -::: warning +:::caution Please note that this config is not focused on the frontend hosting, you will most likely need to adjust this to your frontend software requirements, it is only being shown here as an example. ::: @@ -247,7 +247,7 @@ backend strapi-dashboard-backend In order to take full advantage of a proxied Strapi application you will need to configure Strapi to make it aware of the upstream proxy. Like with the above HAProxy configurations there are 3 matching examples. To read more about this server configuration file please see the [server configuration](/developer-docs/latest/setup-deployment-guides/configurations.md#server) documentation. -::::: tabs +::::: tabs card :::: tab Sub-Domain diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment/optional-software/nginx-proxy.md b/docs/developer-docs/latest/setup-deployment-guides/deployment/optional-software/nginx-proxy.md index e0ab6f5784..cdea717d43 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment/optional-software/nginx-proxy.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment/optional-software/nginx-proxy.md @@ -38,7 +38,7 @@ Below are 3 example Nginx configurations: - Sub-folder based with both the API and Admin on the same sub-folder such as `example.com/api` and `example.com/api/admin` - Sub-folder based with split API and Admin such as `example.com/api` and `example.com/dashboard` -::::: tabs +::::: tabs card :::: tab Sub-Domain @@ -96,7 +96,7 @@ server { This config is using a sub-folder that is dedicated to Strapi only. It will redirect normal HTTP traffic over to SSL and hosts the "frontend" files on `/var/www/html` like a normal web server, but proxies all strapi requests on the `example.com/api` sub-path. -::: warning +:::caution Please note that this config is not focused on the frontend hosting, you will most likely need to adjust this to your frontend software requirements, it is only being shown here as an example. ::: @@ -158,7 +158,7 @@ This config is using two sub-folders that are dedicated to Strapi. It will redir Alternatively for the admin, you can replace the proxy instead with serving the admin `build` folder directly from Nginx, such centralizing the admin but load balancing the backend APIs. The example for this is not shown, but it would likely be something you would build into your CI/CD platform. -::: warning +:::caution Please note that this config is not focused on the frontend hosting, you will most likely need to adjust this to your frontend software requirements, it is only being shown here as an example. ::: @@ -235,7 +235,7 @@ server { In order to take full advantage of a proxied Strapi application you will need to configure Strapi to make it aware of the upstream proxy. Like with the above Nginx configurations there are 3 matching examples. To read more about this server configuration file please see the [server configuration](/developer-docs/latest/setup-deployment-guides/configurations.md#server) documentation. -::::: tabs +::::: tabs card :::: tab Sub-Domain diff --git a/docs/developer-docs/latest/setup-deployment-guides/installation/docker.md b/docs/developer-docs/latest/setup-deployment-guides/installation/docker.md index edc1340092..f5c2aafa4b 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/installation/docker.md +++ b/docs/developer-docs/latest/setup-deployment-guides/installation/docker.md @@ -9,7 +9,7 @@ The following documentation will guide you through the installation of a new Str Docker is an open platform that allows to develop, ship and run applications by using containers (i.e. packages containing all the parts an application needs to function, such as libraries and dependencies). -::: tip NOTE +::: note You can find the official Docker image for Strapi in the [Docker Hub](https://hub.docker.com/r/strapi/strapi). ::: diff --git a/docs/developer-docs/latest/setup-deployment-guides/installation/render.md b/docs/developer-docs/latest/setup-deployment-guides/installation/render.md index 75e41f4046..f2ef5c0a59 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/installation/render.md +++ b/docs/developer-docs/latest/setup-deployment-guides/installation/render.md @@ -27,7 +27,7 @@ Once the choice between the 3 repositories is made: 2. In the README file of your forked repository, click the **Deploy on Render** button. 3. Make sure you granted Render the permission to access your forked repository. -::: tip NOTE +::: note When using Cloudinary, you will be prompted to enter your account credentials as environment variables. Render encrypts environment variables and stores them securely. ::: diff --git a/docs/developer-docs/latest/update-migration-guides/update-version.md b/docs/developer-docs/latest/update-migration-guides/update-version.md index 0d23a08d68..27727c9222 100644 --- a/docs/developer-docs/latest/update-migration-guides/update-version.md +++ b/docs/developer-docs/latest/update-migration-guides/update-version.md @@ -7,7 +7,7 @@ description: The following documentation covers how to upgrade your application In this guide you will learn how to upgrade your application to the latest version of Strapi. -::: tip NOTE +:::note When a new version of Strapi is available, you will be notified both in your terminal, and in the admin panel.
Also note that you can check the **Settings > Application** section of the admin panel to have more information on: @@ -16,7 +16,7 @@ Also note that you can check the **Settings > Application** section of the admin ::: -::: warning CAUTION +:::caution Before you start, make sure your server is not running until the end of the guide! ::: @@ -25,7 +25,7 @@ Before you start, make sure your server is not running until the end of the guid Start by upgrading all your Strapi packages in your `package.json`.
For example upgrading from `3.4.4` to `3.6.1`: -:::: tabs +:::: tabs card ::: tab 3.4.4 From 4672f2e23d5b46885f928ddda5e7275796e2f892 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Tue, 20 Jul 2021 21:38:50 +0200 Subject: [PATCH 17/35] Apply minimal tabs to integration guides --- .../content-api/integrations/11ty.md | 6 +++--- .../content-api/integrations/angular.md | 12 ++++++------ .../content-api/integrations/graphql.md | 6 +++--- .../content-api/integrations/next-js.md | 16 ++++++++-------- .../content-api/integrations/nuxt-js.md | 14 +++++++------- .../content-api/integrations/react.md | 19 +++++++++---------- .../content-api/integrations/sapper.md | 12 ++++++------ .../content-api/integrations/svelte.md | 12 ++++++------ .../content-api/integrations/vue-js.md | 12 ++++++------ 9 files changed, 54 insertions(+), 55 deletions(-) diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/11ty.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/11ty.md index 5909a0236b..5290f0a17b 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/11ty.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/11ty.md @@ -13,7 +13,7 @@ If you haven't gone through the Quick Start Guide, the way you request a Strapi Create a `package.json` file, install and save Eleventy into your project. -:::: tabs +:::: tabs card ::: tab npm @@ -44,7 +44,7 @@ npx @11ty/eleventy ## Configure 11ty -11ty do not create any file structure for you. It's up to you to do it. +11ty does not create any file structure for you. It's up to you to do it. - Create a `./src/_data` folder containing a `categories.js` and a `restaurants.js` file. They will be used to fetch your content from Strapi. - Create a `./src/_templates` folder containing a `default.liquid` file. It will be the default template of your project. @@ -102,7 +102,7 @@ module.exports = eleventyConfig => { - Finally, add the following packages to your application: -:::: tabs +:::: tabs card ::: tab npm diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/angular.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/angular.md index a7e3aa82a2..c4aac2bc0b 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/angular.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/angular.md @@ -21,7 +21,7 @@ npx -p @angular/cli ng new angular-app Many HTTP clients are available but in this documentation we'll use [Axios](https://github.com/axios/axios) and [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). -:::: tabs +:::: tabs card ::: tab axios @@ -45,7 +45,7 @@ Execute a `GET` request on the `restaurant` Collection Type in order to fetch al Be sure that you activated the `find` permission for the `restaurant` Collection Type. -:::: tabs +:::: tabs card ::: tab axios @@ -118,7 +118,7 @@ _Response_ ### Example -:::: tabs +:::: tabs card ::: tab axios @@ -223,7 +223,7 @@ Be sure that you activated the `create` permission for the `restaurant` Collecti In this example a `japanese` category has been created which has the id: 3. -:::: tabs +:::: tabs card ::: tab axios @@ -295,7 +295,7 @@ _Response_ ### Example -:::: tabs +:::: tabs card `./src/app.module.ts` @@ -536,7 +536,7 @@ Execute a `PUT` request on the `restaurant` Collection Type in order to update t Be sure that you activated the `put` permission for the `restaurant` Collection Type. -:::: tabs +:::: tabs card We consider that the id of your restaurant is `2`. and the id of your category is `2`. diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/graphql.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/graphql.md index 5587d87272..3d37f2c08d 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/graphql.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/graphql.md @@ -13,7 +13,7 @@ If you haven't gone through the Quick Start Guide, the way you request a Strapi Install the graphql plugin in your Strapi project. -:::: tabs +:::: tabs card ::: tab yarn @@ -85,7 +85,7 @@ _Response_ These examples do not guide you to configure your client with Apollo for your [GraphQL endpoint](http://localhost:1337/graphql). Please follow the associated documentation for each client: ([React](https://www.apollographql.com/docs/react/get-started/) and [Vue.js](https://apollo.vuejs.org/guide/installation.html#_1-apollo-client) here) -:::: tabs +:::: tabs card ::: tab React @@ -208,7 +208,7 @@ _Response_ ## Examples -:::: tabs +:::: tabs card ::: tab React diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/next-js.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/next-js.md index df27dde5b0..313f7e07ff 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/next-js.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/next-js.md @@ -13,7 +13,7 @@ If you haven't gone through the Quick Start Guide, the way you request a Strapi Create a basic Next.js application. -:::: tabs +:::: tabs card ::: tab yarn @@ -23,7 +23,7 @@ yarn create next-app nextjs-app ::: -::: tab npx +::: tab npm ```bash npx create-next-app nextjs-app @@ -37,7 +37,7 @@ npx create-next-app nextjs-app Many HTTP clients are available but in this documentation we'll use [Axios](https://github.com/axios/axios) and [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). -:::: tabs +:::: tabs card ::: tab axios @@ -61,7 +61,7 @@ Execute a `GET` request on the `restaurant` Collection Type in order to fetch al Be sure that you activated the `find` permission for the `restaurant` Collection Type. -:::: tabs +:::: tabs card ::: tab axios @@ -134,7 +134,7 @@ _Response_ ### Example -:::: tabs +:::: tabs card ::: tab axios @@ -235,7 +235,7 @@ Be sure that you activated the `create` permission for the `restaurant` Collecti In this example a `japanese` category has been created which has the id: 3. -:::: tabs +:::: tabs card ::: tab axios @@ -307,7 +307,7 @@ _Response_ ### Example -:::: tabs +:::: tabs card ::: tab axios @@ -563,7 +563,7 @@ Execute a `PUT` request on the `restaurant` Collection Type in order to update t Be sure that you activated the `put` permission for the `restaurant` Collection Type. -:::: tabs +:::: tabs card We consider that the id of your restaurant is `2`. and the id of your category is `2`. diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/nuxt-js.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/nuxt-js.md index 2865dec7c3..1b00c7af93 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/nuxt-js.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/nuxt-js.md @@ -13,7 +13,7 @@ If you haven't gone through the Quick Start Guide, the way you request a Strapi Create a basic Nuxt.js application with [create-nuxt-app](https://github.com/nuxt/create-nuxt-app). -:::: tabs +:::: tabs card ::: tab yarn @@ -37,7 +37,7 @@ npx create-nuxt-app nuxtjs-app Many HTTP clients are available but in this documentation we'll use [Axios](https://github.com/axios/axios) and [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). -:::: tabs +:::: tabs card ::: tab @nuxtjs/strapi @@ -81,7 +81,7 @@ Execute a `GET` request on the `restaurant` Collection Type in order to fetch al Be sure that you activated the `find` permission for the `restaurant` Collection Type. -:::: tabs +:::: tabs card ::: tab @nuxtjs/strapi @@ -168,7 +168,7 @@ _Response_ ### Example -:::: tabs +:::: tabs card ::: tab @nuxt/strapi @@ -323,7 +323,7 @@ Be sure that you activated the `create` permission for the `restaurant` Collecti In this example a `japanese` category has been created which has the id: 3. -:::: tabs +:::: tabs card ::: tab @nuxtjs/strapi @@ -411,7 +411,7 @@ _Response_ ### Example -:::: tabs +:::: tabs card ::: tab @nuxtjs/strapi @@ -687,7 +687,7 @@ Execute a `PUT` request on the `restaurant` Collection Type in order to update t Be sure that you activated the `put` permission for the `restaurant` Collection Type. -:::: tabs +:::: tabs card We consider that the id of your restaurant is `2`. and the id of your category is `2`. diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/react.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/react.md index 78c10ea656..c1368c4c0e 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/react.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/react.md @@ -13,7 +13,7 @@ If you haven't gone through the Quick Start Guide, the way you request a Strapi Create a basic React application using [create-react-app](https://reactjs.org/docs/create-a-new-react-app.html). -:::: tabs +:::: tabs card ::: tab yarn @@ -23,7 +23,7 @@ yarn create react-app react-app ::: -::: tab npx +::: tab npm ```bash npx create-react-app react-app @@ -37,7 +37,7 @@ npx create-react-app react-app Many HTTP clients are available but in this documentation we'll use [Axios](https://github.com/axios/axios) and [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). -:::: tabs +:::: tabs card ::: tab axios @@ -61,7 +61,7 @@ Execute a `GET` request on the `restaurant` Collection Type in order to fetch al Be sure that you activated the `find` permission for the `restaurant` Collection Type -:::: tabs +:::: tabs card ::: tab axios @@ -134,7 +134,7 @@ _Response_ ### Example -:::: tabs +:::: tabs card ::: tab axios @@ -266,7 +266,7 @@ Be sure that you activated the `create` permission for the `restaurant` Collecti In this example a `japanese` category has been created which has the id: 3. -:::: tabs +:::: tabs card ::: tab axios @@ -338,7 +338,7 @@ _Response_ ### Example -:::: tabs +:::: tabs card ::: tab axios @@ -649,10 +649,9 @@ Execute a `PUT` request on the `restaurant` Collection Type in order to update t Be sure that you activated the `put` permission for the `restaurant` Collection Type. -:::: tabs +:::: tabs card -We consider that the id of your restaurant is `2`. -and the id of your category is `2`. +We consider that the id of your restaurant is `2`, and the id of your category is `2`. ::: tab axios diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/sapper.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/sapper.md index 59c28561ff..60a1ef12e4 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/sapper.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/sapper.md @@ -25,7 +25,7 @@ npx degit "sveltejs/sapper-template#webpack" sapper-app Many HTTP clients are available but in this documentation we'll use [Axios](https://github.com/axios/axios) and [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). -:::: tabs +:::: tabs card ::: tab axios @@ -49,7 +49,7 @@ Execute a `GET` request on the `restaurant` Collection Type in order to fetch al Be sure that you activated the `find` permission for the `restaurant` Collection Type -:::: tabs +:::: tabs card ::: tab axios @@ -122,7 +122,7 @@ _Response_ ### Example -:::: tabs +:::: tabs card ::: tab axios @@ -227,7 +227,7 @@ Be sure that you activated the `create` permission for the `restaurant` Collecti In this example a `japanese` category has been created which has the id: 3. -:::: tabs +:::: tabs card ::: tab axios @@ -299,7 +299,7 @@ _Response_ ### Example -:::: tabs +:::: tabs card ::: tab axios @@ -461,7 +461,7 @@ Execute a `PUT` request on the `restaurant` Collection Type in order to update t Be sure that you activated the `put` permission for the `restaurant` Collection Type. -:::: tabs +:::: tabs card We consider that the id of your restaurant is `2`. and the id of your category is `2`. diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/svelte.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/svelte.md index 73de09b030..0910316f92 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/svelte.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/svelte.md @@ -25,7 +25,7 @@ npx degit sveltejs/template svelte-app Many HTTP clients are available but in this documentation we'll use [Axios](https://github.com/axios/axios) and [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). -:::: tabs +:::: tabs card ::: tab axios @@ -49,7 +49,7 @@ Execute a `GET` request on the `restaurant` Collection Type in order to fetch al Be sure that you activated the `find` permission for the `restaurant` Collection Type. -:::: tabs +:::: tabs card ::: tab axios @@ -122,7 +122,7 @@ _Response_ ### Example -:::: tabs +:::: tabs card ::: tab axios @@ -227,7 +227,7 @@ Be sure that you activated the `create` permission for the `restaurant` Collecti In this example a `japanese` category has been created which has the id: 3. -:::: tabs +:::: tabs card ::: tab axios @@ -299,7 +299,7 @@ _Response_ ### Example -:::: tabs +:::: tabs card ::: tab axios @@ -461,7 +461,7 @@ Execute a `PUT` request on the `restaurant` Collection Type in order to update t Be sure that you activated the `put` permission for the `restaurant` Collection Type. -:::: tabs +:::: tabs card We consider that the id of your restaurant is `2`. and the id of your category is `2`. diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/vue-js.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/vue-js.md index 04f835ebf9..aa996f0f36 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/vue-js.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/vue-js.md @@ -21,7 +21,7 @@ vue create vue-app Many HTTP clients are available but in this documentation we'll use [Axios](https://github.com/axios/axios) and [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). -:::: tabs +:::: tabs card ::: tab axios @@ -45,7 +45,7 @@ Execute a `GET` request on the `restaurant` Collection Type in order to fetch al Be sure that you activated the `find` permission for the `restaurant` Collection Type. -:::: tabs +:::: tabs card ::: tab axios @@ -118,7 +118,7 @@ _Response_ ### Example -:::: tabs +:::: tabs card ::: tab axios @@ -233,7 +233,7 @@ Be sure that you activated the `create` permission for the `restaurant` Collecti In this example a `japanese` category has been created which has the id: 3. -:::: tabs +:::: tabs card ::: tab axios @@ -305,7 +305,7 @@ _Response_ ### Example -:::: tabs +:::: tabs card ::: tab axios @@ -500,7 +500,7 @@ Execute a `PUT` request on the `restaurant` Collection Type in order to update t Be sure that you activated the `put` permission for the `restaurant` Collection Type. -:::: tabs +:::: tabs card We consider that the id of your restaurant is `2`. and the id of your category is `2`. From e2d1ae8eb2b7ede38cebc85ab18be3be990667bf Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Tue, 20 Jul 2021 21:58:50 +0200 Subject: [PATCH 18/35] Update VuePress to 1.8.2 --- docs/package.json | 6 +- docs/yarn.lock | 139 +++++++++++++++++++++++++--------------------- 2 files changed, 80 insertions(+), 65 deletions(-) diff --git a/docs/package.json b/docs/package.json index f42aa668ce..ada21b03f6 100644 --- a/docs/package.json +++ b/docs/package.json @@ -9,10 +9,10 @@ }, "license": "SEE LICENSE IN LICENSE", "dependencies": { - "@vuepress/plugin-google-analytics": "^1.7.1", - "@vuepress/plugin-medium-zoom": "^1.7.1", + "@vuepress/plugin-google-analytics": "^1.8.2", + "@vuepress/plugin-medium-zoom": "^1.8.2", "markdown-it-include": "^2.0.0", - "vuepress": "^1.7.1", + "vuepress": "^1.8.2", "vuepress-plugin-code-copy": "^1.0.6", "vuepress-plugin-element-tabs": "^0.2.8", "vuepress-plugin-font-awesome": "1.90.6", diff --git a/docs/yarn.lock b/docs/yarn.lock index e0246054a7..051efb5924 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -1059,18 +1059,18 @@ optionalDependencies: prettier "^1.18.2" -"@vuepress/core@1.8.0": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@vuepress/core/-/core-1.8.0.tgz#b5450cdd33d7fc1e1d21a1590806d429c92d0dc9" - integrity sha512-DrHx3gXa5rUDdvjcUHhmZg1DccMwc3kiYpgtbKCuJpHksz9eAVuOxbcy/b6TGRbbY4Q5EA2Fs3kI9hvPjYdCrQ== +"@vuepress/core@1.8.2": + version "1.8.2" + resolved "https://registry.yarnpkg.com/@vuepress/core/-/core-1.8.2.tgz#4f5bafc894691bfea4146294a582a129483daf2a" + integrity sha512-lh9BLC06k9s0wxTuWtCkiNj49fkbW87enp0XSrFZHEoyDGSGndQjZmMMErcHc5Hx7nrW1nzc33sPH1NNtJl0hw== dependencies: "@babel/core" "^7.8.4" "@vue/babel-preset-app" "^4.1.2" - "@vuepress/markdown" "1.8.0" - "@vuepress/markdown-loader" "1.8.0" - "@vuepress/plugin-last-updated" "1.8.0" - "@vuepress/plugin-register-components" "1.8.0" - "@vuepress/shared-utils" "1.8.0" + "@vuepress/markdown" "1.8.2" + "@vuepress/markdown-loader" "1.8.2" + "@vuepress/plugin-last-updated" "1.8.2" + "@vuepress/plugin-register-components" "1.8.2" + "@vuepress/shared-utils" "1.8.2" autoprefixer "^9.5.1" babel-loader "^8.0.4" cache-loader "^3.0.0" @@ -1103,21 +1103,21 @@ webpack-merge "^4.1.2" webpackbar "3.2.0" -"@vuepress/markdown-loader@1.8.0": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@vuepress/markdown-loader/-/markdown-loader-1.8.0.tgz#0d7493995869f974953b1aa47c7a791943d1d835" - integrity sha512-ykYTNe4mC/0CxyEfyM9+oYJqFvOMZWw5qiNZVfg2t+Ip8nVR2pFhQ6fJe07Pbtc59eT4awKSEd8/kcjhTpfeZA== +"@vuepress/markdown-loader@1.8.2": + version "1.8.2" + resolved "https://registry.yarnpkg.com/@vuepress/markdown-loader/-/markdown-loader-1.8.2.tgz#b2a58291a967f2bbe0af6e58f9542f5911879233" + integrity sha512-mWzFXikCUcAN/chpKkqZpRYKdo0312hMv8cBea2hvrJYV6y4ODB066XKvXN8JwOcxuCjxWYJkhWGr+pXq1oTtw== dependencies: - "@vuepress/markdown" "1.8.0" + "@vuepress/markdown" "1.8.2" loader-utils "^1.1.0" lru-cache "^5.1.1" -"@vuepress/markdown@1.8.0": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@vuepress/markdown/-/markdown-1.8.0.tgz#2fb0a9f6011d2543a4dc7d6a2ae976b9f49873ef" - integrity sha512-f2yhoIHTD6gaPeLLidkxuytKGQCT6Gopm0fpyKZwfFZaWWz5+RPPGevq5UTmTb+5vvO2Li44HJc1EV7QONOw9Q== +"@vuepress/markdown@1.8.2": + version "1.8.2" + resolved "https://registry.yarnpkg.com/@vuepress/markdown/-/markdown-1.8.2.tgz#50ea5a1962591a436b26d1aa2b111df37eb9ea8a" + integrity sha512-zznBHVqW+iBkznF/BO/GY9RFu53khyl0Ey0PnGqvwCJpRLNan6y5EXgYumtjw2GSYn5nDTTALYxtyNBdz64PKg== dependencies: - "@vuepress/shared-utils" "1.8.0" + "@vuepress/shared-utils" "1.8.2" markdown-it "^8.4.1" markdown-it-anchor "^5.0.2" markdown-it-chain "^1.3.0" @@ -1125,10 +1125,10 @@ markdown-it-table-of-contents "^0.4.0" prismjs "^1.13.0" -"@vuepress/plugin-active-header-links@1.8.0": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@vuepress/plugin-active-header-links/-/plugin-active-header-links-1.8.0.tgz#1e3f9c1057a58f3bc849d0eebbcd492975f63a88" - integrity sha512-0SqdkJLJSQqhPTgGccu/ev5zRCfeKKMkyPnUMJYsQe4zGhSosmwLcfB7LDo/VLqLhRipipzBnONESr12OgI4SQ== +"@vuepress/plugin-active-header-links@1.8.2": + version "1.8.2" + resolved "https://registry.yarnpkg.com/@vuepress/plugin-active-header-links/-/plugin-active-header-links-1.8.2.tgz#0cb9b29c826dd97d35357a9b09c962ef782cb793" + integrity sha512-JmXAQg8D7J8mcKe2Ue3BZ9dOCzJMJXP4Cnkkc/IrqfDg0ET0l96gYWZohCqlvRIWt4f0VPiFAO4FLYrW+hko+g== dependencies: lodash.debounce "^4.0.8" @@ -1139,45 +1139,60 @@ dependencies: lodash.debounce "^4.0.8" -"@vuepress/plugin-google-analytics@^1.7.1": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@vuepress/plugin-google-analytics/-/plugin-google-analytics-1.8.0.tgz#99752be07867730df27e830a15c95b3f25b04741" - integrity sha512-1aILIrGjyGOtNROZhNRezrnAsTq3RA4Q9/euTkpdNDyRs4etmW6hWm5yx43Sp+upREMycpbXZ/QoOWmahGwMNA== +"@vuepress/plugin-google-analytics@^1.8.2": + version "1.8.2" + resolved "https://registry.yarnpkg.com/@vuepress/plugin-google-analytics/-/plugin-google-analytics-1.8.2.tgz#96cf65f1f0ecbb3bcf6b0d10089dafe2aea875bc" + integrity sha512-BMFayLzT2BvXmnhM9mDHw0UPU7J0pH1X9gQA4HmZxOf7f3+atK5eJGsc1Ia/+1FTG2ESvhFLUU/CC3h5arjEJw== -"@vuepress/plugin-last-updated@1.8.0": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@vuepress/plugin-last-updated/-/plugin-last-updated-1.8.0.tgz#a0fcd2906a4dcae107634013f7c49ddd05e0de87" - integrity sha512-fBwtlffAabpTTalUMPSaJy/5fp3WpIA1FdWOfFcQ12X6179tupZB8fnueNsVJGBvGcdw8fbyzh5C9yKAq9lR/w== +"@vuepress/plugin-last-updated@1.8.2": + version "1.8.2" + resolved "https://registry.yarnpkg.com/@vuepress/plugin-last-updated/-/plugin-last-updated-1.8.2.tgz#7ce689f8d5050cf0213949bc2e5aa879c09ff4b1" + integrity sha512-pYIRZi52huO9b6HY3JQNPKNERCLzMHejjBRt9ekdnJ1xhLs4MmRvt37BoXjI/qzvXkYtr7nmGgnKThNBVRTZuA== dependencies: cross-spawn "^6.0.5" -"@vuepress/plugin-medium-zoom@^1.7.1": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@vuepress/plugin-medium-zoom/-/plugin-medium-zoom-1.8.0.tgz#e7bff4dd0af58929c16d3feaa8f47dfa6cedac34" - integrity sha512-mx+abkOVm/+hBFsE26xzcfHSB1EknUr7UJx1UKgHm2368odFhz5HMB68gFfslMKjwfKjfgNgP/Bm/zwWcbQXmw== +"@vuepress/plugin-medium-zoom@^1.8.2": + version "1.8.2" + resolved "https://registry.yarnpkg.com/@vuepress/plugin-medium-zoom/-/plugin-medium-zoom-1.8.2.tgz#0243dd27edf0c710f9a41a234d253d76ab51e625" + integrity sha512-Mljso/8E6IbNmIKmwKeC6FDfnhKY3fsOUSs5kEGzz3RQwd54eshqHAMRVwW4LZkYZHhwQXF8+qk7YqoMZB7jjg== dependencies: medium-zoom "^1.0.4" -"@vuepress/plugin-nprogress@1.8.0": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@vuepress/plugin-nprogress/-/plugin-nprogress-1.8.0.tgz#8fd3d5415d4c8326ca569118e935b875e5fd7bb5" - integrity sha512-JmjeJKKWhbF/8z+EnY8BCWHoHKhUWfqXjXOfV+xifITl6BJlf53I/jLFpX7Sij8Whe+SKjH7kNvc+hioUdwJQw== +"@vuepress/plugin-nprogress@1.8.2": + version "1.8.2" + resolved "https://registry.yarnpkg.com/@vuepress/plugin-nprogress/-/plugin-nprogress-1.8.2.tgz#dc6c082925420c8c59ecb7fc2d4a9401f6d4664a" + integrity sha512-3TOBee2NM3WLr1tdjDTGfrAMggjN+OlEPyKyv8FqThsVkDYhw48O3HwqlThp9KX7UbL3ExxIFBwWRFLC+kYrdw== dependencies: nprogress "^0.2.0" -"@vuepress/plugin-register-components@1.8.0": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@vuepress/plugin-register-components/-/plugin-register-components-1.8.0.tgz#cb23c8b54865926f16e81fdf5fa6ccf0dec17c0e" - integrity sha512-ztafaAxn7XFS4F8z51d+QQB6DNAUG54wBSdfKydfnHbAYgtxoALzPlJW7FKQdxvZKxqGrJa9e4rkoZsat13KRQ== +"@vuepress/plugin-register-components@1.8.2": + version "1.8.2" + resolved "https://registry.yarnpkg.com/@vuepress/plugin-register-components/-/plugin-register-components-1.8.2.tgz#2fb45a68b0a1efb8822670d95c3b231a2d0eb74d" + integrity sha512-6SUq3nHFMEh9qKFnjA8QnrNxj0kLs7+Gspq1OBU8vtu0NQmSvLFZVaMV7pzT/9zN2nO5Pld5qhsUJv1g71MrEA== dependencies: - "@vuepress/shared-utils" "1.8.0" + "@vuepress/shared-utils" "1.8.2" -"@vuepress/plugin-search@1.8.0": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@vuepress/plugin-search/-/plugin-search-1.8.0.tgz#d10cc04cff7467829b2e2e896b7e72a5ebc27ce1" - integrity sha512-LlOCPg7JJ3I9WEpiBU8vCEFp6I5sa3OBu6SFHk+uK9iyKHwJYdRs4VK9x+igG40Rt/OIDRDo3c9SbLX/E/kqeA== +"@vuepress/plugin-search@1.8.2": + version "1.8.2" + resolved "https://registry.yarnpkg.com/@vuepress/plugin-search/-/plugin-search-1.8.2.tgz#74b92f663acf6b4560e15dc0442a84c4e874e206" + integrity sha512-JrSJr9o0Kar14lVtZ4wfw39pplxvvMh8vDBD9oW09a+6Zi/4bySPGdcdaqdqGW+OHSiZNvG+6uyfKSBBBqF6PA== + +"@vuepress/shared-utils@1.8.2": + version "1.8.2" + resolved "https://registry.yarnpkg.com/@vuepress/shared-utils/-/shared-utils-1.8.2.tgz#5ec1601f2196aca34ad82eed7c9be2d7948f705b" + integrity sha512-6kGubc7iBDWruEBUU7yR+sQ++SOhMuvKWvWeTZJKRZedthycdzYz7QVpua0FaZSAJm5/dIt8ymU4WQvxTtZgTQ== + dependencies: + chalk "^2.3.2" + escape-html "^1.0.3" + fs-extra "^7.0.1" + globby "^9.2.0" + gray-matter "^4.0.1" + hash-sum "^1.0.2" + semver "^6.0.0" + toml "^3.0.0" + upath "^1.1.0" -"@vuepress/shared-utils@1.8.0", "@vuepress/shared-utils@^1.2.0": +"@vuepress/shared-utils@^1.2.0": version "1.8.0" resolved "https://registry.yarnpkg.com/@vuepress/shared-utils/-/shared-utils-1.8.0.tgz#b1187c764f4c2dee018b83f3560a14067d931240" integrity sha512-CVNMiYBntQyb4CuyS4KzmglDqsuBpj8V4QMzL9gCSoMv0VmwKx05fZedu+r0G5OcxYN4qjnu99yl9G6zWhOU9w== @@ -1192,14 +1207,14 @@ toml "^3.0.0" upath "^1.1.0" -"@vuepress/theme-default@1.8.0": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@vuepress/theme-default/-/theme-default-1.8.0.tgz#5bcca542bc61099498f5d99a9928f0ff66e6e382" - integrity sha512-CueCaANfICFbLnEL78YxSjgCHXL7mkgQI/cfyEHBgxlr247cYJQ+9IFDQIS0fJNuzHdLRy9UFUvVrCu6go8PUg== +"@vuepress/theme-default@1.8.2": + version "1.8.2" + resolved "https://registry.yarnpkg.com/@vuepress/theme-default/-/theme-default-1.8.2.tgz#7f474036c752c1f9801b83f68f5c70c092b182b4" + integrity sha512-rE7M1rs3n2xp4a/GrweO8EGwqFn3EA5gnFWdVmVIHyr7C1nix+EqjpPQF1SVWNnIrDdQuCw38PqS+oND1K2vYw== dependencies: - "@vuepress/plugin-active-header-links" "1.8.0" - "@vuepress/plugin-nprogress" "1.8.0" - "@vuepress/plugin-search" "1.8.0" + "@vuepress/plugin-active-header-links" "1.8.2" + "@vuepress/plugin-nprogress" "1.8.2" + "@vuepress/plugin-search" "1.8.2" docsearch.js "^2.5.2" lodash "^4.17.15" stylus "^0.54.8" @@ -8209,13 +8224,13 @@ vuepress-plugin-smooth-scroll@^0.0.3: dependencies: smoothscroll-polyfill "^0.4.3" -vuepress@^1.7.1: - version "1.8.0" - resolved "https://registry.yarnpkg.com/vuepress/-/vuepress-1.8.0.tgz#0139d466b33fbfdb628abb76d555368b85cf9772" - integrity sha512-YvNitvoEc+JSJRv1W+IoRnvOTFyTWyUMuGuF2kTIbiSwIHb1hNinc3lqNSeBQJy7IBqyEzK5fnTq1mlynh4gwA== +vuepress@^1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/vuepress/-/vuepress-1.8.2.tgz#97e8bf979630611fc7b621fc4cc35b798ee5e847" + integrity sha512-BU1lUDwsA3ghf7a9ga4dsf0iTc++Z/l7BR1kUagHWVBHw7HNRgRDfAZBDDQXhllMILVToIxaTifpne9mSi94OA== dependencies: - "@vuepress/core" "1.8.0" - "@vuepress/theme-default" "1.8.0" + "@vuepress/core" "1.8.2" + "@vuepress/theme-default" "1.8.2" cac "^6.5.6" envinfo "^7.2.0" opencollective-postinstall "^2.0.2" From ba7b7d264b38c844ae6f5131f851f715560c8ec4 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Tue, 20 Jul 2021 22:21:41 +0200 Subject: [PATCH 19/35] Temporarily setting root url (testing Vercel deploy) --- docs/.vuepress/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 722cf7f201..750175ba49 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -454,7 +454,7 @@ module.exports = { title: '', port: 8080, description: 'The headless CMS developers love.', - base: '/documentation/', + base: '/', plugins: plugins, head: [ [ From eb7ab4571c0131b28eaa9ee98740485cf659a2c4 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Tue, 20 Jul 2021 22:25:19 +0200 Subject: [PATCH 20/35] Revert "Temporarily setting root url (testing Vercel deploy)" This reverts commit ba7b7d264b38c844ae6f5131f851f715560c8ec4. --- docs/.vuepress/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 750175ba49..722cf7f201 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -454,7 +454,7 @@ module.exports = { title: '', port: 8080, description: 'The headless CMS developers love.', - base: '/', + base: '/documentation/', plugins: plugins, head: [ [ From 4f42545f3d0224194f593292b07f04b263c696ca Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Tue, 20 Jul 2021 23:19:07 +0200 Subject: [PATCH 21/35] Use code-blocks and code-groups everywhere appropriate --- .../content-api/integrations/graphql.md | 29 +++--- .../content-api/integrations/next-js.md | 23 ++--- .../content-api/integrations/nuxt-js.md | 23 ++--- .../content-api/integrations/react.md | 23 ++--- .../latest/development/admin-customization.md | 31 +++--- .../local-plugins-customization.md | 27 +++--- .../development/plugins/documentation.md | 23 ++--- .../latest/development/plugins/email.md | 22 ++--- .../latest/development/plugins/graphql.md | 24 ++--- .../latest/development/plugins/i18n.md | 22 ++--- .../latest/development/plugins/upload.md | 24 ++--- .../latest/getting-started/quick-start.md | 36 ++++--- .../setup-deployment-guides/configurations.md | 94 ++++++++----------- .../configurations/databases/mongodb.md | 24 ++--- .../configurations/databases/sqlite.md | 26 +++-- .../deployment/hosting-guides/amazon-aws.md | 4 +- .../hosting-guides/google-app-engine.md | 26 ++--- .../deployment/hosting-guides/heroku.md | 58 ++++++------ .../installation/cli.md | 40 ++++---- .../update-migration-guides/update-version.md | 34 +++++-- 20 files changed, 292 insertions(+), 321 deletions(-) diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/graphql.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/graphql.md index 3d37f2c08d..e8f0615180 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/graphql.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/graphql.md @@ -13,33 +13,30 @@ If you haven't gone through the Quick Start Guide, the way you request a Strapi Install the graphql plugin in your Strapi project. -:::: tabs card - -::: tab yarn - -```bash -yarn strapi install graphql -``` -::: -::: tab npm + -```bash + +```sh npm run strapi install graphql ``` + -::: + +```sh +yarn strapi install graphql +``` + -::: tab strapi -```bash + +```sh strapi install graphql ``` + -::: - -:::: + ## Fetch your Restaurant collection type diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/next-js.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/next-js.md index 313f7e07ff..c4e500a885 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/next-js.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/next-js.md @@ -13,25 +13,22 @@ If you haven't gone through the Quick Start Guide, the way you request a Strapi Create a basic Next.js application. -:::: tabs card - -::: tab yarn -```bash -yarn create next-app nextjs-app -``` - -::: + -::: tab npm - -```bash + +```sh npx create-next-app nextjs-app ``` + -::: + +```sh +yarn create next-app nextjs-app +``` + -:::: + ## Use an HTTP client diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/nuxt-js.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/nuxt-js.md index 1b00c7af93..0d0971bb42 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/nuxt-js.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/nuxt-js.md @@ -13,25 +13,22 @@ If you haven't gone through the Quick Start Guide, the way you request a Strapi Create a basic Nuxt.js application with [create-nuxt-app](https://github.com/nuxt/create-nuxt-app). -:::: tabs card - -::: tab yarn -```bash -yarn create nuxt-app nuxtjs-app -``` - -::: + -::: tab npx - -```bash + +```sh npx create-nuxt-app nuxtjs-app ``` + -::: + +```sh +yarn create nuxt-app nuxtjs-app +``` + -:::: + ## Use an HTTP client diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/react.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/react.md index c1368c4c0e..6c9927447a 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/react.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/react.md @@ -13,25 +13,22 @@ If you haven't gone through the Quick Start Guide, the way you request a Strapi Create a basic React application using [create-react-app](https://reactjs.org/docs/create-a-new-react-app.html). -:::: tabs card - -::: tab yarn -```bash -yarn create react-app react-app -``` - -::: + -::: tab npm - -```bash + +```sh npx create-react-app react-app ``` + -::: + +```sh +yarn create react-app react-app +``` + -:::: + ## Use an HTTP client diff --git a/docs/developer-docs/latest/development/admin-customization.md b/docs/developer-docs/latest/development/admin-customization.md index aecb2e388a..8234efc98c 100644 --- a/docs/developer-docs/latest/development/admin-customization.md +++ b/docs/developer-docs/latest/development/admin-customization.md @@ -191,33 +191,28 @@ module.exports = ({ env }) => ({ To build the administration, run the following command from the root directory of your project. -:::: tabs card -::: tab yarn + + +```sh +npm build ``` -yarn build -``` - -::: + -::: tab npm - -``` -npm run build + +```sh +yarn build ``` + -::: - -::: tab strapi - -``` + +```sh 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. diff --git a/docs/developer-docs/latest/development/local-plugins-customization.md b/docs/developer-docs/latest/development/local-plugins-customization.md index c0a163e875..177fd3e970 100644 --- a/docs/developer-docs/latest/development/local-plugins-customization.md +++ b/docs/developer-docs/latest/development/local-plugins-customization.md @@ -176,27 +176,24 @@ The admin panel is a [React](https://facebook.github.io/react/) application whic To enable local plugin development, you need to start your application with the front-end development mode activated: -:::: tabs card -::: tab yarn + -```bash -$ cd my-app -$ yarn develop --watch-admin + +```sh +cd my-app +npm run develop -- --watch-admin ``` + -::: - -::: tab npm - -```bash -$ cd my-app -$ npm run develop -- --watch-admin + +```sh +cd my-app +yarn develop --watch-admin ``` + -::: - -:::: + ### API diff --git a/docs/developer-docs/latest/development/plugins/documentation.md b/docs/developer-docs/latest/development/plugins/documentation.md index c0cbcc0eab..8195a255a5 100644 --- a/docs/developer-docs/latest/development/plugins/documentation.md +++ b/docs/developer-docs/latest/development/plugins/documentation.md @@ -15,25 +15,22 @@ You'll be able to visualize all your end-points directly from the SWAGGER UI. As usual run the following in your terminal: -:::: tabs card -::: tab yarn + -``` -yarn strapi install documentation -``` - -::: - -::: tab npm - -``` + +```sh npm run strapi install documentation ``` + -::: + +```sh +yarn strapi install documentation +``` + -:::: + When your plugin is installed, you just have to start your application and it will generate your API documentation. diff --git a/docs/developer-docs/latest/development/plugins/email.md b/docs/developer-docs/latest/development/plugins/email.md index ee9e755675..90036a64a7 100644 --- a/docs/developer-docs/latest/development/plugins/email.md +++ b/docs/developer-docs/latest/development/plugins/email.md @@ -71,25 +71,23 @@ You can check all the available providers developed by the community on npmjs.or To install a new provider run: -:::: tabs card -::: tab yarn -``` -yarn add strapi-provider-email-sendgrid --save -``` - -::: + -::: tab npm - -``` + +```sh npm install strapi-provider-email-sendgrid --save ``` + -::: + +```sh +yarn add strapi-provider-email-sendgrid --save +``` + -:::: + #### Using scoped packages as providers diff --git a/docs/developer-docs/latest/development/plugins/graphql.md b/docs/developer-docs/latest/development/plugins/graphql.md index 33d724663d..1ec8b21617 100644 --- a/docs/developer-docs/latest/development/plugins/graphql.md +++ b/docs/developer-docs/latest/development/plugins/graphql.md @@ -11,25 +11,21 @@ By default Strapi create [REST endpoints](/developer-docs/latest/developer-resou To get started with GraphQL in your app, please install the plugin first. To do that, open your terminal and run the following command: -:::: tabs card + -::: tab yarn - -``` -yarn strapi install graphql -``` - -::: - -::: tab npm - -``` + +```sh npm run strapi install graphql ``` + -::: + +```sh +yarn strapi install graphql +``` + -:::: + Then, start your app and open your browser at [http://localhost:1337/graphql](http://localhost:1337/graphql). You should see the interface (**GraphQL Playground**) that will help you to write GraphQL query to explore your data. diff --git a/docs/developer-docs/latest/development/plugins/i18n.md b/docs/developer-docs/latest/development/plugins/i18n.md index a7a6d2c854..e672d0126c 100644 --- a/docs/developer-docs/latest/development/plugins/i18n.md +++ b/docs/developer-docs/latest/development/plugins/i18n.md @@ -28,25 +28,23 @@ The plugin can be installed: - [from the Marketplace](/user-docs/latest/plugins/installing-plugins-via-marketplace.md), - or using the Terminal, by running one of the following commands: -:::: tabs card -::: tab yarn -``` bash -yarn strapi install i18n -``` - -::: - -::: tab npm + -``` bash + +```sh npm run strapi install i18n ``` + -::: + +```sh +yarn strapi install i18n +``` + -:::: + ## Usage with Strapi Content API diff --git a/docs/developer-docs/latest/development/plugins/upload.md b/docs/developer-docs/latest/development/plugins/upload.md index e43bd3e7d9..2b87372420 100644 --- a/docs/developer-docs/latest/development/plugins/upload.md +++ b/docs/developer-docs/latest/development/plugins/upload.md @@ -336,25 +336,21 @@ You can check all the available providers developed by the community on npmjs.or To install a new provider run: -:::: tabs card + -::: tab yarn - -``` -yarn add strapi-provider-upload-aws-s3 -``` - -::: - -::: tab npm - -``` + +```sh npm install strapi-provider-upload-aws-s3 --save ``` + -::: + +```sh +yarn add strapi-provider-upload-aws-s3 +``` + -:::: + ### Local server diff --git a/docs/developer-docs/latest/getting-started/quick-start.md b/docs/developer-docs/latest/getting-started/quick-start.md index e9ae85fe7a..1f3449dde6 100644 --- a/docs/developer-docs/latest/getting-started/quick-start.md +++ b/docs/developer-docs/latest/getting-started/quick-start.md @@ -109,17 +109,21 @@ This quick start guide has been specifically tailored to use the [Gatsby blog st To create a [Gatsby](https://www.gatsbyjs.com/) blog using Strapi, run the following command in a terminal: -:::: tabs card -::: tab npm + + + ```bash - npx create-strapi-starter my-project gatsby-blog +npx create-strapi-starter my-project gatsby-blog ``` -::: -::: tab yarn + + + ```bash - yarn create strapi-starter my-project gatsby-blog +yarn create strapi-starter my-project gatsby-blog ``` -:::: + + + During the installation, when terminal asks `Choose your installation type`: select the default `Quickstart (recommended)` option by pressing Enter. The installation then resumes β€” just let the magic happen! @@ -241,19 +245,21 @@ The beauty of using Strapi [starters](https://strapi.io/starters) is that the St Run the following command in a terminal: -:::: tabs card -::: tab npm + + + ```bash - npx create-strapi-app my-project --quickstart +npx create-strapi-starter my-project gatsby-blog ``` -::: + -::: tab yarn + ```bash - yarn create strapi-app my-project --quickstart +yarn create strapi-starter my-project gatsby-blog ``` -::: -:::: + + + ### Step 2: Register the first administrator user diff --git a/docs/developer-docs/latest/setup-deployment-guides/configurations.md b/docs/developer-docs/latest/setup-deployment-guides/configurations.md index 3ae674a55a..fd84e957bd 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/configurations.md +++ b/docs/developer-docs/latest/setup-deployment-guides/configurations.md @@ -1252,23 +1252,21 @@ To configure a provider, follow the procedure below: Using: [passport-google-oauth2](https://github.com/mstade/passport-google-oauth2) -:::: tabs card - -::: tab yarn + -```bash -yarn add passport-google-oauth2 + +```sh +npm install --save passport-google-oauth2 ``` + -::: - -::: tab npm - -```bash -npm install --save passport-google-oauth2 + +```sh +yarn add passport-google-oauth2 ``` + -:::: + `/config/server.js` @@ -1320,25 +1318,21 @@ module.exports = ({ env }) => ({ Using: [passport-github](https://github.com/cfsghost/passport-github) -:::: tabs card - -::: tab yarn + -```bash -yarn add passport-github2 -``` - -::: - -::: tab npm - -```bash + +```sh npm install --save passport-github2 ``` + -::: + +```sh +yarn add passport-github2 +``` + -:::: + `/config/server.js` @@ -1386,25 +1380,21 @@ module.exports = ({ env }) => ({ Using: [passport-discord](https://github.com/nicholastay/passport-discord#readme) -:::: tabs card - -::: tab yarn - -```bash -yarn add passport-discord -``` - -::: - -::: tab npm + -```bash + +```sh npm install --save passport-discord ``` + -::: + +```sh +yarn add passport-discord +``` + -:::: + `/config/server.js` @@ -1451,25 +1441,21 @@ module.exports = ({ env }) => ({ Using: [passport-azure-ad-oauth2](https://github.com/auth0/passport-azure-ad-oauth2#readme) -:::: tabs card + -::: tab yarn - -```bash -yarn add passport-azure-ad-oauth2 jsonwebtoken -``` - -::: - -::: tab npm - -```bash + +```sh npm install --save passport-azure-ad-oauth2 jsonwebtoken ``` + -::: + +```sh +yarn add passport-azure-ad-oauth2 jsonwebtoken +``` + -:::: + `/config/server.js` diff --git a/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/mongodb.md b/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/mongodb.md index 59c384800e..b14e9ea4a0 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/mongodb.md +++ b/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/mongodb.md @@ -141,25 +141,21 @@ MongoDB must already be running in the background. `Path: ./` -:::: tabs card - -::: tab yarn - -``` -yarn create strapi-app my-project -``` - -::: - -::: tab npx + -``` + +```sh npx create-strapi-app my-project ``` + -::: + +```sh +yarn create strapi-app my-project +``` + -:::: + - Use your `down arrow` key and select `Custom (manual settings)` and press `enter`: diff --git a/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md b/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md index 1498cebef4..1a008ff15f 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md +++ b/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md @@ -11,30 +11,26 @@ SQLite is the default ([Quick Start](/developer-docs/latest/getting-started/quic Simply use one of the following commands. -:::: tabs card + -::: tab yarn - -```bash -yarn create strapi-app my-project --quickstart -``` - -::: - -::: tab npx - -```bash + +```sh npx create-strapi-app my-project --quickstart ``` + -::: + +```sh +yarn create strapi-app my-project --quickstart +``` + -:::: + This will create a new project and launch it in the browser. ::: tip -The [Quick Start Guide](/developer-docs/latest/getting-started/quick-start.md) is a complete step-by-step tutorial +The [Quick Start Guide](/developer-docs/latest/getting-started/quick-start.md) is a complete step-by-step tutorial. ::: ## Other SQL Databases (PostgreSQL, MySQL) diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/amazon-aws.md b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/amazon-aws.md index 0ea0cdbc6b..f0bd5acc31 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/amazon-aws.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/amazon-aws.md @@ -628,8 +628,8 @@ sudo nano /etc/systemd/system/webhook.service - In the `nano` editor, copy/paste the following script, but make sure to replace `ubuntu` **in two places** if you changed the default `ubuntu` user, and `paste the $PATH` from above. -::: warning -**DELETE THE #COMMENTS BEFORE SAVING**, then save and exit. +:::caution +Delete the #comments before saving, then save and exit. ::: ```bash diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/google-app-engine.md b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/google-app-engine.md index f1d434536c..12cdfa7de8 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/google-app-engine.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/google-app-engine.md @@ -14,29 +14,23 @@ In this guide we are going to: ### New Strapi project -:::: tabs card - -::: 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 + +```sh +npx create-strapi-app my-project --quickstart ``` + -::: - -::: tab npx - -Use **npm/npx** to install the Strapi project - -```bash -npx create-strapi-app my-project --quickstart + +```sh +yarn create strapi-app my-project --quickstart ``` + -::: + -:::: When the setup completes, register an admin user using the form which opens in the browser. This user will be only relevant in local development. diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md index 993c9eedea..1a5a4c9f62 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md @@ -71,29 +71,22 @@ If you plan to use **MongoDB** with your project, [refer to the create a Strapi `Path: ./` -:::: tabs card - -::: 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 + +```sh npx create-strapi-app my-project --quickstart ``` + -::: + +```sh +yarn create strapi-app my-project --quickstart +``` + -:::: + ::: tip When you use `--quickstart` to create a Strapi project locally, a **SQLite database** is used which is not compatible with Heroku. Therefore, another database option [must be chosen](#_7-heroku-database-set-up). @@ -191,17 +184,21 @@ Strapi expects a variable for each database connection configuration (host, user Install the package: -With npm: + -```bash + +```sh npm install pg-connection-string --save ``` + -With yarn: - -```bash + +```sh yarn add pg-connection-string ``` + + + #### 4. Create your Heroku database config file for production @@ -268,20 +265,21 @@ Unless you originally installed Strapi with PostgreSQL, you need to install the `Path: ./my-project/` -:::: tabs card -::: tab npm + -```bash + +```sh npm install pg --save ``` -::: + -::: tab yarn -```bash + +```sh yarn add pg ``` -::: -:::: + + + ::::: diff --git a/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md b/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md index 8f2a4e1489..c05905b4a6 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md +++ b/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md @@ -42,17 +42,21 @@ Strapi also offers a starters CLI to create a project with a pre-made frontend a 1. In a terminal, run the following command: -:::: tabs card -::: tab npm - ```sh - npx create-strapi-app my-project - ``` -::: -::: tab yarn - ```sh - yarn create strapi-app my-project - ``` -::: + + + +```sh +npx create-strapi-app my-project +``` + + + +```sh +yarn create strapi-app my-project +``` + + + 2. Choose an installation type: * `Quickstart (recommended)`, which uses the default database (SQLite) @@ -70,15 +74,19 @@ Strapi also offers a starters CLI to create a project with a pre-made frontend a To start the Strapi application, run the following command in the project folder: -:::: tabs card -::: tab npm + + + ```bash npm run develop ``` -::: + -::: tab yarn + ```sh yarn develop ``` -::: + + + + diff --git a/docs/developer-docs/latest/update-migration-guides/update-version.md b/docs/developer-docs/latest/update-migration-guides/update-version.md index 27727c9222..ab80ddead6 100644 --- a/docs/developer-docs/latest/update-migration-guides/update-version.md +++ b/docs/developer-docs/latest/update-migration-guides/update-version.md @@ -86,11 +86,22 @@ If the operation doesn't work, try removing your `yarn.lock` or `package-lock.js New releases can introduce changes to the administration panel that require a rebuild. Rebuild the admin panel with one of the following commands: -```bash -yarn build --clean -# or + + + + +```sh npm run build -- --clean ``` + + + +```sh +yarn build --clean +``` + + + ## Extensions @@ -106,10 +117,21 @@ Just make sure when you update your version that a migration guide exists or not If you have followed the information above, you can start your application with: -```bash -yarn develop -# or + + + + +```sh npm run develop ``` + + + +```sh +yarn develop +``` + + + πŸŽ‰ Congrats, your application has been migrated! From 68258fa56812608b8ad7cf257cd3fef3844f5a5f Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Wed, 21 Jul 2021 11:41:42 +0200 Subject: [PATCH 22/35] Tweak request/response CSS based on designers feedback --- .../styles/strapi-custom-blocks.styl | 73 ++++++++++--------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/docs/.vuepress/styles/strapi-custom-blocks.styl b/docs/.vuepress/styles/strapi-custom-blocks.styl index d755c164fb..8bc50e29d6 100644 --- a/docs/.vuepress/styles/strapi-custom-blocks.styl +++ b/docs/.vuepress/styles/strapi-custom-blocks.styl @@ -65,31 +65,29 @@ &.api-call padding: 0 border-radius: 12px - margin: 2rem 0 2rem + // margin: 2rem 0 2rem @media (min-width: 1536px) display: flex - margin: 3rem -12rem 2rem 0 + margin: 0 -12rem 2rem 0 align-items: stretch - .request - background-color: rgba(62,67,88,.7) + &.request + background-color: #666687 padding: 0 1rem 1rem border-radius: 12px - font-size: 90% - color: rgba(241,251,255,.8) + font-size: 100% + color:#F6F6F9 @media (min-width: 1536px) - flex: 0 0 48% + flex: 0 0 44% border-radius: 12px 0 0 12px .custom-block-title - text-transform: uppercase margin-left: -1rem margin-right: -1rem margin-top: 0 border-radius: 12px 12px 0 0 padding: .5rem 1rem - font-weight: 400 - background-color: #373D4F - background-color: rgba(55,61,79,1) - color: #cacaca; + font-weight: 700 + background-color: #32324D + color: #F6F6F9 font-size: 90%; @media (min-width: 1536px) border-radius: 12px 0 0 0 @@ -105,45 +103,45 @@ [class^="language-"] background-color: transparent font-size: 110% + &::before + color: #EAEAEF pre padding: 1rem 0 0 1rem code - color: rgb(241,251,255) - background-color: rgba(90,90,90,.5) + color: #F6F6F9 + background-color: #212134 .token - color: rgb(241,251,255) + color: #F6F6F9 // catch-all for undefined colors &.punctuation &.operator - color: rgba(241,251,255,.6) &.property - color: rgb(241,251,255) + color: #F6F6F9 &.string - color: rgba(133, 217, 150, 1) + color: #B6FFB5 &.number - // color: rgb(245,106,11) - color: rgb(244,244,0) - // color: rgb(164, 205, 254) - .response - background-color: rgba(220,226,234,.4) + color: #FDED9B + &.response + background-color: #DCDCE4 margin-top: 2rem padding: 0 1rem 1rem border-radius: 12px - font-size: 90% + font-size: 100% + color: #666687 @media (min-width: 1536px) - flex: 0 0 45% + flex: 0 0 44% margin-top: 0 border-radius: 0 12px 12px 0 .extra-class::before - color: rgba(42,64,80,.4) + color: #666687 .custom-block-title - background-color: rgba(220,226,234,1) + background-color: #C0C0CF + color: #32324D border-radius: 12px 12px 0 0 margin-left: -1rem margin-right: -1rem - text-transform: uppercase padding: .5rem 1rem margin-top: 0 - font-weight: 400 + font-weight: 700 font-size: 90%; margin-bottom: .5rem @media (min-width: 1536px) @@ -151,22 +149,25 @@ [class^="language-"] background-color: transparent font-size: 110% + &::before + color: #666687 pre padding: 1rem 0 0 1rem code + color: #666687 !important .token - color: rgb(241,251,255) + color: #666687 // catch-all for undefined colors &.punctuation &.operator - color: rgba(42,64,80,.4) &.property - color: rgba(42,64,80,.8) + color: #666687 &.string - color: rgba(27,137,70,1) + color: #2B7732 &.number - color: rgb(245,106,11) - .request - .response + color: #B7322A + &.request + &.response + margin-top: 2rem .extra-class font-size: 90% border-radius: 6px 0 6px 0 From eb8d89ea5192686ada49271f96fcc4237b8be450 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Wed, 21 Jul 2021 12:19:16 +0200 Subject: [PATCH 23/35] Simplify some wordings in i18n doc --- .../latest/development/plugins/i18n.md | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/developer-docs/latest/development/plugins/i18n.md b/docs/developer-docs/latest/development/plugins/i18n.md index e672d0126c..ea87fc7e83 100644 --- a/docs/developer-docs/latest/development/plugins/i18n.md +++ b/docs/developer-docs/latest/development/plugins/i18n.md @@ -57,7 +57,7 @@ The i18n plugin adds new features to the [Content API](/developer-docs/latest/de The `locale` [API parameter](/developer-docs/latest/developer-resources/content-api/content-api.md#api-parameters) can be used to fetch entries only for a specified locale. It takes a locale code as value (see [full list of available locales](https://github.com/strapi/strapi/blob/master/packages/strapi-plugin-i18n/constants/iso-locales.json)). -:::tip TIP +:::tip To fetch content for a locale, make sure it has been already [added to Strapi in the admin panel](/user-docs/latest/settings/managing-global-settings.md#configuring-internationalization-locales). ::: @@ -71,7 +71,7 @@ Use `all` as a value for the locale code, as in `http://localhost:1337/restauran If the `locale` parameter isn't defined, it will be set to the default locale. `en` is the default locale when i18n plugin is installed, so by default a GET request to `http://localhost:1337/restaurants` will return the same response as a request to `http://localhost:1337/restaurants?_locale=en`. -::: tip TIP +::: tip Another locale can be [set as the default locale](/user-docs/latest/settings/managing-global-settings.md#adding-a-new-locale) in the admin panel. ::: @@ -98,7 +98,7 @@ When the i18n plugin is installed, the response to requests includes fields that { "id": 4, "name": "Can Alegria", - "description": "Can Alegria restaurant description in French", + "description": "description in French", "locale": "fr", "localizations": [ { @@ -111,7 +111,7 @@ When the i18n plugin is installed, the response to requests includes fields that { "id": 8, "name": "She's Cake", - "description": "She's Cake restaurant description in French", + "description": "description in French", "locale": "fr", "localizations": [] } @@ -140,7 +140,7 @@ If no locale has been passed in the request body, the entry is created using the ```json { "name": "Oplato", - "description": "Oplato restaurant description in English" + "description": "description in English" } ``` @@ -152,7 +152,7 @@ If no locale has been passed in the request body, the entry is created using the { "id": 5, "name": "Oplato", - "description": "Oplato restaurant description in English", + "description": "description in English", "locale": "en", "localizations": [] } @@ -171,7 +171,7 @@ To create a localized entry for a locale different from the default one, add the ```json { "name": "She's Cake", - "description": "She's Cake restaurant description in French", + "description": "description in French", "locale": "fr" } ``` @@ -184,7 +184,7 @@ To create a localized entry for a locale different from the default one, add the { "id": 8, "name": "She's Cake", - "description": "She's Cake restaurant description in French", + "description": "description in French", "locale": "fr", "localizations": [] } @@ -204,7 +204,7 @@ To create another localization for an existing localized entry, send a POST requ When creating a localization for existing localized entries, the body of the POST request can only accept localized fields. -::: tip TIP +::: tip The Content-Type should have the [`createlocalization` permission](/user-docs/latest/users-roles-permissions/configuring-administrator-roles.md#collection-and-single-types) enabled, otherwise the POST request will return a `403: Forbidden` status. ::: @@ -226,7 +226,7 @@ When sending a POST request to a collection type, Strapi will: "locale": "en", "name": "She's Cake", "test": 9, - "description": "She's Cake restaurant description in English" + "description": "description in English" } ``` @@ -237,13 +237,13 @@ This request: 3. copies every non-localized fields from `restaurant:8` into the new entry and keeps the localized fields from the request's body ::: -::: response Example reponse +::: response Example response ```json { "id": 9, "name": "She's Cake", - "description": "She's Cake restaurant description in English", + "description": "description in English", "locale": "en", "localizations": [ { @@ -277,7 +277,7 @@ This request: ::: -::: response Example reponse +::: response Example response ```json { @@ -318,7 +318,7 @@ The i18n plugin adds new features to the [GraphQL plugin](/developer-docs/latest Queries can use the `locale` argument to fetch entries only for a specified locale. -::: tip TIP +::: tip To fetch entries for all locales, use `locale: "all"` in the query. ::: #### Fetching a collection type @@ -449,7 +449,7 @@ mutation { input: { where: { id: 8 }, data: { locale: "en", name: "She's Cake", - description: "She's Cake restaurant description in English" + description: "description in English" }} ) { id @@ -476,12 +476,12 @@ mutation { "id": "9", "locale": "en", "name": "She's Cake", - "description": "She's Cake restaurant description in English", + "description": "description in English", "localizations": [ { "id": "8", "locale": "fr", - "description": "She's Cake restaurant description in French" + "description": "description in French" } ] } From 6399966f60861fac81a38411c3faf974330151d1 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Wed, 21 Jul 2021 12:22:02 +0200 Subject: [PATCH 24/35] Apply api-call/request/response containers throughout the docs --- .../content-api/content-api.md | 50 +++++++++--- .../content-api/integrations/11ty.md | 15 +++- .../content-api/integrations/angular.md | 59 +++++++------- .../content-api/integrations/dart.md | 24 ++++-- .../content-api/integrations/flutter.md | 25 ++++-- .../content-api/integrations/gatsby.md | 17 +++- .../content-api/integrations/go.md | 27 ++++--- .../content-api/integrations/graphql.md | 22 ++--- .../content-api/integrations/gridsome.md | 23 +++--- .../content-api/integrations/laravel.md | 4 +- .../content-api/integrations/next-js.md | 61 +++++++------- .../content-api/integrations/nuxt-js.md | 81 +++++++++---------- .../content-api/integrations/php.md | 35 +++++--- .../content-api/integrations/python.md | 24 ++++-- .../content-api/integrations/react.md | 61 +++++++------- .../content-api/integrations/ruby.md | 27 +++++-- .../content-api/integrations/sapper.md | 59 ++++++++------ .../content-api/integrations/svelte.md | 53 ++++++------ .../content-api/integrations/vue-js.md | 64 +++++++-------- .../latest/development/plugins/graphql.md | 38 ++++++++- .../latest/development/plugins/i18n.md | 6 +- 21 files changed, 469 insertions(+), 306 deletions(-) diff --git a/docs/developer-docs/latest/developer-resources/content-api/content-api.md b/docs/developer-docs/latest/developer-resources/content-api/content-api.md index c6bd02839b..3798c2437e 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/content-api.md +++ b/docs/developer-docs/latest/developer-resources/content-api/content-api.md @@ -823,23 +823,31 @@ Filters are used as a suffix of a field name: ##### Find users having `John` as first name. +:::request Example requests: Find users having 'John' as first name `GET /users?firstName=John` -or +
or
`GET /users?firstName_eq=John` +::: -##### Find restaurants having a price equal or greater than `3`. +##### Find restaurants having a price equal or greater than `3` +:::request Example request: Find restaurants having a price equal or greater than `3` `GET /restaurants?price_gte=3` +::: -##### Find multiple restaurant with id 3, 6, 8. +##### Find multiple restaurant with id 3, 6, 8 +:::request Example request: Find multiple restaurant with id 3, 6, 8 `GET /restaurants?id_in=3&id_in=6&id_in=8` +::: ##### Using `_where` +:::request Example requests: Using the _where filter `GET /restaurants?_where[price_gte]=3` `GET /restaurants?_where[0][price_gte]=3&[0][price_lte]=7` +::: #### Complex queries @@ -917,7 +925,9 @@ The query engine implicitly uses the `OR` operation when you pass an array of va Restaurants that have 1 or 2 `stars`: +:::request Example request: Restaurants that have 1 or 2 `stars` `GET /restaurants?stars=1&stars=2` +::: or @@ -974,8 +984,10 @@ When creating nested queries, make sure the depth is less than 20 or the query s #### Deep filtering -Find restaurants owned by a chef who belongs to a restaurant with star equal to 5 + +:::request Example request: Find restaurants owned by a chef who belongs to a restaurant with star equal to 5 `GET /restaurants?chef.restaurant.star=5` +::: ::: warning Querying your API with deep filters may cause performance issues. @@ -1000,17 +1012,19 @@ This feature isn't available for polymorphic relations. This relation type is us Sort according to a specific field. -#### Example +#### Examples -##### Sort users by email. +:::request Example requests: Sort users by email +`GET /users?_sort=email:ASC` to sort by ascending order -- ASC: `GET /users?_sort=email:ASC` -- DESC: `GET /users?_sort=email:DESC` +`GET /users?_sort=email:DESC` to sort by descending order +::: -##### Sorting on multiple fields +:::request Example requests: Sorting on multiple fields +`GET /users?_sort=email:ASC,dateField:DESC` -- `GET /users?_sort=email:asc,dateField:desc` -- `GET /users?_sort=email:DESC,username:ASC` +`GET /users?_sort=email:DESC,username:ASC` +::: ### Limit @@ -1022,7 +1036,9 @@ The default limit is `100` ##### Limit the result length to 30. +:::request Example request: Limit the result length to 30. `GET /users?_limit=30` +::: You can require the full data set by passing a limit equal to `-1`. @@ -1032,9 +1048,11 @@ Skip a specific number of entries (especially useful for pagination). #### Example -##### Get the second page of results. +##### Get the second page of results +::: request Example request: Get the second page of results `GET /users?_start=10&_limit=10` +::: ### Publication State @@ -1053,13 +1071,19 @@ Handled states are: ##### Get published articles +:::request Example requests: Get published articles `GET /articles` -OR + +or + `GET /articles?_publicationState=live` +::: ##### Get both published and draft articles +:::request Example request: Get both published and draft articles `GET /articles?_publicationState=preview` +::: :::note If you only want to retrieve your draft entries, you can combine the `preview` mode and the `published_at` field. diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/11ty.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/11ty.md index 5290f0a17b..5abaee62df 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/11ty.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/11ty.md @@ -128,7 +128,8 @@ Execute a `GET` request on the `restaurant` Collection Type in order to fetch al Be sure that you activated the `find` permission for the `restaurant` Collection Type. -_Request_ +:::: api-call +::: request Example GET request ```js const { default: axios } = require('axios'); @@ -142,8 +143,9 @@ module.exports = async () => { } }; ``` +::: -_Response_ +:::response Example response ```json [ @@ -178,6 +180,8 @@ _Response_ } ] ``` +::: +:::: ### Example @@ -246,7 +250,8 @@ Execute a `GET` request on the `category` Collection Type in order to fetch a sp Be sure that you activated the `find` permission for the `category` Collection Type. -_Request_ +:::: api-call +::: request Example GET request ```js const { default: axios } = require('axios'); @@ -260,8 +265,9 @@ module.exports = async () => { } }; ``` +::: -_Response_ +::: response Example response ```json [ @@ -306,6 +312,7 @@ _Response_ } ] ``` +::: ### Example diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/angular.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/angular.md index c4aac2bc0b..15723532f0 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/angular.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/angular.md @@ -45,11 +45,10 @@ Execute a `GET` request on the `restaurant` Collection Type in order to fetch al Be sure that you activated the `find` permission for the `restaurant` Collection Type. -:::: tabs card - -::: tab axios +::::: tabs card -_Request_ +:::: tab axios +::: request Example GET request with axios ```js import axios from 'axios'; @@ -60,11 +59,11 @@ axios.get('http://localhost:1337/restaurants').then(response => { ``` ::: +:::: -::: tab fetch - -_Request_ +:::: tab fetch +::: request Example GET request with fetch ```js fetch('http://localhost:1337/restaurants', { method: 'GET', @@ -77,9 +76,10 @@ fetch('http://localhost:1337/restaurants', { ``` ::: +:::: +::::: -_Response_ - +:::response Example response ```json [ { @@ -113,8 +113,7 @@ _Response_ } ] ``` - -:::: +::: ### Example @@ -223,11 +222,10 @@ Be sure that you activated the `create` permission for the `restaurant` Collecti In this example a `japanese` category has been created which has the id: 3. -:::: tabs card +::::: tabs card -::: tab axios - -_Request_ +:::: tab axios +::: request Example POST request with axios ```js import axios from 'axios'; @@ -244,11 +242,11 @@ axios ``` ::: +:::: -::: tab fetch - -_Request_ +:::: tab fetch +::: request Example POST request with fetch ```js fetch('http://localhost:1337/restaurants', { method: 'POST', @@ -266,9 +264,10 @@ fetch('http://localhost:1337/restaurants', { ``` ::: +:::: +::::: -_Response_ - +:::response Example response ```json { "id": 2, @@ -290,8 +289,8 @@ _Response_ ] } ``` +::: -:::: ### Example @@ -536,14 +535,13 @@ Execute a `PUT` request on the `restaurant` Collection Type in order to update t Be sure that you activated the `put` permission for the `restaurant` Collection Type. -:::: tabs card +::::: tabs card We consider that the id of your restaurant is `2`. and the id of your category is `2`. -::: tab axios - -_Request_ +:::: tab axios +::: request Example PUT request with axios ```js import axios from 'axios'; @@ -558,10 +556,10 @@ axios ``` ::: +:::: -::: tab fetch - -_Request_ +:::: tab fetch +::: request Example PUT request with fetch ```js fetch('http://localhost:1337/restaurants/2', { @@ -580,8 +578,10 @@ fetch('http://localhost:1337/restaurants/2', { ``` ::: +:::: +::::: -_Response_ +::: response Example response ```json { @@ -605,7 +605,6 @@ _Response_ } ``` -:::: ## Starter diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/dart.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/dart.md index 9c6c4f4560..fe860624c7 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/dart.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/dart.md @@ -42,7 +42,8 @@ Execute a `GET` request on the `restaurant` Collection Type in order to fetch al Be sure that you activated the `find` permission for the `restaurant` Collection Type. -_Request_ +:::: api-call +::: request Example GET request ```dart Map headers = { @@ -57,8 +58,9 @@ var response = await http.get( print(response.body) ``` +::: -_Response_ +::: response Example response ```json [ @@ -93,6 +95,8 @@ _Response_ } ] ``` +::: +:::: ### Example @@ -127,7 +131,8 @@ Be sure that you activated the `create` permission for the `restaurant` Collecti In this example a `japanese` category has been created which has the id: 3. -_Request_ +:::: api-call +::: request Example POST request ```dart Map headers = { @@ -145,8 +150,9 @@ var response = await http.post( }); ); ``` +::: -_Response_ +::: response Example response ```json { @@ -169,6 +175,8 @@ _Response_ ] } ``` +::: +:::: ### Example @@ -215,7 +223,8 @@ Execute a `PUT` request on the `restaurant` Collection Type in order to update t Be sure that you activated the `put` permission for the `restaurant` Collection Type. -_Request_ +:::: api-call +::: request Example PUT request ```dart Map headers = { @@ -231,8 +240,9 @@ var response = await http.put( }); ); ``` +::: -_Response_ +::: response Example response ```json { @@ -255,6 +265,8 @@ _Response_ ] } ``` +::: +:::: ### Example diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/flutter.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/flutter.md index 1af7bdbfc0..47a0559a83 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/flutter.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/flutter.md @@ -51,7 +51,8 @@ Execute a `GET` request on the `restaurant` Collection Type in order to fetch al Be sure that you activated the `find` permission for the `restaurant` Collection Type. -_Request_ +:::: api-call +::: request Example GET request ```dart Map headers = { @@ -66,9 +67,9 @@ var response = await http.get( print(response.body) ``` +::: -_Response_ - +::: response Example response ```json [ { @@ -102,6 +103,8 @@ _Response_ } ] ``` +::: +:::: ## POST Request your collection type @@ -111,7 +114,8 @@ Be sure that you activated the `create` permission for the `restaurant` Collecti In this example a `japanese` category has been created which has the id: 3. -_Request_ +:::: api-call +::: request Example POST request ```dart Map headers = { @@ -129,8 +133,9 @@ var response = await http.post( }); ); ``` +::: -_Response_ +::: response Example response ```json { @@ -153,6 +158,8 @@ _Response_ ] } ``` +::: +:::: ## PUT Request your collection type @@ -160,7 +167,8 @@ Execute a `PUT` request on the `restaurant` Collection Type in order to update t Be sure that you activated the `put` permission for the `restaurant` Collection Type. -_Request_ +:::: api-call +::: request Example PUT request ```dart Map headers = { @@ -176,8 +184,9 @@ var response = await http.put( }); ); ``` +::: -_Response_ +::: response Example Response ```json { @@ -200,6 +209,8 @@ _Response_ ] } ``` +::: +:::: ## Conclusion diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/gatsby.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/gatsby.md index 915dab2a36..58772d6655 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/gatsby.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/gatsby.md @@ -47,7 +47,8 @@ Execute a `GET` request on the `restaurant` Collection Type in order to fetch al Be sure that you activated the `find` permission for the `restaurant` Collection Type. -_Request_ +:::: api-call +:::request Example GET request ```graphql query { @@ -62,8 +63,9 @@ query { } } ``` +::: -_Response_ +:::response Example response ```json { @@ -82,6 +84,8 @@ _Response_ } } ``` +::: +:::: ### Example @@ -126,7 +130,8 @@ Execute a `GET` request on the `category` Collection Type in order to fetch a sp Be sure that you activated the `findOne` permission for the `category` Collection Type. -_Request_ +:::: api-call +::: request Example GET request ```graphql query { @@ -141,7 +146,9 @@ query { } ``` -_Response_ +::: + +::: response Example response ```json { @@ -160,6 +167,8 @@ _Response_ "extensions": {} } ``` +::: +:::: ### Example diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/go.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/go.md index cb56b8c11c..28e9bb4c56 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/go.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/go.md @@ -28,14 +28,15 @@ Execute a `GET` request on the `restaurant` Collection Type in order to fetch al Be sure that you activated the `find` permission for the `restaurant` Collection Type. - -_Request_ +:::: api-call +::: request Example GET request ```go response, error := http.Get("http://localhost:1337/restaurants") ``` +::: -_Response_ +::: response Example response ```json [{ @@ -62,6 +63,8 @@ _Response_ ] }] ``` +::: +:::: ### Example @@ -96,8 +99,8 @@ Execute a `POST` request on the `restaurant` Collection Type in order to create Be sure that you activated the `create` permission for the `restaurant` Collection Type and the `find` permission for the `category` Collection type. - -_Request_ +:::: api-call +::: request Example POST request ```go postRest, _ := json.Marshal(map[string]string{ @@ -107,8 +110,9 @@ postRest, _ := json.Marshal(map[string]string{ responseBody := bytes.NewBuffer(postRest) resp, error := http.Post("http://localhost:1337/restaurants", "application/json", responseBody) ``` +::: -_Response_ +::: response Example response ```json { @@ -120,6 +124,8 @@ _Response_ "categories": [] } ``` +::: +:::: ### Example @@ -181,8 +187,8 @@ Execute a `PUT` request on the `restaurant` Collection Type in order to update t Be sure that you activated the `update` permission for the `restaurant` Collection Type. PUT Request is sligtly different as we need to target the particular thing we want update. We do this by first making a request to http://localhost:1337/restaurants/1 and then update what we want to update. In this example, we are going to update "Biscotte Restaurant" to "Restaurant Home". - -_Request_ +:::: api-call +::: request Example PUT request ```go putRest, _ := json.Marshal(map[string]string { @@ -193,8 +199,9 @@ url := "http://localhost:1337/restaurants/1" req, error := http.NewRequest(http.MethodPut, url, bytes.NewBuffer(putRest)) req.Header.Set("Content-Type", "application/json") ``` +::: -_Response_ +::: response Example response ```json { @@ -221,6 +228,8 @@ _Response_ ] } ``` +::: +:::: ### Example diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/graphql.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/graphql.md index e8f0615180..7942388aaf 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/graphql.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/graphql.md @@ -11,9 +11,7 @@ If you haven't gone through the Quick Start Guide, the way you request a Strapi ## Install the GraphQL plugin -Install the graphql plugin in your Strapi project. - - +Install the GraphQL plugin in your Strapi project. @@ -42,8 +40,8 @@ strapi install graphql Play with the [GraphQL Playground](http://localhost:1337/graphql) to fetch your content. -_Request_ - +::::api-call +:::request Example query ```graphql query Restaurants { restaurants { @@ -56,9 +54,9 @@ query Restaurants { } } ``` +::: -_Response_ - +:::response Example response ```json { "data": { @@ -77,6 +75,8 @@ _Response_ } } ``` +::: +:::: ### Examples @@ -167,7 +167,8 @@ export default { ## Fetch your Category collection type -_Request_ +:::: api-call +::: request Example request ```graphql query Category { @@ -182,8 +183,9 @@ query Category { } } ``` +::: -_Response_ +:::response Example response ```json { @@ -202,6 +204,8 @@ _Response_ } } ``` +::: +:::: ## Examples diff --git a/docs/developer-docs/latest/developer-resources/content-api/integrations/gridsome.md b/docs/developer-docs/latest/developer-resources/content-api/integrations/gridsome.md index e2adee7461..e8905cc918 100644 --- a/docs/developer-docs/latest/developer-resources/content-api/integrations/gridsome.md +++ b/docs/developer-docs/latest/developer-resources/content-api/integrations/gridsome.md @@ -49,7 +49,8 @@ Execute a `GET` request on the `restaurant` Collection Type in order to fetch al Be sure that you activated the `find` permission for the `restaurant` Collection Type. -_Request_ +:::: api-call +::: request Example GET request ```graphql query { @@ -64,9 +65,9 @@ query { } } ``` +::: -_Response_ - +:::response Example response ```json { "data": { @@ -85,12 +86,14 @@ _Response_ } } ``` +::: +:::: ### Example `./src/pages/Index.vue` -```js +```jsx