diff --git a/docs/api-bridges.md b/docs/api-bridges.md index c94a8d373..3d624cef4 100644 --- a/docs/api-bridges.md +++ b/docs/api-bridges.md @@ -16,19 +16,19 @@ Currently available bridges: - `SimpleSchema2Bridge` in `uniforms-bridge-simple-schema-2` - `SimpleSchemaBridge` in `uniforms-bridge-simple-schema` -If you see a lot of [`Warning: Unknown props...`](https://fb.me/react-unknown-prop) logs, check if your schema or theme doesn't provide extra props. If so, consider [registering it with `filterDOMProps`](api-helpers#filterdomprops). +If you see a lot of [`Warning: Unknown props...`](https://fb.me/react-unknown-prop) logs, check if your schema or theme doesn't provide extra props. If so, consider [registering it with `filterDOMProps`](/docs/api-helpers#filterdomprops). ## `GraphQLBridge` This bridge enables using GraphQL schema types as uniforms forms. This saves you from not having to rewrite the form schema in your code. -As a trade-off, you have to write the validator from scratch. In some cases, it might be easier to rewrite the schema and use, for example, [`JSONSchemaBridge` with `ajv`](api-bridges#jsonschemabridge). +As a trade-off, you have to write the validator from scratch. In some cases, it might be easier to rewrite the schema and use, for example, [`JSONSchemaBridge` with `ajv`](/docs/api-bridges#jsonschemabridge). If only a simple or no validation is needed, this bridge is perfectly suited to work with GraphQL schemas. The constructor accepts three arguments: - `schema: GraphQLType` can be any type parsed and extracted from a GraphQL schema. -- `validator: (model: Record) => any` a custom validator function that should return a falsy value if no errors are present or information about errors in the model as described in the [custom bridge section](examples-custom-bridge#validator-definition). +- `validator: (model: Record) => any` a custom validator function that should return a falsy value if no errors are present or information about errors in the model as described in the [custom bridge section](/docs/examples-custom-bridge#validator-definition). - `extras: Record = {}` used to extend the schema generated from GraphQL type with extra field configuration. ### Code example diff --git a/docs/examples-custom-fields.mdx b/docs/examples-custom-fields.mdx index e430beb71..3351f7a4a 100644 --- a/docs/examples-custom-fields.mdx +++ b/docs/examples-custom-fields.mdx @@ -21,7 +21,7 @@ field props here, like value or onChange for some extra logic. ### `CustomAutoField` -**Note:** Since v3.1, the preferred way is to create an `AutoField` component is to use the `createAutoField` helper. Also, it's often the case that using the [`AutoField.componentDetectorContext`](uth-autofield-algorithm#overriding-autofield) is enough. +**Note:** Since v3.1, the preferred way is to create an `AutoField` component is to use the `createAutoField` helper. Also, it's often the case that using the [`AutoField.componentDetectorContext`](/docs/uth-autofield-algorithm#overriding-autofield) is enough. These are two _standard_ options to define a custom `AutoField`: either using `connectField` or simply taking the code from the [original one](https://github.com/vazco/uniforms/blob/master/packages/uniforms-unstyled/src/AutoField.tsx#L14-L47) _(theme doesn't matter)_ and simply apply own components and/or rules to render components. Below an example with `connectField`. diff --git a/docs/faq.md b/docs/faq.md index 5a879458e..70b7ec94a 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -9,7 +9,7 @@ You can style your form fields simply by passing a `className` property. ### How can I create custom fields? -You can create a custom field by wrapping your component inside the [`connectField`](api-helpers#connectfieldcomponent-options). +You can create a custom field by wrapping your component inside the [`connectField`](/docs/api-helpers#connectfieldcomponent-options). The `connectField` will pass various props related to the form management, such as `onChange()` function, current field's value, errors and so on, to your component. diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index aff6fe42b..e8c29d80e 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -91,4 +91,7 @@ module.exports = { }, ], ], + onBrokenLinks: 'throw', + onBrokenMarkdownLinks: 'throw', + onDuplicateRoutes: 'throw', };