docs: fix mdx formatting

This commit is contained in:
Jarrod Flesch
2023-07-05 15:26:10 -04:00
parent 5b79067cc1
commit d112159d93
7 changed files with 21 additions and 68 deletions

View File

@@ -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. 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"> <Banner type="success">
<strong>Tip:</strong> <strong>Tip:</strong><br />
<br /> Custom components will automatically be provided with all props that the default component would accept.
Custom components will automatically be provided with all props that the
default component would accept.
</Banner> </Banner>
### Base Component Overrides ### Base Component Overrides

View File

@@ -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. After a user logs in, they can change their language selection in the `/account` view.
<Banner> <Banner>
<strong>Note:</strong> <strong>Note:</strong><br />
<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).
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> </Banner>
### Node Express ### Node Express

View File

@@ -65,9 +65,7 @@ payload.init({
``` ```
<Banner type="warning"> <Banner type="warning">
It is best practice to avoid saving credentials or API keys directly in your 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).
code, use [environment
variables](/docs/configuration/overview#using-environment-variables-in-your-config).
</Banner> </Banner>
### Use an email service ### 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. The mock email handler is used when payload is started with neither `transport` or `transportOptions` to know how to deliver email.
<Banner type="warning"> <Banner type="warning">
The randomly generated email account username and password will be different The randomly generated email account username and password will be different each time the Payload server starts.
each time the Payload server starts.
</Banner> </Banner>
### Using multiple mail providers ### Using multiple mail providers

View File

@@ -7,17 +7,12 @@ keywords: upload, images media, fields, config, configuration, documentation, Co
--- ---
<Banner> <Banner>
The Upload field allows for the selection of a Document from a collection 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.
supporting Uploads, and formats the selection as a thumbnail in the Admin
panel.
</Banner> </Banner>
<Banner type="warning"> <Banner type="warning">
<strong>Important:</strong> <strong>Important:</strong><br />
<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.
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> </Banner>
**Example uses:** **Example uses:**
@@ -100,11 +95,6 @@ const uploadField = {
You can learn more about writing queries [here](/docs/queries/overview). You can learn more about writing queries [here](/docs/queries/overview).
<Banner type="warning"> <Banner type="warning">
<strong>Note:</strong> <strong>Note:</strong><br />
<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.
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> </Banner>

View File

@@ -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. You can even log in using the `login[collection-singular-label-here]` mutation to use the Playground as an authenticated user.
<Banner type="success"> <Banner type="success">
<strong>Tip:</strong> <strong>Tip:</strong><br />
<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.
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> </Banner>
## Query complexity limits ## Query complexity limits

View File

@@ -7,9 +7,7 @@ keywords: deployment, production, config, configuration, documentation, Content
--- ---
<Banner type="success"> <Banner type="success">
So you've developed a Payload app, it's fully tested, and running great 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?
locally. Now it's time to launch. <strong>Awesome! Great work!</strong> Now,
what's next?
</Banner> </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: 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. 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"> <Banner type="error">
<strong> <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.
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> </Banner>
##### Building the Admin panel ##### 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. 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"> <Banner type="warning">
<strong>Note:</strong> <strong>Note:</strong><br />
<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).
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> </Banner>
##### DocumentDB ##### DocumentDB
@@ -131,11 +118,8 @@ Alternatively, persistent filesystems will never delete your files and can be tr
- Many other more traditional web hosts - Many other more traditional web hosts
<Banner type="error"> <Banner type="error">
<strong>Warning:</strong> <strong>Warning:</strong><br />
<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.
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> </Banner>
##### Using ephemeral filesystem providers like Heroku ##### Using ephemeral filesystem providers like Heroku

View File

@@ -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. Payload provides an extremely granular querying language through all APIs. Each API takes the same syntax and fully supports all options.
<Banner> <Banner>
<strong> <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.
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> </Banner>
### Simple queries ### Simple queries
@@ -74,9 +68,7 @@ The above example demonstrates a simple query but you can get much more complex.
<Banner type="success"> <Banner type="success">
<strong>Tip</strong>:<br /> <strong>Tip</strong>:<br />
If you know your users will be querying on certain fields a lot, you can add <strong> 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.
index: true
</strong> to a field's config which will speed up searches using that field immensely.
</Banner> </Banner>
### And / Or Logic ### And / Or Logic