docs: fix mdx formatting
This commit is contained in:
@@ -11,10 +11,8 @@ While designing the Payload Admin panel, we determined it should be as minimal a
|
||||
To swap in your own React component, first, consult the list of available component overrides below. Determine the scope that corresponds to what you are trying to accomplish, and then author your React component accordingly.
|
||||
|
||||
<Banner type="success">
|
||||
<strong>Tip:</strong>
|
||||
<br />
|
||||
Custom components will automatically be provided with all props that the
|
||||
default component would accept.
|
||||
<strong>Tip:</strong><br />
|
||||
Custom components will automatically be provided with all props that the default component would accept.
|
||||
</Banner>
|
||||
|
||||
### Base Component Overrides
|
||||
|
||||
@@ -62,10 +62,8 @@ The Payload admin panel reads the language settings of a user's browser and disp
|
||||
After a user logs in, they can change their language selection in the `/account` view.
|
||||
|
||||
<Banner>
|
||||
<strong>Note:</strong>
|
||||
<br />
|
||||
If there is a language that Payload does not yet support, we accept code
|
||||
[contributions](https://github.com/payloadcms/payload/blob/master/contributing.md).
|
||||
<strong>Note:</strong><br />
|
||||
If there is a language that Payload does not yet support, we accept code [contributions](https://github.com/payloadcms/payload/blob/master/contributing.md).
|
||||
</Banner>
|
||||
|
||||
### Node Express
|
||||
|
||||
@@ -65,9 +65,7 @@ payload.init({
|
||||
```
|
||||
|
||||
<Banner type="warning">
|
||||
It is best practice to avoid saving credentials or API keys directly in your
|
||||
code, use [environment
|
||||
variables](/docs/configuration/overview#using-environment-variables-in-your-config).
|
||||
It is best practice to avoid saving credentials or API keys directly in your code, use [environment variables](/docs/configuration/overview#using-environment-variables-in-your-config).
|
||||
</Banner>
|
||||
|
||||
### Use an email service
|
||||
@@ -162,8 +160,7 @@ payload.init({
|
||||
The mock email handler is used when payload is started with neither `transport` or `transportOptions` to know how to deliver email.
|
||||
|
||||
<Banner type="warning">
|
||||
The randomly generated email account username and password will be different
|
||||
each time the Payload server starts.
|
||||
The randomly generated email account username and password will be different each time the Payload server starts.
|
||||
</Banner>
|
||||
|
||||
### Using multiple mail providers
|
||||
|
||||
@@ -7,17 +7,12 @@ keywords: upload, images media, fields, config, configuration, documentation, Co
|
||||
---
|
||||
|
||||
<Banner>
|
||||
The Upload field allows for the selection of a Document from a collection
|
||||
supporting Uploads, and formats the selection as a thumbnail in the Admin
|
||||
panel.
|
||||
The Upload field allows for the selection of a Document from a collection supporting Uploads, and formats the selection as a thumbnail in the Admin panel.
|
||||
</Banner>
|
||||
|
||||
<Banner type="warning">
|
||||
<strong>Important:</strong>
|
||||
<br />
|
||||
To use this field, you need to have a Collection configured to allow Uploads.
|
||||
For more information, [click here](/docs/upload/overview) to read about how to
|
||||
enable Uploads on a collection by collection basis.
|
||||
<strong>Important:</strong><br />
|
||||
To use this field, you need to have a Collection configured to allow Uploads. For more information, [click here](/docs/upload/overview) to read about how to enable Uploads on a collection by collection basis.
|
||||
</Banner>
|
||||
|
||||
**Example uses:**
|
||||
@@ -100,11 +95,6 @@ const uploadField = {
|
||||
You can learn more about writing queries [here](/docs/queries/overview).
|
||||
|
||||
<Banner type="warning">
|
||||
<strong>Note:</strong>
|
||||
<br />
|
||||
When an upload field has both <strong>filterOptions</strong> and a custom{" "}
|
||||
<strong>validate</strong> function, the api will not validate{" "}
|
||||
<strong>filterOptions</strong> unless you call the default upload field
|
||||
validation function imported from <strong>payload/fields/validations</strong>{" "}
|
||||
in your validate function.
|
||||
<strong>Note:</strong><br />
|
||||
When an upload field has both <strong>filterOptions</strong> and a custom <strong>validate</strong> function, the api will not validate <strong>filterOptions</strong> unless you call the default upload field validation function imported from <strong>payload/fields/validations</strong> in your validate function.
|
||||
</Banner>
|
||||
|
||||
@@ -115,14 +115,8 @@ GraphQL Playground is enabled by default for development purposes, but disabled
|
||||
You can even log in using the `login[collection-singular-label-here]` mutation to use the Playground as an authenticated user.
|
||||
|
||||
<Banner type="success">
|
||||
<strong>Tip:</strong>
|
||||
<br />
|
||||
To see more regarding how the above queries and mutations are used, visit your
|
||||
GraphQL playground (by default at
|
||||
[http://localhost:3000/api/graphql-playground](http://localhost:3000/api/graphql-playground))
|
||||
while your server is running. There, you can use the "Schema" and "Docs"
|
||||
buttons on the right to see a ton of detail about how GraphQL operates within
|
||||
Payload.
|
||||
<strong>Tip:</strong><br />
|
||||
To see more regarding how the above queries and mutations are used, visit your GraphQL playground (by default at [http://localhost:3000/api/graphql-playground](http://localhost:3000/api/graphql-playground)) while your server is running. There, you can use the "Schema" and "Docs" buttons on the right to see a ton of detail about how GraphQL operates within Payload.
|
||||
</Banner>
|
||||
|
||||
## Query complexity limits
|
||||
|
||||
@@ -7,9 +7,7 @@ keywords: deployment, production, config, configuration, documentation, Content
|
||||
---
|
||||
|
||||
<Banner type="success">
|
||||
So you've developed a Payload app, it's fully tested, and running great
|
||||
locally. Now it's time to launch. <strong>Awesome! Great work!</strong> Now,
|
||||
what's next?
|
||||
So you've developed a Payload app, it's fully tested, and running great locally. Now it's time to launch. <strong>Awesome! Great work!</strong> Now, what's next?
|
||||
</Banner>
|
||||
|
||||
There are many ways to deploy Payload to a production environment. When evaluating how you will deploy Payload, you need to consider these main aspects:
|
||||
@@ -37,13 +35,7 @@ When you initialize Payload, you provide it with a `secret` property. This prope
|
||||
Because _**you**_ are in complete control of who can do what with your data, you should double and triple-check that you wield that power responsibly before deploying to Production.
|
||||
|
||||
<Banner type="error">
|
||||
<strong>
|
||||
By default, all Access Control functions require that a user is successfully
|
||||
logged in to Payload to create, read, update, or delete data.
|
||||
</strong>{" "}
|
||||
But, if you allow public user registration, for example, you will want to make
|
||||
sure that your access control functions are more strict - permitting{" "}
|
||||
<strong>only appropriate users</strong> to perform appropriate actions.
|
||||
<strong>By default, all Access Control functions require that a user is successfully logged in to Payload to create, read, update, or delete data.</strong> But, if you allow public user registration, for example, you will want to make sure that your access control functions are more strict - permitting <strong>only appropriate users</strong> to perform appropriate actions.
|
||||
</Banner>
|
||||
|
||||
##### Building the Admin panel
|
||||
@@ -91,13 +83,8 @@ If you are using a [persistent filesystem-based cloud host](#persistent-vs-ephem
|
||||
Alternatively, you can rely on a third-party MongoDB host such as [MongoDB Atlas](https://www.mongodb.com/). With Atlas or a similar cloud provider, you can trust them to take care of your database's availability, security, redundancy, and backups.
|
||||
|
||||
<Banner type="warning">
|
||||
<strong>Note:</strong>
|
||||
<br />
|
||||
If versions are enabled and a collection has many documents you may need a
|
||||
minimum of an m10 mongoDB atlas cluster if you reach a sorting `exceeded
|
||||
memory limit` error to view a collection list in the admin UI. The limitations
|
||||
of the m2 and m5 tier clusters are here: [Atlas M0 (Free Cluster), M2, and M5
|
||||
Limitations](https://www.mongodb.com/docs/atlas/reference/free-shared-limitations/?_ga=2.176267877.1329169847.1677683154-860992573.1647438381#operational-limitations).
|
||||
<strong>Note:</strong><br />
|
||||
If versions are enabled and a collection has many documents you may need a minimum of an m10 mongoDB atlas cluster if you reach a sorting `exceeded memory limit` error to view a collection list in the admin UI. The limitations of the m2 and m5 tier clusters are here: [Atlas M0 (Free Cluster), M2, and M5 Limitations](https://www.mongodb.com/docs/atlas/reference/free-shared-limitations/?_ga=2.176267877.1329169847.1677683154-860992573.1647438381#operational-limitations).
|
||||
</Banner>
|
||||
|
||||
##### DocumentDB
|
||||
@@ -131,11 +118,8 @@ Alternatively, persistent filesystems will never delete your files and can be tr
|
||||
- Many other more traditional web hosts
|
||||
|
||||
<Banner type="error">
|
||||
<strong>Warning:</strong>
|
||||
<br />
|
||||
If you rely on Payload's <strong>Upload</strong> functionality, make sure you
|
||||
either use a host with a persistent filesystem or have an integration with a
|
||||
third-party file host like Amazon S3.
|
||||
<strong>Warning:</strong><br />
|
||||
If you rely on Payload's <strong>Upload</strong> functionality, make sure you either use a host with a persistent filesystem or have an integration with a third-party file host like Amazon S3.
|
||||
</Banner>
|
||||
|
||||
##### Using ephemeral filesystem providers like Heroku
|
||||
|
||||
@@ -9,13 +9,7 @@ keywords: query, documents, overview, documentation, Content Management System,
|
||||
Payload provides an extremely granular querying language through all APIs. Each API takes the same syntax and fully supports all options.
|
||||
|
||||
<Banner>
|
||||
<strong>
|
||||
Here, "querying" relates to filtering or searching through documents within
|
||||
a Collection.
|
||||
</strong>{" "}
|
||||
You can build queries to pass to Find operations as well as to [restrict which
|
||||
documents certain users can access](/docs/access-control/overview) via access
|
||||
control functions.
|
||||
<strong>Here, "querying" relates to filtering or searching through documents within a Collection.</strong> You can build queries to pass to Find operations as well as to [restrict which documents certain users can access](/docs/access-control/overview) via access control functions.
|
||||
</Banner>
|
||||
|
||||
### Simple queries
|
||||
@@ -74,9 +68,7 @@ The above example demonstrates a simple query but you can get much more complex.
|
||||
|
||||
<Banner type="success">
|
||||
<strong>Tip</strong>:<br />
|
||||
If you know your users will be querying on certain fields a lot, you can add <strong>
|
||||
index: true
|
||||
</strong> to a field's config which will speed up searches using that field immensely.
|
||||
If you know your users will be querying on certain fields a lot, you can add <strong>index: true</strong> to a field's config which will speed up searches using that field immensely.
|
||||
</Banner>
|
||||
|
||||
### And / Or Logic
|
||||
|
||||
Reference in New Issue
Block a user