diff --git a/.prettierrc b/.prettierrc
index f8d45edb52..8d0df3d705 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -1,5 +1,6 @@
{
"printWidth": 100,
"singleQuote": true,
- "useTabs": true
+ "useTabs": true,
+ "proseWrap": "always"
}
diff --git a/docs/concepts/activity-and-versions.md b/docs/concepts/activity-and-versions.md
index 15c8fb1084..fc6741df7a 100644
--- a/docs/concepts/activity-and-versions.md
+++ b/docs/concepts/activity-and-versions.md
@@ -1,10 +1,15 @@
# Activity & Versions
-> Directus stores detailed records of all changes made to data through the App and API. This gives a comprehensive accountability log of who did what, and when. This also powers the Directus versioning system, which allows storing alternate versions/revisions of items.
+> Directus stores detailed records of all changes made to data through the App and API. This gives a
+> comprehensive accountability log of who did what, and when. This also powers the Directus
+> versioning system, which allows storing alternate versions/revisions of items.
## Activity
-This is a log of all events that have occured within the project. Activity can be accessed in two ways, via the main [Activity Module](/concepts/app-overview#actvity-history), or within the sidebar of individual [Item Detail](/concepts/app-overview#item-detail) pages. The following information is stored for each event's activity item:
+This is a log of all events that have occured within the project. Activity can be accessed in two
+ways, via the main [Activity Module](/concepts/app-overview#actvity-history), or within the sidebar
+of individual [Item Detail](/concepts/app-overview#item-detail) pages. The following information is
+stored for each event's activity item:
- Action
- User
@@ -15,28 +20,31 @@ This is a log of all events that have occured within the project. Activity can b
- Item
- Comment (when applicable)
-::: tip Readonly
-For proper accountability, activity records are readonly. Administrators should avoid changing, deleting, or truncating this data.
-:::
+::: tip Readonly For proper accountability, activity records are readonly. Administrators should
+avoid changing, deleting, or truncating this data. :::
-::: warning External Events
-Directus can only track events that pass through the platform's middleware. Changes made directly to the database, or by other external means, are not included in the activity log.
-:::
+::: warning External Events Directus can only track events that pass through the platform's
+middleware. Changes made directly to the database, or by other external means, are not included in
+the activity log. :::
## Versions
-Every change made to items in Directus are also stored as a versioned snapshot. This additional data is also linked to the specific Activity event which created it. Below are the two key pieces of information stored for each version:
+Every change made to items in Directus are also stored as a versioned snapshot. This additional data
+is also linked to the specific Activity event which created it. Below are the two key pieces of
+information stored for each version:
- Data — A full snapshot of the item _after_ the event
- Delta — The specific field data changed by this event
-::: tip Customizing Version Data
-Since versions store a full data snapshot and delta, the `directus_revisions` collection can quickly grow quite large, increasing database size and potentially decreasing performance. To remedy this, Directus allows [configuring version scope](/concepts/app-overview) per collection to set the exact field data saved.
-:::
+::: tip Customizing Version Data Since versions store a full data snapshot and delta, the
+`directus_revisions` collection can quickly grow quite large, increasing database size and
+potentially decreasing performance. To remedy this, Directus allows
+[configuring version scope](/concepts/app-overview) per collection to set the exact field data
+saved. :::
-::: tip Creating Detached Versions
-You can also create a new version for an item without saving the data to the parent item itself. This allows you to "stage" changes to an item that may already be live/published.
-:::
+::: tip Creating Detached Versions You can also create a new version for an item without saving the
+data to the parent item itself. This allows you to "stage" changes to an item that may already be
+live/published. :::
### Relevant Guides
diff --git a/docs/concepts/app-extensions.md b/docs/concepts/app-extensions.md
index 9f98edca26..407508acbe 100644
--- a/docs/concepts/app-extensions.md
+++ b/docs/concepts/app-extensions.md
@@ -1,10 +1,14 @@
# App Components
-> Directus has been architected as completely modular and extensible. There are four keystone component types within the App. Out-of-the-box components are configurable, or altogether new components can be created as extensions.
+> Directus has been architected as completely modular and extensible. There are four keystone
+> component types within the App. Out-of-the-box components are configurable, or altogether new
+> components can be created as extensions.
## Modules
-Modules are the highest and broadest level of organization within the App. All core functionality within the App (other than authentication and activity) can be bucketed into one of the following five modules:
+Modules are the highest and broadest level of organization within the App. All core functionality
+within the App (other than authentication and activity) can be bucketed into one of the following
+five modules:
- Collections — The primary way to view and interact with database content
- User Directory — A dedicated section for the platform's system Users
@@ -12,7 +16,9 @@ Modules are the highest and broadest level of organization within the App. All c
- Documentation — A tailored, in-app portal for the platform's concepts, guides, and reference
- Settings — An Admin-Only section for configuring the project and system settings
-In addition to these core modules, custom modules offer a _blank canvas_ for creating altogether new/different experiences within the App, such as proprietary dashboards, compound datasets, or third-party integrations (eg: a Stripe Payments Console).
+In addition to these core modules, custom modules offer a _blank canvas_ for creating altogether
+new/different experiences within the App, such as proprietary dashboards, compound datasets, or
+third-party integrations (eg: a Stripe Payments Console).
### Relevant Guides
@@ -20,11 +26,15 @@ In addition to these core modules, custom modules offer a _blank canvas_ for cre
## Layouts
-Layouts provide different ways for presenting, browsing, visualizing, or even managing sets of data. Most commonly shown on Collection Detail pages and contextual modals for item selection. Directus includes several Layout options out-of-the-box, each with different features and configuration options.
+Layouts provide different ways for presenting, browsing, visualizing, or even managing sets of data.
+Most commonly shown on Collection Detail pages and contextual modals for item selection. Directus
+includes several Layout options out-of-the-box, each with different features and configuration
+options.
### Table
-This tabular layout supports all forms of data, and is therefore the default within the Collections module. It includes the following features/options:
+This tabular layout supports all forms of data, and is therefore the default within the Collections
+module. It includes the following features/options:
- Toggle & Reorder Field Columns (Option)
- Row Spacing (Option)
@@ -35,7 +45,9 @@ This tabular layout supports all forms of data, and is therefore the default wit
### Cards
-This tiled layout is ideal for collections that prioritize an image. It is the default for both the [User Directory](/guides/users) (shows the avatar) and [File Library](/guides/files) (shows asset thumbnail). It includes the following features/options:
+This tiled layout is ideal for collections that prioritize an image. It is the default for both the
+[User Directory](/guides/users) (shows the avatar) and [File Library](/guides/files) (shows asset
+thumbnail). It includes the following features/options:
- Image Source (Option)
- Title (Option)
@@ -60,12 +72,19 @@ In addition to these core layouts, custom layouts allow for creating more tailor
## Interfaces
-Interfaces provide a multitude of ways to view or interact with field data on [Item Detail](/concepts/app-overview#item-detail) page forms. Every interface supports a specific subset of field [types](/reference/field-types) (eg: String), which determines how the data will be stored. For example, the _Text Input_ interface can manage most types of data, but might not be ideal for dates, where a _Calendar_ interface excels. Directus includes many Interfaces out-of-the-box:
+Interfaces provide a multitude of ways to view or interact with field data on
+[Item Detail](/concepts/app-overview#item-detail) page forms. Every interface supports a specific
+subset of field [types](/reference/field-types) (eg: String), which determines how the data will be
+stored. For example, the _Text Input_ interface can manage most types of data, but might not be
+ideal for dates, where a _Calendar_ interface excels. Directus includes many Interfaces
+out-of-the-box:
- Text Input
- @TODO List all core interfaces, or link to a exhaustive reference?
-In addition to these core interfaces, custom interfaces allow for creating more tailored or proprietary ways to view or manage field data, such as bespoke layout builders, skeuomorphic knobs, or relational views for third-party data (eg: Stripe Credit Card UI).
+In addition to these core interfaces, custom interfaces allow for creating more tailored or
+proprietary ways to view or manage field data, such as bespoke layout builders, skeuomorphic knobs,
+or relational views for third-party data (eg: Stripe Credit Card UI).
### Relevant Guides
@@ -73,13 +92,19 @@ In addition to these core interfaces, custom interfaces allow for creating more
## Displays
-Displays are the smaller, read-only counterpart to Interfaces, defining how a field's data will be displayed inline on [Item Detail](/concepts/app-overview#item-detail) pages, Modals, and even within Interfaces themselves. For example, you may have a "Status" field that uses a _Dropdown_ Interface on the Item Detail page, and a _Color Dot_ Display when the field is referenced throughout the rest of the App. Directus includes many Displays out-of-the-box:
+Displays are the smaller, read-only counterpart to Interfaces, defining how a field's data will be
+displayed inline on [Item Detail](/concepts/app-overview#item-detail) pages, Modals, and even within
+Interfaces themselves. For example, you may have a "Status" field that uses a _Dropdown_ Interface
+on the Item Detail page, and a _Color Dot_ Display when the field is referenced throughout the rest
+of the App. Directus includes many Displays out-of-the-box:
- Raw
- Formatted Value
- @TODO List all core interfaces, or link to a exhaustive reference?
-In addition to these core displays, custom displays allow for creating customized ways to view or represent field data, such as progress indicators, relational data tooltips, or specific formatting options.
+In addition to these core displays, custom displays allow for creating customized ways to view or
+represent field data, such as progress indicators, relational data tooltips, or specific formatting
+options.
### Relevant Guides
@@ -87,7 +112,12 @@ In addition to these core displays, custom displays allow for creating customize
## Title Formatter
-Directus uses [Database Mirroring](/concepts/platform-overview) to create its underlying data model based on your custom schema. Therefore the App needs a reliable way of converting any raw table name, field name, or other technical value into a prettified format that is human-readable. At its core, the Title Formatter converts any string into title-case with proper whitespace. It also covers acronyms, initialisms, common proper nouns, so each is output properly. Some example conversion include:
+Directus uses [Database Mirroring](/concepts/platform-overview) to create its underlying data model
+based on your custom schema. Therefore the App needs a reliable way of converting any raw table
+name, field name, or other technical value into a prettified format that is human-readable. At its
+core, the Title Formatter converts any string into title-case with proper whitespace. It also covers
+acronyms, initialisms, common proper nouns, so each is output properly. Some example conversion
+include:
| Original String | Formatted Title |
| ---------------------------- | --------------------------------- |
diff --git a/docs/concepts/app-overview.md b/docs/concepts/app-overview.md
index 76cb859ec3..a96419109c 100644
--- a/docs/concepts/app-overview.md
+++ b/docs/concepts/app-overview.md
@@ -1,6 +1,8 @@
# App Overview
-> The Directus App is the presentation layer for your data, content, and assets. It uses a left-to-right visual hierarchy for organization and navigation. Below we cover the App's global elements and individual pages.
+> The Directus App is the presentation layer for your data, content, and assets. It uses a
+> left-to-right visual hierarchy for organization and navigation. Below we cover the App's global
+> elements and individual pages.
## Global Elements
@@ -9,20 +11,29 @@
### 1. Module Bar
-- **Project Logo** — Displays your configured project logo and project color (defaults to the Directus logo and color). If configured, clicking this component will navigate to the Project URL. During platform activity, an indeterminate progress indicator will also be shown here.
-- **Modules** — Any available modules are listed below the project logo. These may be turned off or reordered based on your [role's configuration](/concepts/users-roles-and-permissions), but by default this includes:
+- **Project Logo** — Displays your configured project logo and project color (defaults to the
+ Directus logo and color). If configured, clicking this component will navigate to the Project
+ URL. During platform activity, an indeterminate progress indicator will also be shown here.
+- **Modules** — Any available modules are listed below the project logo. These may be turned off
+ or reordered based on your [role's configuration](/concepts/users-roles-and-permissions), but by
+ default this includes:
- [Collections](/concepts/app-overview)
- [User Directory](/concepts/app-overview)
- [File Library](/concepts/app-overview)
- [Documentation](/concepts/app-overview)
- [Settings](/concepts/app-overview) — Admin only
- [Custom Modules](/guides/extensions/modules) — If configured
-- **Current User Menu** — This component displays the authenticated user's name and avatar. Hovering over this menu exposes the Log Out button.
+- **Current User Menu** — This component displays the authenticated user's name and avatar.
+ Hovering over this menu exposes the Log Out button.
### 2. Navigation Bar
-- **Project Name** — Shows the name of your current project (see [Project Settings](/guides/white-labeling)), as well as the quality of your project's API connection.
-- **Navigation** — This is a dynamic navigation based on your current module. Some modules also support [Presets and/or Bookmarks](/guides/roles-and-permissions), which are ways to link to more specific data-sets.
+- **Project Name** — Shows the name of your current project (see
+ [Project Settings](/guides/white-labeling)), as well as the quality of your project's API
+ connection.
+- **Navigation** — This is a dynamic navigation based on your current module. Some modules also
+ support [Presets and/or Bookmarks](/guides/roles-and-permissions), which are ways to link to
+ more specific data-sets.
### 3. Page
@@ -30,25 +41,35 @@
- Page Icon — Clicking this navigates back to the previous page
- Module Title — Clicking this navigates to the parent module/section
- Page Title — Displays the current page's title
- - Action Buttons — On the right-side of the header are contextual buttons for specific page actions. Please note that some primary action buttons have a "..." icon beside them that provides additional options when clicked.
+ - Action Buttons — On the right-side of the header are contextual buttons for specific page
+ actions. Please note that some primary action buttons have a "..." icon beside them that
+ provides additional options when clicked.
- **Page Content** — This displays the content of the page you navigated to.
### 4. Page Sidebar
-- **Page Components** — Lists any contextual page components available. The "Info" component is available on every page, explaining the page's general purpose and relevant details. Clicking any sidebar component will accordion it open. If the App window is large enough, the sidebar will automatically open, and can be closed by clicking the "X" in the top-right.
-- **Notifications Tray** — Fixed to the bottom of the page sidebar, this button opens a tray of recent user notifications, and provides a link to the [Activity History](/concepts/app-overview) page.
+- **Page Components** — Lists any contextual page components available. The "Info" component is
+ available on every page, explaining the page's general purpose and relevant details. Clicking
+ any sidebar component will accordion it open. If the App window is large enough, the sidebar
+ will automatically open, and can be closed by clicking the "X" in the top-right.
+- **Notifications Tray** — Fixed to the bottom of the page sidebar, this button opens a tray of
+ recent user notifications, and provides a link to the [Activity History](/concepts/app-overview)
+ page.
## Collections
-This module is the primary way for interacting with your database content. Here you can access your collections, browse their items, and navigate to individual item forms.
+This module is the primary way for interacting with your database content. Here you can access your
+collections, browse their items, and navigate to individual item forms.
### Collection Listing
-A page that lists the collections available to the current user. This is the landing page of the module, and effectively the same as its navigation listing.
+A page that lists the collections available to the current user. This is the landing page of the
+module, and effectively the same as its navigation listing.
### Collection Detail
-Provides a configurable layout to browse or visualize items within a given collection. Like other browse pages, there are many available features, including:
+Provides a configurable layout to browse or visualize items within a given collection. Like other
+browse pages, there are many available features, including:
- [Creating Items](/guides/items#creating-items)
- [Browsing Items](/guides/items#browsing-items)
@@ -62,7 +83,9 @@ Provides a configurable layout to browse or visualize items within a given colle
### Item Detail
-Most layouts on the browse page support navigating to individual item detail pages, where you a presented with a [customizable form](/guides/fields#adjusting-fields-layout) for viewing/editing the item's content. Like other detail pages, there are many available features, including:
+Most layouts on the browse page support navigating to individual item detail pages, where you a
+presented with a [customizable form](/guides/fields#adjusting-fields-layout) for viewing/editing the
+item's content. Like other detail pages, there are many available features, including:
- [Updating an Item](/guides/items#updating-item)
- [Reverting an Item](/guides/items#reverting-item)
@@ -71,11 +94,15 @@ Most layouts on the browse page support navigating to individual item detail pag
## User Directory
-A module includes a comprehensive listing of all system users within your project. This page has the same features and configuration as [Collection Detail](/concepts/app-overview).
+A module includes a comprehensive listing of all system users within your project. This page has the
+same features and configuration as [Collection Detail](/concepts/app-overview).
### User Detail
-Similar to other [Item Detail](/concepts/app-overview) pages, this page provides a custom form for viewing system users. This is also used for editing the "Profile Page" of the current user, which is accessible from the [User Menu](/concepts/app-overview). Directus ships with a full-featured user system, with the following fields:
+Similar to other [Item Detail](/concepts/app-overview) pages, this page provides a custom form for
+viewing system users. This is also used for editing the "Profile Page" of the current user, which is
+accessible from the [User Menu](/concepts/app-overview). Directus ships with a full-featured user
+system, with the following fields:
- **First Name** — The user's given name
- **Last Name** — The user's family name
@@ -100,20 +127,23 @@ The sidebar's info component also includes the following readonly details:
- **Last Access** — The timestamp of the user's last App or API action
- **Last Page** — The last App page accessed by the user
-::: tip Extending Users
-While the fields included out-of-the-box are locked from schema changes, you can extend Directus Users to include
-additional proprietary fields within [Settings > Data Model](/concepts/data-model).
-:::
+::: tip Extending Users While the fields included out-of-the-box are locked from schema changes, you
+can extend Directus Users to include additional proprietary fields within
+[Settings > Data Model](/concepts/data-model). :::
## File Library
-This module aggregates all files within the project into one consolidated library. This page has the same features and configuration as [Collection Detail](/concepts/app-overview).
+This module aggregates all files within the project into one consolidated library. This page has the
+same features and configuration as [Collection Detail](/concepts/app-overview).
### File Detail
-Similar to other [Item Detail](/concepts/app-overview) pages, this page provides a custom form for viewing assets and embeds. Directus ships with a full-featured system for digital asset management, with the following fields:
+Similar to other [Item Detail](/concepts/app-overview) pages, this page provides a custom form for
+viewing assets and embeds. Directus ships with a full-featured system for digital asset management,
+with the following fields:
-- **Title** — Pulled from the file metadata if available, falls back to a formatted version of the filename
+- **Title** — Pulled from the file metadata if available, falls back to a formatted version of the
+ filename
- **Description** — Pulled from the file metadata if available
- **Tags** — Pulled from the file metadata if available
- **Location** — Pulled from the file metadata if available
@@ -131,30 +161,39 @@ The sidebar's info component also includes the following readonly details:
- **Folder** — The current parent folder that contains the file
- **Metadata** — Metadata JSON dump of the file's EXIF, IPTC, and ICC information
-::: tip Extending Files
-While the fields included out-of-the-box are locked from schema changes, you can extend Directus Files to include additional proprietary fields within [Settings > Data Model](/concepts/data-model).
-:::
+::: tip Extending Files While the fields included out-of-the-box are locked from schema changes, you
+can extend Directus Files to include additional proprietary fields within
+[Settings > Data Model](/concepts/data-model). :::
## Documentation
-This module is an internal set of guides, concepts, and reference docs for your project's specific version of Directus. It also includes a dynamic [API Reference](/reference/api/introduction) that is dynamically tailored to your custom schema. The docs are organized into four distinct sections:
+This module is an internal set of guides, concepts, and reference docs for your project's specific
+version of Directus. It also includes a dynamic [API Reference](/reference/api/introduction) that is
+dynamically tailored to your custom schema. The docs are organized into four distinct sections:
-- [Getting Started](/getting-started/introduction)\*\* — Novice Oriented. For a platform intro and installation.
+- [Getting Started](/getting-started/introduction)\*\* — Novice Oriented. For a platform intro and
+ installation.
- [Concepts](/concepts/app-overview)\*\* — Learning Oriented. For understanding the platform.
-- [Guides](/concepts/roles-and-permissions)\*\* — Problem Oriented. Follow along with steps while working.
-- [Reference](/reference/api/introduction)\*\* — Information Oriented. Look up info and specs while working.
+- [Guides](/concepts/roles-and-permissions)\*\* — Problem Oriented. Follow along with steps while
+ working.
+- [Reference](/reference/api/introduction)\*\* — Information Oriented. Look up info and specs
+ while working.
-::: tip Updating the Docs
-Our docs are written in markdown (with some additional VuePress styling like this hint box), and available for editing/fixing via [GitHub](https://github.com/directus/directus).
-:::
+::: tip Updating the Docs Our docs are written in markdown (with some additional VuePress styling
+like this hint box), and available for editing/fixing via
+[GitHub](https://github.com/directus/directus). :::
## Activity History
-This module provides a collective timeline of all actions taken within the project. This is a great way to audit user activity or enforce accountability. This is the only system module that is not in the module bar by default — instead being located within the notifications tray of the page sidebar. This page has the same features and configuration as [Collection Detail](/concepts/app-overview).
+This module provides a collective timeline of all actions taken within the project. This is a great
+way to audit user activity or enforce accountability. This is the only system module that is not in
+the module bar by default — instead being located within the notifications tray of the page sidebar.
+This page has the same features and configuration as [Collection Detail](/concepts/app-overview).
### Activity Detail
-Unlike other item detail pages, activity items are **readonly** (for proper accountability) and open in a modal window with the following fields:
+Unlike other item detail pages, activity items are **readonly** (for proper accountability) and open
+in a modal window with the following fields:
- **User** — The Directus user that performed the action
- **Action** — The specific action taken, eg: Create, Update, Delete, Authenticate, etc
@@ -166,7 +205,9 @@ Unlike other item detail pages, activity items are **readonly** (for proper acco
# Settings
-This module is only available to users within [admin roles](/concepts/users-roles-and-permissions#administrators-role). This is where your project is configured, and the first place to go after installation. It includes the following sections:
+This module is only available to users within
+[admin roles](/concepts/users-roles-and-permissions#administrators-role). This is where your project
+is configured, and the first place to go after installation. It includes the following sections:
- [Project Settings](/concepts/platform-overview)
- [Data Model](/concepts/data-model)
diff --git a/docs/concepts/files-and-thumbnails.md b/docs/concepts/files-and-thumbnails.md
index c6e96afb66..f81dbd0333 100644
--- a/docs/concepts/files-and-thumbnails.md
+++ b/docs/concepts/files-and-thumbnails.md
@@ -1,10 +1,13 @@
# Files & Thumbnails
-> Directus offers a full Digital Asset Management (DAM) system. This includes multiple storage adapters, nested folder organization, private file access, image editing, and on-demand thumbnail generation.
+> Directus offers a full Digital Asset Management (DAM) system. This includes multiple storage
+> adapters, nested folder organization, private file access, image editing, and on-demand thumbnail
+> generation.
## Storage Adapters
-Storage adapters allow project files to be stored in different locations or services. By default, Directus includes the following adapters:
+Storage adapters allow project files to be stored in different locations or services. By default,
+Directus includes the following adapters:
- **Local Filesystem** — The default, any filesystem location or network-attached storage
- **S3 or Equivalent** — Including AWS S3, DigitalOcean Spaces, Alibaba OSS, and others
@@ -12,7 +15,10 @@ Storage adapters allow project files to be stored in different locations or serv
## Files
-Directus allows you to manage all your files in one place, including documents, images, videos, and more. Files can be uploaded to the [File Library](/concepts/app-overview#file-library) in general, or directly to an item via a [Single File](/guides/field-types/single-file) or [Multiple Files](/guides/field-types/multiple-files) field.
+Directus allows you to manage all your files in one place, including documents, images, videos, and
+more. Files can be uploaded to the [File Library](/concepts/app-overview#file-library) in general,
+or directly to an item via a [Single File](/guides/field-types/single-file) or
+[Multiple Files](/guides/field-types/multiple-files) field.
### Relevant Guides
@@ -21,13 +27,20 @@ Directus allows you to manage all your files in one place, including documents,
## Embedded Assets
-Directus also supports ingesting third-party embedded assets, such as YouTube or Vimeo videos. These are managed the same as normal files, however the resource itself is stored on the external service, and referenced via its proprietary UID.
+Directus also supports ingesting third-party embedded assets, such as YouTube or Vimeo videos. These
+are managed the same as normal files, however the resource itself is stored on the external service,
+and referenced via its proprietary UID.
## Crop & Transform Images
-Our file middleware also allows for cropping and transforming image assets on the fly. This means you can simply request an image, include any desired transformation parameters, and you'll be served the new asset as a response. This is very useful for automatically generating many different thumbnails/versions of an original file.
+Our file middleware also allows for cropping and transforming image assets on the fly. This means
+you can simply request an image, include any desired transformation parameters, and you'll be served
+the new asset as a response. This is very useful for automatically generating many different
+thumbnails/versions of an original file.
-To impede malicious users from consuming your storage by requesting a multitude of random sizes, Directus includes a [Asset Allow-List](/guides/files#creating-thumbnail-presets) to limit what transformations are possible.
+To impede malicious users from consuming your storage by requesting a multitude of random sizes,
+Directus includes a [Asset Allow-List](/guides/files#creating-thumbnail-presets) to limit what
+transformations are possible.
### Relevant Guides
diff --git a/docs/concepts/internationalization.md b/docs/concepts/internationalization.md
index c60ea13c7d..6e09f0d68a 100644
--- a/docs/concepts/internationalization.md
+++ b/docs/concepts/internationalization.md
@@ -1,23 +1,32 @@
# Internationalization
-> Directus is maintained by people all over the world. Not only does Directus allow you to author and manage multilingual content, the App itself also supports multiple languages and locales.
+> Directus is maintained by people all over the world. Not only does Directus allow you to author
+> and manage multilingual content, the App itself also supports multiple languages and locales.
## App Translations
-Directus supports internationalization across its entire Admin App. Many languages are currently supported, with more are being added all the time. Help the communtiy by adding or refining your language through our [CrowdIn](https://locales.directus.io/) integration.
+Directus supports internationalization across its entire Admin App. Many languages are currently
+supported, with more are being added all the time. Help the communtiy by adding or refining your
+language through our [CrowdIn](https://locales.directus.io/) integration.
## Schema Translations
-Directus uses [database mirroring](#) to dynamically pull in your schema's tables and columns, however this only covers one language. Therefore our platform supports schema translations for these names, allowing you to properly support different languages for your Collection and Field names.
+Directus uses [database mirroring](#) to dynamically pull in your schema's tables and columns,
+however this only covers one language. Therefore our platform supports schema translations for these
+names, allowing you to properly support different languages for your Collection and Field names.
-::: tip Overriding Technical Names
-If your project requires more _technical_ table/column names (eg: `cust` or `f_name`), you can also use schema translations to override those defaults (eg: `Customers` or `First Name`) in the primary language.
-:::
+::: tip Overriding Technical Names If your project requires more _technical_ table/column names (eg:
+`cust` or `f_name`), you can also use schema translations to override those defaults (eg:
+`Customers` or `First Name`) in the primary language. :::
## Content Translations
-One of the most important features in Directus is the ability to author and manage multilingual content. While you can accomplish this by creating _standard_ fields in the parent collection for each language, it is more extensible to use our relational translation fields to dynamically manage content in as many languages as is required. Mixing standard and translated fields also allows language-agnostic data (such as dates or toggles) to remain within the parent collection.
+One of the most important features in Directus is the ability to author and manage multilingual
+content. While you can accomplish this by creating _standard_ fields in the parent collection for
+each language, it is more extensible to use our relational translation fields to dynamically manage
+content in as many languages as is required. Mixing standard and translated fields also allows
+language-agnostic data (such as dates or toggles) to remain within the parent collection.
-::: tip Custom Interfaces
-For more advanced use-cases, such as connecting to a third-party translation service, you can read our extension guide on [creating a custom interface](/guides/extensions/interfaces).
-:::
+::: tip Custom Interfaces For more advanced use-cases, such as connecting to a third-party
+translation service, you can read our extension guide on
+[creating a custom interface](/guides/extensions/interfaces). :::
diff --git a/docs/concepts/platform-overview.md b/docs/concepts/platform-overview.md
index 730f8557e4..9f46293a94 100644
--- a/docs/concepts/platform-overview.md
+++ b/docs/concepts/platform-overview.md
@@ -1,10 +1,14 @@
# Platform Overview
-> The Directus platform is primarily comprised of an API and App, working in concert to manage the content of your SQL database.
+> The Directus platform is primarily comprised of an API and App, working in concert to manage the
+> content of your SQL database.
## Database Mirroring
-Instead of using a predefined "one-size-fits-all" data model to store your content, Directus "mirrors" your actual SQL database in real-time. The principle is akin to a database client (eg: _phpMyAdmin_), but includes far mor advanced tools, and is safe and intuitive enough for non-technical users. This approach has many unique advantages:
+Instead of using a predefined "one-size-fits-all" data model to store your content, Directus
+"mirrors" your actual SQL database in real-time. The principle is akin to a database client (eg:
+_phpMyAdmin_), but includes far mor advanced tools, and is safe and intuitive enough for
+non-technical users. This approach has many unique advantages:
- A custom SQL database schema, tailored to your exact requirements
- Significant performance improvements through optimizations and indexing
@@ -14,7 +18,10 @@ Instead of using a predefined "one-size-fits-all" data model to store your conte
## Directus API
-The Directus API uses _Database Mirroring_ to dynamically generate REST endpoints and a GraphQL schema based on the connected database's architecture. It is written in [Node.js](https://nodejs.org) and uses database abstraction to support most [SQL database vendors](/guides/installation#databases).
+The Directus API uses _Database Mirroring_ to dynamically generate REST endpoints and a GraphQL
+schema based on the connected database's architecture. It is written in
+[Node.js](https://nodejs.org) and uses database abstraction to support most
+[SQL database vendors](/guides/installation#databases).
### Relevant Docs
@@ -23,7 +30,9 @@ The Directus API uses _Database Mirroring_ to dynamically generate REST endpoint
## Directus App
-The Directus App is decoupled from, and powered by, the Directus API. It provides a way for both technical admins and non-technical users to view and manage content of the connected database. It is written in [Vue.js](https://vuejs.org) v3, is completely modular, and is highly customizable.
+The Directus App is decoupled from, and powered by, the Directus API. It provides a way for both
+technical admins and non-technical users to view and manage content of the connected database. It is
+written in [Vue.js](https://vuejs.org) v3, is completely modular, and is highly customizable.
### Relevant Docs
@@ -32,7 +41,10 @@ The Directus App is decoupled from, and powered by, the Directus API. It provide
## Projects & Environments
-A Project is a complete instance of Directus. Each project primarily represents a database, but also includes a configuration file and any related asset storage. This modular approach means you can also create different environments (eg: Dev, Staging, Prod) by simply creating additional project instances.
+A Project is a complete instance of Directus. Each project primarily represents a database, but also
+includes a configuration file and any related asset storage. This modular approach means you can
+also create different environments (eg: Dev, Staging, Prod) by simply creating additional project
+instances.
+
## Backing-up a Project
@@ -45,6 +47,6 @@ All project configuration is handled by the `.env` file within the `/api` direct
4. **Delete the project's root directory** from the server
5. **Delete all Directus system tables** (`directus_*`) from the database
-::: Pure SQL
-After completing this process, you will be left with a pure SQL database, with no trace that Directus was ever installed. Any external services connecting to your database's project tables directly (eg: SQL queries) should continue working normally.
-:::
+::: Pure SQL After completing this process, you will be left with a pure SQL database, with no trace
+that Directus was ever installed. Any external services connecting to your database's project tables
+directly (eg: SQL queries) should continue working normally. :::
diff --git a/docs/guides/roles-and-permissions.md b/docs/guides/roles-and-permissions.md
index 625e0fd603..ef298662bb 100644
--- a/docs/guides/roles-and-permissions.md
+++ b/docs/guides/roles-and-permissions.md
@@ -1,6 +1,7 @@
# Roles & Permissions
-> During installation, Directus automatically includes an initial "Admin" role with complete project access. After that, you are free to extend and customize these as much as is needed.
+> During installation, Directus automatically includes an initial "Admin" role with complete project
+> access. After that, you are free to extend and customize these as much as is needed.
## Creating a Role
@@ -12,21 +13,26 @@
## Configuring a Role
-* **Permissions** — Defines the role's access permissions, see [Configuring Role Permissions](#) and [Configuring System Permissions](#)
-* **Role Name** — This is the name of the role
-* **Role Icon** — The icon used throughout the App when referencing this role
-* **Description** — A helpful note that explains the role's purpose
-* **App Access** — Allows logging in to the App
-* **Admin Access** — Gives full permission to project data and Settings
-* **IP Access** — An allow-list of IP addresses from which the platform can be accessed, empty allows all
-* **Require 2FA** — Forces all users within this role to use two-factor authentication
-* **Users in Role** — A list of all users within this role
-* **Module Navigation** — Overrides the visible modules, see [Customizing the Module Navigation](#)
-* **Collection Navigation** — Overrides the collection module's navigation, see [Customizing the Collection Navigation](#)
+- **Permissions** — Defines the role's access permissions, see [Configuring Role Permissions](#)
+ and [Configuring System Permissions](#)
+- **Role Name** — This is the name of the role
+- **Role Icon** — The icon used throughout the App when referencing this role
+- **Description** — A helpful note that explains the role's purpose
+- **App Access** — Allows logging in to the App
+- **Admin Access** — Gives full permission to project data and Settings
+- **IP Access** — An allow-list of IP addresses from which the platform can be accessed, empty
+ allows all
+- **Require 2FA** — Forces all users within this role to use two-factor authentication
+- **Users in Role** — A list of all users within this role
+- **Module Navigation** — Overrides the visible modules, see
+ [Customizing the Module Navigation](#)
+- **Collection Navigation** — Overrides the collection module's navigation, see
+ [Customizing the Collection Navigation](#)
### Customizing the Module Navigation
-The options in the [Module Bar](#) can be overridden with custom options per role. When this setting is empty, the default modules are used.
+The options in the [Module Bar](#) can be overridden with custom options per role. When this setting
+is empty, the default modules are used.
1. Navigate to **Settings > Roles & Permissions > [Role Name]**
2. Scroll to the **Module Navigation** field
@@ -36,7 +42,8 @@ The options in the [Module Bar](#) can be overridden with custom options per rol
6. Enter a relative (App) or absolute (external) **link** for the module
7. Use the drag handles to **drag-and-drop** the modules into the desired order
-If you are looking to replicate the default modules, paste the following configuration into the Module Navigation field using the [Raw Value](#) field label option.
+If you are looking to replicate the default modules, paste the following configuration into the
+Module Navigation field using the [Raw Value](#) field label option.
```json
[
@@ -63,78 +70,93 @@ If you are looking to replicate the default modules, paste the following configu
]
```
-:::warning Settings Module
-The settings module is not controlled by this configuration. It is always added to the end of the list for any user's with Admin Access.
-:::
+:::warning Settings Module The settings module is not controlled by this configuration. It is always
+added to the end of the list for any user's with Admin Access. :::
-::: Customizing Existing Modules
-You can enter the link to an existing module to customize its name or icon. For example, you can use `/collections` to override the Collections module.
-:::
+::: Customizing Existing Modules You can enter the link to an existing module to customize its name
+or icon. For example, you can use `/collections` to override the Collections module. :::
### Customizing the Collection Navigation
-The collections in the [Navigation Bar](#) can be overridden with custom options per role. When this setting is empty, all collections that the user has permission to see are shown alphabetically in a single, unlabeled group.
+The collections in the [Navigation Bar](#) can be overridden with custom options per role. When this
+setting is empty, all collections that the user has permission to see are shown alphabetically in a
+single, unlabeled group.
1. Navigate to **Settings > Roles & Permissions > [Role Name]**
2. Scroll to the **Collection Navigation** field
3. Click the **Add New Group** button to add a Grouping
4. Enter a **Group Name**, or leave it empty to simply show a divider
5. Choose if the group's **Accordion** will be...
- * Always Open (Default)
- * Start Open
- * Start Collapsed
+ - Always Open (Default)
+ - Start Open
+ - Start Collapsed
6. Click the **Add New Collection** button to add a Collection
7. Choose a **Collection** from the dropdown
8. Use the drag handles to **drag-and-drop** the groups/collections into the desired order
## Configuring Role Permissions
-Directus possesses an extremely granular, yet easy to configure, permissions system. When creating a new role, permissions are disabled for all project collections by default — allowing you to give explicit access to only what is required. Individual permissions are applied to the role, and each is scoped to a specific collection and CRUD action (create, read, update, delete).
+Directus possesses an extremely granular, yet easy to configure, permissions system. When creating a
+new role, permissions are disabled for all project collections by default — allowing you to give
+explicit access to only what is required. Individual permissions are applied to the role, and each
+is scoped to a specific collection and CRUD action (create, read, update, delete).
-:::warning Saves Automatically
-Every change made to the permissions of a role is saved automatically and instantly.
-:::
+:::warning Saves Automatically Every change made to the permissions of a role is saved automatically
+and instantly. :::
-:::warning Admin Roles
-If a role is set to **Admin Access** then it is granted complete access to the platoform, and therefore the permission configuration field is disabled.
-:::
+:::warning Admin Roles If a role is set to **Admin Access** then it is granted complete access to
+the platoform, and therefore the permission configuration field is disabled. :::
1. Navigate to **Settings > Roles & Permissions > [Role Name]**
2. Scroll to the **Permissions** section
3. **Click the icon** for the collection (row) and action (column) you want to set
4. Choose the desired permission level: **All Access**, **No Access**, or **Use Custom**
-If you selected _All Access_ or _No Access_ then setup is complete. If you chose to customize the permissions, then a modal will open with additional configuration options. Continue with the appropriate guide below based on the _action_ of the permission.
+If you selected _All Access_ or _No Access_ then setup is complete. If you chose to customize the
+permissions, then a modal will open with additional configuration options. Continue with the
+appropriate guide below based on the _action_ of the permission.
#### Create (Custom)
-5. **Field Permissions** control which fields accept a value on create. Fields are individually toggled.
-6. **Field Validation** define the rules for field values on create, as defined by the [Filter Rules](#) entered.
-7. **Field Presets** control the field defaults when creating an item, as defined by the [Item Object](#) entered.
+5. **Field Permissions** control which fields accept a value on create. Fields are individually
+ toggled.
+6. **Field Validation** define the rules for field values on create, as defined by the
+ [Filter Rules](#) entered.
+7. **Field Presets** control the field defaults when creating an item, as defined by the
+ [Item Object](#) entered.
#### Read (Custom)
-5. **Item Permissions** control which items can be read, as defined by the [Filter Rules](#) entered.
+5. **Item Permissions** control which items can be read, as defined by the [Filter Rules](#)
+ entered.
6. **Field Permissions** control which fields can be read. Fields are individually toggled.
#### Update (Custom)
-5. **Item Permissions** control which items can be updated, as defined by the [Filter Rules](#) entered.
+5. **Item Permissions** control which items can be updated, as defined by the [Filter Rules](#)
+ entered.
6. **Field Permissions** control which fields can be updated. Fields are individually toggled.
-7. **Field Validation** define the rules for field values on update, as defined by the [Filter Rules](#) entered.
-8. **Field Presets** control the field defaults when updating an item, as defined by the [Item Object](#) entered.
+7. **Field Validation** define the rules for field values on update, as defined by the
+ [Filter Rules](#) entered.
+8. **Field Presets** control the field defaults when updating an item, as defined by the
+ [Item Object](#) entered.
#### Delete (Custom)
-5. **Item Permissions** control which items can be deleted, as defined by the [Filter Rules](#) entered.
+5. **Item Permissions** control which items can be deleted, as defined by the [Filter Rules](#)
+ entered.
## Configuring System Permissions
-In addition to setting permissions for your project's collections, you can also tailor the permissions for system collections. It is important to note that when [App Access](#) is enabled for a role, Directus will automatically add permission for the neccesary system collections. To edit system permissions, simply click the "System Collections" toggle, and then edit permissions using the same steps as with project collections.
+In addition to setting permissions for your project's collections, you can also tailor the
+permissions for system collections. It is important to note that when [App Access](#) is enabled for
+a role, Directus will automatically add permission for the neccesary system collections. To edit
+system permissions, simply click the "System Collections" toggle, and then edit permissions using
+the same steps as with project collections.
-::: Resetting System Permissions
-To reset the role's system permissions for proper App access, expand the system collections and then click "Reset System Permissions" at the bottom of the listing.
-:::
+::: Resetting System Permissions To reset the role's system permissions for proper App access,
+expand the system collections and then click "Reset System Permissions" at the bottom of the
+listing. :::
## Deleting a Role
@@ -142,14 +164,12 @@ To reset the role's system permissions for proper App access, expand the system
2. Click the red **Delete Role** action button in the header
3. Confirm this decision by clicking **Delete** in the dialog
-:::warning Users in a Deleted Role
-If you delete a role that still has users in it, those users will be given a `NULL` role, which denies their App access and limits them to the [Public](#) permissions. They can then be reassigned to a new role by an admin.
-:::
+:::warning Users in a Deleted Role If you delete a role that still has users in it, those users will
+be given a `NULL` role, which denies their App access and limits them to the [Public](#)
+permissions. They can then be reassigned to a new role by an admin. :::
-:::warning Last Admin
-You must maintain at least one role/user with Admin Access so that you can still properly manage the project.
-:::
+:::warning Last Admin You must maintain at least one role/user with Admin Access so that you can
+still properly manage the project. :::
-:::warning Public Role
-You can not delete the Public role, as it is part of the core platform. To disable it completely, simply turn off all Public access permissions.
-:::
+:::warning Public Role You can not delete the Public role, as it is part of the core platform. To
+disable it completely, simply turn off all Public access permissions. :::
diff --git a/docs/guides/users.md b/docs/guides/users.md
index f0d2f63d35..f60cc9fb3a 100644
--- a/docs/guides/users.md
+++ b/docs/guides/users.md
@@ -1,6 +1,8 @@
# Users
-> You are prompted to enter the details of your first admin user during the installation process. After that, you are free to create as many users as you'd like. There is no limit to the number of users in a project.
+> You are prompted to enter the details of your first admin user during the installation process.
+> After that, you are free to create as many users as you'd like. There is no limit to the number of
+> users in a project.
## Creating a User
@@ -17,7 +19,8 @@
4. Enter **one or more email addresses**, separated by commas, in the modal
5. Click **Invite**
-At this point the invited user(s) will recieve an email with a link to the App where they set a password and enable their account.
+At this point the invited user(s) will recieve an email with a link to the App where they set a
+password and enable their account.
## Configuring a User
@@ -25,37 +28,33 @@ At this point the invited user(s) will recieve an email with a link to the App w
2. Click on the user you wish to manage
3. Complete any of the [User Fields](/concepts/app-overview.md#user-detail)
-::: User Preferences
-This section of the User Detail is only visible/editable by the current user, and admins.
-:::
+::: User Preferences This section of the User Detail is only visible/editable by the current user,
+and admins. :::
### Status
-* **Draft** — An incomplete user; no App/API access
-* **Invited** — Has a pending invite to the project; no App/API access until accepted
-* **Active** — The only status that has proper access to the App and API
-* **Suspended** — A user that has been temporarily disabled; no App/API access
-* **Archived** — A soft-deleted user; no App/API access
+- **Draft** — An incomplete user; no App/API access
+- **Invited** — Has a pending invite to the project; no App/API access until accepted
+- **Active** — The only status that has proper access to the App and API
+- **Suspended** — A user that has been temporarily disabled; no App/API access
+- **Archived** — A soft-deleted user; no App/API access
-:::warning Admin Only
-Only admins can adjust this field's value.
-:::
+:::warning Admin Only Only admins can adjust this field's value. :::
### Role
-Setting the user's role determines their access, permissions, and App presentation. You can adjust a user's role from the User Detail page, or from the _Users in Role_ field within **Settings > Roles & Permissions > [Role Name]**.
+Setting the user's role determines their access, permissions, and App presentation. You can adjust a
+user's role from the User Detail page, or from the _Users in Role_ field within **Settings > Roles &
+Permissions > [Role Name]**.
-:::warning Admin Only
-Only admins can adjust this field's value.
-:::
+:::warning Admin Only Only admins can adjust this field's value. :::
### Token
-A user's token is an alternate way to [authenticate into the API](#) using a static string. When NULL, the token is disabled. When enabled, ensure that a secure string is used.
+A user's token is an alternate way to [authenticate into the API](#) using a static string. When
+NULL, the token is disabled. When enabled, ensure that a secure string is used.
-:::warning Admin Only
-Only admins can adjust this field's value.
-:::
+:::warning Admin Only Only admins can adjust this field's value. :::
## Archiving a User
@@ -64,9 +63,8 @@ Only admins can adjust this field's value.
3. Click the orange **Archive User** action button in the header
4. Confirm this decision by clicking **Archive** in the dialog
-:::warning Disables Access
-Archiving uses _soft-delete_, therefore archived users are unable to access the App or API.
-:::
+:::warning Disables Access Archiving uses _soft-delete_, therefore archived users are unable to
+access the App or API. :::
## Deleting a User
@@ -75,6 +73,5 @@ Archiving uses _soft-delete_, therefore archived users are unable to access the
3. Click the red **Delete User** action button in the header
4. Confirm this decision by clicking **Delete** in the dialog
-:::danger Irreversible Change
-Unlike the soft-delete of archiving, this process is a hard-delete. Therefore, this action is permanent and can not be undone. Please proceed with caution.
-:::
+:::danger Irreversible Change Unlike the soft-delete of archiving, this process is a hard-delete.
+Therefore, this action is permanent and can not be undone. Please proceed with caution. :::
diff --git a/docs/guides/webhooks.md b/docs/guides/webhooks.md
index e9aa1ffc08..bd15d1b234 100644
--- a/docs/guides/webhooks.md
+++ b/docs/guides/webhooks.md
@@ -1,6 +1,8 @@
# Webhooks
-> In addition to writing custom code for more complex [event hooks](#), Directus provides a way to quickly configure webhooks through the App. These send HTTP requests when a specific event is triggered within the project.
+> In addition to writing custom code for more complex [event hooks](#), Directus provides a way to
+> quickly configure webhooks through the App. These send HTTP requests when a specific event is
+> triggered within the project.
## Creating Webhooks
@@ -8,13 +10,14 @@
2. Click the **Create Webhook** action button in the header
3. Complete the **other webhook form fields** outlined below
-* **Name** — A name to help remember this webhooks purpose
-* **Method** — Send as either a HTTP `GET` or `POST` request
-* **URL** — The URL to send the request to
-* **Status** — Whether the webhook is active (enabled) or inactive (disabled)
-* **Data** — Whether the event's data should be sent along with the request
-* **Trigger Actions** — The specific actions that will trigger the event
-* **Trigger Collections** — The specific collections for which the above actions will trigger the event
+- **Name** — A name to help remember this webhooks purpose
+- **Method** — Send as either a HTTP `GET` or `POST` request
+- **URL** — The URL to send the request to
+- **Status** — Whether the webhook is active (enabled) or inactive (disabled)
+- **Data** — Whether the event's data should be sent along with the request
+- **Trigger Actions** — The specific actions that will trigger the event
+- **Trigger Collections** — The specific collections for which the above actions will trigger the
+ event
## Disabling Webhooks
@@ -27,6 +30,5 @@
2. Click the red **Delete Webhook** action button in the header
3. Confirm this decision by clicking **Delete** in the dialog
-:::danger Irreversible Change
-This action is permanent and can not be undone. Please proceed with caution.
-:::
+:::danger Irreversible Change This action is permanent and can not be undone. Please proceed with
+caution. :::
diff --git a/docs/guides/white-labeling.md b/docs/guides/white-labeling.md
index 3297222b28..fdae264e07 100644
--- a/docs/guides/white-labeling.md
+++ b/docs/guides/white-labeling.md
@@ -1,65 +1,85 @@
# White-Labeling a Project
-> The Directus App UX/UI is meant to be _transparent_, and uses "form follows function" as the guiding design principle. This allows the platform to be completely tailored to your branding, end-to-end.
+> The Directus App UX/UI is meant to be _transparent_, and uses "form follows function" as the
+> guiding design principle. This allows the platform to be completely tailored to your branding,
+> end-to-end.
## Project Settings
1. Navigate to **Settings > Project Settings**
2. Configure any of the following **branding fields**
-* **Project Name** — The name used at the top of the [Navigation Bar](#) and on the login/public pages
-* **Project URL** — The URL when clicking the logo at the top of the [Module Bar](#)
-* **Project Color** — The color used behind the logo at the top of the [Module Bar](#), on the login/public pages, and for the browser's FavIcon
-* **Project Logo** — A 40x40 pixel logo at the top of the [Module Bar](#) and on the login/public pages
+- **Project Name** — The name used at the top of the [Navigation Bar](#) and on the login/public
+ pages
+- **Project URL** — The URL when clicking the logo at the top of the [Module Bar](#)
+- **Project Color** — The color used behind the logo at the top of the [Module Bar](#), on the
+ login/public pages, and for the browser's FavIcon
+- **Project Logo** — A 40x40 pixel logo at the top of the [Module Bar](#) and on the login/public
+ pages
-::: Recommended Logo Styling
-The 40x40 pixel Project Logo is inset within the 64x64 pixel Project Color square. To avoid a "boxy" look, we recommend using a SVG or PNG logo with transparency.
-:::
+::: Recommended Logo Styling The 40x40 pixel Project Logo is inset within the 64x64 pixel Project
+Color square. To avoid a "boxy" look, we recommend using a SVG or PNG logo with transparency. :::
-::: Browser FavIcon & Title
-The project color and logo are also used to set the dynamic favicon, and the project title is used in the browser's title. This furthers the bespoke appearance of your platform and makes it easier to differentiate between different Directus projects.
-:::
+::: Browser FavIcon & Title The project color and logo are also used to set the dynamic favicon, and
+the project title is used in the browser's title. This furthers the bespoke appearance of your
+platform and makes it easier to differentiate between different Directus projects. :::
### Public Page Styling
-In addition to the above options, you can also apply the following additional styling to your prject's [public pages](#).
+In addition to the above options, you can also apply the following additional styling to your
+prject's [public pages](#).
-* **Public Foreground** — An image shown on the right-side pane of public pages; max 400px width
-* **Public Background** — An image displayed behind the above foreground image, shown full-bleed within the right-side pane of public pages
-* **Public Note** — A helpful note displayed at the bottom of the right-side pane of public pages; supports markdown for rich-text formatting
+- **Public Foreground** — An image shown on the right-side pane of public pages; max 400px width
+- **Public Background** — An image displayed behind the above foreground image, shown full-bleed
+ within the right-side pane of public pages
+- **Public Note** — A helpful note displayed at the bottom of the right-side pane of public pages;
+ supports markdown for rich-text formatting
-::: Default Background Color
-When a Public Background image is not set, the right-side pane of public pages uses the Project Color instead.
-:::
+::: Default Background Color When a Public Background image is not set, the right-side pane of
+public pages uses the Project Color instead. :::
## Themes & Custom CSS
-The Directus App has been developed with customization and extensibility in mind. Colors and styles referenced within the codebase all use CSS variables, and therefore it is easy to make comprehensive changes to the App styling.
+The Directus App has been developed with customization and extensibility in mind. Colors and styles
+referenced within the codebase all use CSS variables, and therefore it is easy to make comprehensive
+changes to the App styling.
-* **Themes** — See the [Light Theme](https://github.com/directus/directus/blob/main/app/src/styles/themes/_light.scss) or [Dark Theme](https://github.com/directus/directus/blob/main/app/src/styles/themes/_dark.scss)
-* **Typography** — See the [Fonts](https://github.com/directus/directus/blob/main/app/src/styles/_type-styles.scss) and [Type Styles](https://github.com/directus/directus/blob/main/app/src/styles/mixins/type-styles.scss)
-* **Variables** — See the [Global Variables](https://github.com/directus/directus/blob/main/app/src/styles/_variables.scss)
+- **Themes** — See the
+ [Light Theme](https://github.com/directus/directus/blob/main/app/src/styles/themes/_light.scss)
+ or [Dark Theme](https://github.com/directus/directus/blob/main/app/src/styles/themes/_dark.scss)
+- **Typography** — See the
+ [Fonts](https://github.com/directus/directus/blob/main/app/src/styles/_type-styles.scss) and
+ [Type Styles](https://github.com/directus/directus/blob/main/app/src/styles/mixins/type-styles.scss)
+- **Variables** — See the
+ [Global Variables](https://github.com/directus/directus/blob/main/app/src/styles/_variables.scss)
-You can override any core CSS, including the above variables, directly within the App through project Settings.
+You can override any core CSS, including the above variables, directly within the App through
+project Settings.
1. Navigate to **Settings > Project Settings**
2. Scroll to the **CSS Overrides** field
3. Enter any **valid CSS**
4. Click the **Save** action button in the header
-::: Action Styling
-The `--primary` variable (and its shades) control call-to-actions and all other "Directus blue" elements within the App. While it may be tempting to override this variable with your brand's color, please first review the following warnings:
+::: Action Styling The `--primary` variable (and its shades) control call-to-actions and all other
+"Directus blue" elements within the App. While it may be tempting to override this variable with
+your brand's color, please first review the following warnings:
-* Avoid using yellow, orange, or red hues that give a sense of "danger"
-* Avoid low-contrast colors like yellows, grays, etc, that might not be easily visible
-* Avoid low-saturation colors like black, which might not properly highlight CTAs
+- Avoid using yellow, orange, or red hues that give a sense of "danger"
+- Avoid low-contrast colors like yellows, grays, etc, that might not be easily visible
+- Avoid low-saturation colors like black, which might not properly highlight CTAs
:::
## API Reference
-In addition to the static core docs, Directus also includes a [Dynamic API Reference](#) based on your project's schema. This includes tailored endpoint info for each collection within your data model, customizing the documentation to your specific project.
+In addition to the static core docs, Directus also includes a [Dynamic API Reference](#) based on
+your project's schema. This includes tailored endpoint info for each collection within your data
+model, customizing the documentation to your specific project.
## System Table Prefix
-Most white-labeling takes place in the presentation layer of the platform's App, but in some cases even the API and/or database needs to be a bit more agnostic. For that reason, Directus allows changing the prefix used by system tables. By default this is set to use `directus_*` to avoid any potential conflicts, but you can override this within the [Environment Variables](#).
+Most white-labeling takes place in the presentation layer of the platform's App, but in some cases
+even the API and/or database needs to be a bit more agnostic. For that reason, Directus allows
+changing the prefix used by system tables. By default this is set to use `directus_*` to avoid any
+potential conflicts, but you can override this within the [Environment Variables](#).
diff --git a/docs/readme.md b/docs/readme.md
index a0310ed221..b43e4632e0 100644
--- a/docs/readme.md
+++ b/docs/readme.md
@@ -6,43 +6,43 @@ Welcome to the Directus documentation.
Novice Oriented. For a platform intro and installation.
-* [Introduction](#)
-* [Support](#)
-* [Contributing](#)
-* [Backing Directus](#)
+- [Introduction](#)
+- [Support](#)
+- [Contributing](#)
+- [Backing Directus](#)
## Concepts
Learning Oriented. For understanding the platfom.
-* [Platform Overview](#)
-* [App Overview](#)
-* [App Extensions](#)
-* [Activity & Versions](#)
-* [Files & Thumbnails](#)
-* [Internationalization](#)
-* [Relationships](#)
-* [Users, Roles & Permissions](#)
+- [Platform Overview](#)
+- [App Overview](#)
+- [App Extensions](#)
+- [Activity & Versions](#)
+- [Files & Thumbnails](#)
+- [Internationalization](#)
+- [Relationships](#)
+- [Users, Roles & Permissions](#)
## Guides
Problem Oriented. Follow along with steps while working.
-* [Collections](#)
-* [Fields](#)
-* [Presets](#)
-* [Projects](#)
-* [Roles & Permissions](#)
-* [Users](#)
-* [Webhooks](#)
-* [White-Labeling](#)
+- [Collections](#)
+- [Fields](#)
+- [Presets](#)
+- [Projects](#)
+- [Roles & Permissions](#)
+- [Users](#)
+- [Webhooks](#)
+- [White-Labeling](#)
## Reference
Information Oriented. Look up info and specs while working.
-* [Command Line Interface](#)
-* [Environment Variables](#)
-* [Error Codes](#)
-* [Filter Rules](#)
-* [Item Objects](#)
+- [Command Line Interface](#)
+- [Environment Variables](#)
+- [Error Codes](#)
+- [Filter Rules](#)
+- [Item Objects](#)
diff --git a/docs/reference/api/activity.md b/docs/reference/api/activity.md
index a226a749c6..c2babc5ec7 100644
--- a/docs/reference/api/activity.md
+++ b/docs/reference/api/activity.md
@@ -4,7 +4,9 @@
'tag':
{
'name': 'Activity',
- 'description': 'All events that happen within Directus are tracked and stored in the activities collection. This gives you full accountability over everything that happens.',
+ 'description':
+ 'All events that happen within Directus are tracked and stored in the activities
+ collection. This gives you full accountability over everything that happens.',
'x-collection': 'directus_activity',
},
}
@@ -12,4 +14,5 @@
# Activity
-All events that happen within Directus are tracked and stored in the activities collection. This gives you full accountability over everything that happens.
+All events that happen within Directus are tracked and stored in the activities collection. This
+gives you full accountability over everything that happens.
diff --git a/docs/reference/api/assets.md b/docs/reference/api/assets.md
index b4034697b0..9a08c94ee4 100644
--- a/docs/reference/api/assets.md
+++ b/docs/reference/api/assets.md
@@ -4,7 +4,8 @@
'tag':
{
'name': 'Assets',
- 'description': 'Image typed files can be dynamically resized and transformed to fit any need.',
+ 'description':
+ 'Image typed files can be dynamically resized and transformed to fit any need.',
},
}
---
diff --git a/docs/reference/api/authentication.md b/docs/reference/api/authentication.md
index 2ed0a73cba..1fe861eabe 100644
--- a/docs/reference/api/authentication.md
+++ b/docs/reference/api/authentication.md
@@ -4,11 +4,14 @@
'tag':
{
'name': 'Authentication',
- 'description': 'All events that happen within Directus are tracked and stored in the activities collection. This gives you full accountability over everything that happens.',
+ 'description':
+ 'All events that happen within Directus are tracked and stored in the activities
+ collection. This gives you full accountability over everything that happens.',
},
}
---
# Authentication
-All events that happen within Directus are tracked and stored in the activities collection. This gives you full accountability over everything that happens.
+All events that happen within Directus are tracked and stored in the activities collection. This
+gives you full accountability over everything that happens.
diff --git a/docs/reference/api/collections.md b/docs/reference/api/collections.md
index 76b72f88a7..1f50c9afca 100644
--- a/docs/reference/api/collections.md
+++ b/docs/reference/api/collections.md
@@ -4,7 +4,9 @@
'tag':
{
'name': 'Collections',
- 'description': 'Collections are the individual collections of items, similar to tables in a database. Changes to collections will alter the schema of the database.',
+ 'description':
+ 'Collections are the individual collections of items, similar to tables in a
+ database. Changes to collections will alter the schema of the database.',
'x-collection': 'directus_collections',
},
}
@@ -12,4 +14,5 @@
# Collections
-Collections are the individual collections of items, similar to tables in a database. Changes to collections will alter the schema of the database.
+Collections are the individual collections of items, similar to tables in a database. Changes to
+collections will alter the schema of the database.
diff --git a/docs/reference/api/extensions.md b/docs/reference/api/extensions.md
index 73cf959063..aed686070d 100644
--- a/docs/reference/api/extensions.md
+++ b/docs/reference/api/extensions.md
@@ -4,11 +4,14 @@
'tag':
{
'name': 'Extensions',
- 'description': 'Directus can easily be extended through the addition of several types of extensions, including layouts, interfaces, and modules.',
+ 'description':
+ 'Directus can easily be extended through the addition of several types of
+ extensions, including layouts, interfaces, and modules.',
},
}
---
# Extensions
-Directus can easily be extended through the addition of several types of extensions, including layouts, interfaces, and modules.
+Directus can easily be extended through the addition of several types of extensions, including
+layouts, interfaces, and modules.
diff --git a/docs/reference/api/fields.md b/docs/reference/api/fields.md
index 403a867ab3..30b1b290cb 100644
--- a/docs/reference/api/fields.md
+++ b/docs/reference/api/fields.md
@@ -4,7 +4,9 @@
'tag':
{
'name': 'Fields',
- 'description': 'Fields are individual pieces of content within an item. They are mapped to columns in the database.',
+ 'description':
+ 'Fields are individual pieces of content within an item. They are mapped to columns
+ in the database.',
'x-collection': 'directus_fields',
},
}
diff --git a/docs/reference/api/files.md b/docs/reference/api/files.md
index 6ddbbacc43..9ca482124d 100644
--- a/docs/reference/api/files.md
+++ b/docs/reference/api/files.md
@@ -4,7 +4,9 @@
'tag':
{
'name': 'Files',
- 'description': 'Files can be saved in any given location. Directus has a powerful assets endpoint that can be used to generate thumbnails for images on the fly.',
+ 'description':
+ 'Files can be saved in any given location. Directus has a powerful assets endpoint
+ that can be used to generate thumbnails for images on the fly.',
'x-collection': 'directus_files',
},
}
@@ -12,4 +14,5 @@
# Files
-Files can be saved in any given location. Directus has a powerful assets endpoint that can be used to generate thumbnails for images on the fly.
+Files can be saved in any given location. Directus has a powerful assets endpoint that can be used
+to generate thumbnails for images on the fly.
diff --git a/docs/reference/api/introduction.md b/docs/reference/api/introduction.md
index 05a445fcdf..c2b0c84219 100644
--- a/docs/reference/api/introduction.md
+++ b/docs/reference/api/introduction.md
@@ -1,5 +1,8 @@
# API Reference
-Directus offers both a RESTful and GraphQL API to manage the data in the database. The API has predictable resource-oriented URLs, relies on standard HTTP status codes, and uses JSON for input and output.
+Directus offers both a RESTful and GraphQL API to manage the data in the database. The API has
+predictable resource-oriented URLs, relies on standard HTTP status codes, and uses JSON for input
+and output.
-The input/output of the API differs greatly for individual installs, as most of the endpoints will return data that's based on your specific schema.
+The input/output of the API differs greatly for individual installs, as most of the endpoints will
+return data that's based on your specific schema.
diff --git a/docs/reference/api/items.md b/docs/reference/api/items.md
index e9d0731382..f1e25c203c 100644
--- a/docs/reference/api/items.md
+++ b/docs/reference/api/items.md
@@ -4,11 +4,14 @@
'tag':
{
'name': 'Items',
- 'description': 'Items are individual pieces of data in your database. They can be anything, from articles, to IoT status checks.',
+ 'description':
+ 'Items are individual pieces of data in your database. They can be anything, from
+ articles, to IoT status checks.',
},
}
---
# Items
-Items are individual pieces of data in your database. They can be anything, from articles, to IoT status checks.
+Items are individual pieces of data in your database. They can be anything, from articles, to IoT
+status checks.
diff --git a/docs/reference/api/presets.md b/docs/reference/api/presets.md
index 5b98b1ad11..a19ea123b3 100644
--- a/docs/reference/api/presets.md
+++ b/docs/reference/api/presets.md
@@ -4,7 +4,9 @@
'tag':
{
'name': 'Presets',
- 'description': 'Presets hold the preferences of individual users of the platform. This allows Directus to show and maintain custom item listings for users of the app.',
+ 'description':
+ 'Presets hold the preferences of individual users of the platform. This allows
+ Directus to show and maintain custom item listings for users of the app.',
'x-collection': 'directus_presets',
},
}
@@ -12,4 +14,5 @@
# Presets
-Presets hold the preferences of individual users of the platform. This allows Directus to show and maintain custom item listings for users of the app.
+Presets hold the preferences of individual users of the platform. This allows Directus to show and
+maintain custom item listings for users of the app.
diff --git a/docs/reference/api/relations.md b/docs/reference/api/relations.md
index bdc284b2d1..ae649fbb89 100644
--- a/docs/reference/api/relations.md
+++ b/docs/reference/api/relations.md
@@ -4,7 +4,9 @@
'tag':
{
'name': 'Relations',
- 'description': 'What data is linked to what other data. Allows you to assign authors to articles, products to sales, and whatever other structures you can think of.',
+ 'description':
+ 'What data is linked to what other data. Allows you to assign authors to articles,
+ products to sales, and whatever other structures you can think of.',
'x-collection': 'directus_relations',
},
}
@@ -12,4 +14,5 @@
# Relations
-What data is linked to what other data. Allows you to assign authors to articles, products to sales, and whatever other structures you can think of.
+What data is linked to what other data. Allows you to assign authors to articles, products to sales,
+and whatever other structures you can think of.
diff --git a/docs/reference/api/revisions.md b/docs/reference/api/revisions.md
index 97380a8ffc..fbb3a79a7c 100644
--- a/docs/reference/api/revisions.md
+++ b/docs/reference/api/revisions.md
@@ -4,7 +4,9 @@
'tag':
{
'name': 'Revisions',
- 'description': "Revisions are individual changes to items made. Directus keeps track of changes made, so you're able to revert to a previous state at will.",
+ 'description':
+ "Revisions are individual changes to items made. Directus keeps track of changes
+ made, so you're able to revert to a previous state at will.",
'x-collection': 'directus_revisions',
},
}
@@ -12,4 +14,5 @@
# Revisions
-Revisions are individual changes to items made. Directus keeps track of changes made, so you're able to revert to a previous state at will.
+Revisions are individual changes to items made. Directus keeps track of changes made, so you're able
+to revert to a previous state at will.
diff --git a/docs/reference/api/server.md b/docs/reference/api/server.md
index 6427410be3..2f37347bc7 100644
--- a/docs/reference/api/server.md
+++ b/docs/reference/api/server.md
@@ -4,11 +4,14 @@
'tag':
{
'name': 'Server',
- 'description': "Access to where Directus runs. Allows you to make sure your server has everything needed to run the platform, and check what kind of latency we're dealing with.",
+ 'description':
+ "Access to where Directus runs. Allows you to make sure your server has everything
+ needed to run the platform, and check what kind of latency we're dealing with.",
},
}
---
# Server
-Access to where Directus runs. Allows you to make sure your server has everything needed to run the platform, and check what kind of latency we're dealing with.
+Access to where Directus runs. Allows you to make sure your server has everything needed to run the
+platform, and check what kind of latency we're dealing with.
diff --git a/docs/reference/api/utilities.md b/docs/reference/api/utilities.md
index 05f041f8c2..efe7cab9c3 100644
--- a/docs/reference/api/utilities.md
+++ b/docs/reference/api/utilities.md
@@ -4,7 +4,9 @@
'tag':
{
'name': 'Utilities',
- 'description': 'Directus comes with various utility endpoints you can use to simplify your development flow.',
+ 'description':
+ 'Directus comes with various utility endpoints you can use to simplify your
+ development flow.',
},
}
---
diff --git a/docs/reference/environment-variables.md b/docs/reference/environment-variables.md
index 16a21eca0b..8c72ac713c 100644
--- a/docs/reference/environment-variables.md
+++ b/docs/reference/environment-variables.md
@@ -1,7 +1,8 @@
# Environment Variables
-> Each Directus project supports a number of environment variables for configuration. These variables are added to the `/api/.env` file, with an example file at `/api/example.env` for easier boilerplate setup.
-
+> Each Directus project supports a number of environment variables for configuration. These
+> variables are added to the `/api/.env` file, with an example file at `/api/example.env` for easier
+> boilerplate setup.
## General
@@ -15,18 +16,20 @@ URL where your API can be reached on the web.
**Default: `/`**
### `LOG_LEVEL`
-What level of detail to log. One of `fatal`, `error`, `warn`, `info`, `debug`, `trace` or `silent`.
**Default: `info`**
+What level of detail to log. One of `fatal`, `error`, `warn`, `info`, `debug`, `trace` or
+`silent`.
**Default: `info`**
### `LOG_STYLE`
Render the logs human readable (pretty) or as JSON. One of `pretty`, `raw`.
**Default: `pretty`**
-
## Database
### `DB_CLIENT`
-What database client to use. One of `pg` or `postgres`, `mysql`, `mysql2`, `oracledb`, `mssql`, or `sqlite3`. For all database clients except SQLite, you will also need to configure the following variables:
+What database client to use. One of `pg` or `postgres`, `mysql`, `mysql2`, `oracledb`, `mssql`, or
+`sqlite3`. For all database clients except SQLite, you will also need to configure the following
+variables:
### `DB_HOST`
@@ -52,12 +55,11 @@ Database user's password. Required when using `pg`, `mysql`, `mysql2`, `oracledb
Where to read/write the SQLite database. Required when using `sqlite3`.
-::: Additional Database Variables
-All `DB_*` environment variables are passed to the `connection` configuration of a [`Knex` instance](http://knexjs.org).
-Based on your project's needs, you can extend the `DB_*` environment variables with any config you need to pass to the database instance.
+::: Additional Database Variables All `DB_*` environment variables are passed to the `connection`
+configuration of a [`Knex` instance](http://knexjs.org). Based on your project's needs, you can
+extend the `DB_*` environment variables with any config you need to pass to the database instance.
:::
-
## Security
### `KEY`
@@ -74,7 +76,8 @@ The duration that the access token is valid.
**Default: `15m`**
### `REFRESH_TOKEN_TTL`
-The duration that the refresh token is valid, and also how long users stay logged-in to the App.
**Default: `7d`**
+The duration that the refresh token is valid, and also how long users stay logged-in to the
+App.
**Default: `7d`**
### `REFRESH_TOKEN_COOKIE_SECURE`
@@ -84,7 +87,6 @@ Whether or not to use a secure cookie for the refresh token in cookie mode.
*
Value for `sameSite` in the refresh token cookie when in cookie mode.
**Default: `lax`**
-
## CORS
### `CORS_ENABLED`
@@ -111,7 +113,6 @@ Whether or not to send the `Access-Control-Allow-Credentials` header.
**Defau
Value for the `Access-Control-Max-Age` header.
**Default: `18000`**
-
## Rate Limiting
### `RATE_LIMITER_ENABLED`
@@ -128,27 +129,28 @@ The time window in seconds in which the points are counted.
**Default: `1`**
### `RATE_LIMITER_STORE`
-Where to store the rate limiter counts. Either `memory`, `redis`, or `memcache`. Based on the rate limiter used, you must also provide the following configurations.
**Default: `memory`**
+Where to store the rate limiter counts. Either `memory`, `redis`, or `memcache`. Based on the rate
+limiter used, you must also provide the following configurations.
**Default: `memory`**
-* **Memory**
- * No additional configuration required
-* **Redis**
- * **`RATE_LIMITER_REDIS`** — Redis connection string
- * eg: `redis://:authpassword@127.0.0.1:6380/4`
- * Alternatively, you can enter individual connection parameters:
- * **`RATE_LIMITER_REDIS_HOST`**
- * **`RATE_LIMITER_REDIS_PORT`**
- * **`RATE_LIMITER_REDIS_PASSWORD`**
- * **`RATE_LIMITER_REDIS_DB`**
-* **Memcache**
- * **`RATE_LIMITER_MEMCACHE`** — Location of your memcache instance
+- **Memory**
+ - No additional configuration required
+- **Redis**
+ - **`RATE_LIMITER_REDIS`** — Redis connection string
+ - eg: `redis://:authpassword@127.0.0.1:6380/4`
+ - Alternatively, you can enter individual connection parameters:
+ - **`RATE_LIMITER_REDIS_HOST`**
+ - **`RATE_LIMITER_REDIS_PORT`**
+ - **`RATE_LIMITER_REDIS_PASSWORD`**
+ - **`RATE_LIMITER_REDIS_DB`**
+- **Memcache**
+ - **`RATE_LIMITER_MEMCACHE`** — Location of your memcache instance
-::: Additional Rate Limiter Variables
-All `RATE_LIMITER_*` variables are passed directly to a `rate-limiter-flexible` instance. Depending on your
-project's needs, you can extend the above environment variables to configure any of [the `rate-limiter-flexible` options](https://github.com/animir/node-rate-limiter-flexible/wiki/Options).
+::: Additional Rate Limiter Variables All `RATE_LIMITER_*` variables are passed directly to a
+`rate-limiter-flexible` instance. Depending on your project's needs, you can extend the above
+environment variables to configure any of
+[the `rate-limiter-flexible` options](https://github.com/animir/node-rate-limiter-flexible/wiki/Options).
:::
-
## Cache
### `CACHE_ENABLED`
@@ -159,9 +161,8 @@ Whether or not caching is enabled.
**Default: `false`**
How long the cache is persisted.
**Default: `30m`**
-:::warning Forced Flush
-Regardless of TTL, the cache is always flushed for every create, update, and delete action.
-:::
+:::warning Forced Flush Regardless of TTL, the cache is always flushed for every create, update, and
+delete action. :::
### `CACHE_NAMESPACE`
@@ -169,57 +170,58 @@ How to scope the cache data.
**Default: `directus-cache`**
### `CACHE_STORE`
-Where to store the cache data. Either `memory`, `redis`, or `memcache`. Based on the cache used, you must also provide the following configurations.
**Default: `memory`**
-
-* **Memory**
- * No additional configuration required
-* **Redis**
- * **`CACHE_REDIS`** — Redis connection string
- * eg: `redis://:authpassword@127.0.0.1:6380/4`
- * Alternatively, you can enter individual connection parameters:
- * **`CACHE_REDIS_HOST`**
- * **`CACHE_REDIS_PORT`**
- * **`CACHE_REDIS_PASSWORD`**
- * **`CACHE_REDIS_DB`**
-* **Memcache**
- * **`CACHE_MEMCACHE`** — Location of your memcache instance
+Where to store the cache data. Either `memory`, `redis`, or `memcache`. Based on the cache used, you
+must also provide the following configurations.
**Default: `memory`**
+- **Memory**
+ - No additional configuration required
+- **Redis**
+ - **`CACHE_REDIS`** — Redis connection string
+ - eg: `redis://:authpassword@127.0.0.1:6380/4`
+ - Alternatively, you can enter individual connection parameters:
+ - **`CACHE_REDIS_HOST`**
+ - **`CACHE_REDIS_PORT`**
+ - **`CACHE_REDIS_PASSWORD`**
+ - **`CACHE_REDIS_DB`**
+- **Memcache**
+ - **`CACHE_MEMCACHE`** — Location of your memcache instance
## File Storage
### `STORAGE_LOCATIONS`
-A CSV of storage locations (eg: `local,digitalocean,amazon`) to use. You can use any names you'd like for these keys, but each must have a matching `` configuration.
**Default: `local`**
+A CSV of storage locations (eg: `local,digitalocean,amazon`) to use. You can use any names you'd
+like for these keys, but each must have a matching `` configuration.
**Default:
+`local`**
For each of the storage locations listed, you must provide the following configuration:
-* **`STORAGE__PUBLIC_URL`** — Location on the internet where the files are accessible
-* **`STORAGE__DRIVER`** — Which driver to use, either `local`, `s3`, or `gcl`
+- **`STORAGE__PUBLIC_URL`** — Location on the internet where the files are accessible
+- **`STORAGE__DRIVER`** — Which driver to use, either `local`, `s3`, or `gcl`
Based on your configured driver, you must also provide the following configurations.
-* **Local**
- * `STORAGE__ROOT` — Where to store the files on disk
-* **S3**
- * **`STORAGE__KEY`** — User key
- * **`STORAGE__SECRET`** — User secret
- * **`STORAGE__ENDPOINT`** — S3 Endpoint
- * **`STORAGE__BUCKET`** — S3 Bucket
- * **`STORAGE__REGION`** — S3 Region
-* **Google Cloud**
- * **`STORAGE__KEY_FILENAME`** — Path to key file on disk
- * **`STORAGE__BUCKET`** — Google Cloud Storage bucket
-
+- **Local**
+ - `STORAGE__ROOT` — Where to store the files on disk
+- **S3**
+ - **`STORAGE__KEY`** — User key
+ - **`STORAGE__SECRET`** — User secret
+ - **`STORAGE__ENDPOINT`** — S3 Endpoint
+ - **`STORAGE__BUCKET`** — S3 Bucket
+ - **`STORAGE__REGION`** — S3 Region
+- **Google Cloud**
+ - **`STORAGE__KEY_FILENAME`** — Path to key file on disk
+ - **`STORAGE__BUCKET`** — Google Cloud Storage bucket
## oAuth
### `OAUTH_PROVIDERS`
-CSV of oAuth providers you want to use. For each of the oAuth providers you list, you must also provide the following configurations.
-
-* **`OAUTH__KEY`** — oAuth key for the external service
-* **`OAUTH__SECRET`** — oAuth secret for the external service.
+CSV of oAuth providers you want to use. For each of the oAuth providers you list, you must also
+provide the following configurations.
+- **`OAUTH__KEY`** — oAuth key for the external service
+- **`OAUTH__SECRET`** — oAuth secret for the external service.
## Extensions
@@ -227,7 +229,6 @@ CSV of oAuth providers you want to use. For each of the oAuth providers you list
Path to your local extensions folder.
**Default: `./extensions`**
-
## Email
### `EMAIL_FROM`
@@ -236,15 +237,17 @@ Email address from which emails are sent.
**Default: `no-reply@directus.io`**
### `EMAIL_TRANSPORT`
-What to use to send emails. One of `sendmail`, `smtp`. Based on the transport used, you must also provide the following configurations.
**Default: `sendmail`**
+What to use to send emails. One of `sendmail`, `smtp`. Based on the transport used, you must also
+provide the following configurations.
**Default: `sendmail`**
-* **Sendmail** (`sendmail`)
- * **`EMAIL_SENDMAIL_NEW_LINE`** — What new line style to use in sendmail. **Default: `unix`**
- * **`EMAIL_SENDMAIL_PATH`** — Path to your sendmail executable. **Default: `/usr/sbin/sendmail`**
-* **SMTP** (`smtp`)
- * **`EMAIL_SMTP_HOST`** — SMTP Host
- * **`EMAIL_SMTP_PORT`** — SMTP Port
- * **`EMAIL_SMTP_USER`** — SMTP User
- * **`EMAIL_SMTP_PASSWORD`** — SMTP Password
- * **`EMAIL_SMTP_POOL`** — Use SMTP pooling
- * **`EMAIL_SMTP_SECURE`** — Enable TLS
+- **Sendmail** (`sendmail`)
+ - **`EMAIL_SENDMAIL_NEW_LINE`** — What new line style to use in sendmail. **Default: `unix`**
+ - **`EMAIL_SENDMAIL_PATH`** — Path to your sendmail executable. **Default:
+ `/usr/sbin/sendmail`**
+- **SMTP** (`smtp`)
+ - **`EMAIL_SMTP_HOST`** — SMTP Host
+ - **`EMAIL_SMTP_PORT`** — SMTP Port
+ - **`EMAIL_SMTP_USER`** — SMTP User
+ - **`EMAIL_SMTP_PASSWORD`** — SMTP Password
+ - **`EMAIL_SMTP_POOL`** — Use SMTP pooling
+ - **`EMAIL_SMTP_SECURE`** — Enable TLS
diff --git a/docs/reference/error-codes.md b/docs/reference/error-codes.md
index 6f6d1ea233..2b22ef7812 100644
--- a/docs/reference/error-codes.md
+++ b/docs/reference/error-codes.md
@@ -1,7 +1,7 @@
# Error Codes
| Error Code | Description |
-|-----------------------|------------------------------------------------|
+| --------------------- | ---------------------------------------------- |
| `FAILED_VALIDATION` | Validation for this particular item failed |
| `FORBIDDEN` | You are not allowed to do the current action |
| `INVALID_CREDENTIALS` | Username / password or access token is wrong |
@@ -12,6 +12,5 @@
| `ROUTE_NOT_FOUND` | Endpoint does not exist |
| `SERVICE_UNAVAILABLE` | Could not use external service |
-:::warning Security
-To prevent leaking which items exist, all actions for non-existing items will return a `FORBIDDEN` error.
-:::
+:::warning Security To prevent leaking which items exist, all actions for non-existing items will
+return a `FORBIDDEN` error. :::
diff --git a/docs/reference/filter-rules.md b/docs/reference/filter-rules.md
index 151f135eb2..23a1827793 100644
--- a/docs/reference/filter-rules.md
+++ b/docs/reference/filter-rules.md
@@ -1,12 +1,14 @@
# Filter Rules
-> Permissions, validation, and the API's `filter` parameter all rely on a specific JSON structure to define their rules. This page describes the syntax for creating flat, relational, or complex filter rules.
+> Permissions, validation, and the API's `filter` parameter all rely on a specific JSON structure to
+> define their rules. This page describes the syntax for creating flat, relational, or complex
+> filter rules.
## Syntax
-* **Field** — Any valid root field, [relational field](#), or [logical operator](#)
-* **Operator** — Any valid [API operator](#) prefaced with an underscore
-* **Value** — Any valid static value, or [dynamic variable](#)
+- **Field** — Any valid root field, [relational field](#), or [logical operator](#)
+- **Operator** — Any valid [API operator](#) prefaced with an underscore
+- **Value** — Any valid static value, or [dynamic variable](#)
```
{
@@ -44,33 +46,34 @@
## Supported Operators
-| Operator | Description |
-| -------------------- | -------------------------------------- |
-| `eq` | Equal to |
-| `neq` | Not equal to |
-| `lt` | Less than |
-| `lte` | Less than or equal to |
-| `gt` | Greater than |
-| `gte` | Greater than or equal to |
-| `in` | Exists in one of the values |
-| `nin` | Not in one of the values |
-| `null` | It is null |
-| `nnull` | It is not null |
-| `contains`, `like` | Contains the substring |
-| `ncontains`, `nlike` | Doesn't contain the substring |
-| `rlike` | Contains a substring using a wildcard |
+| Operator | Description |
+| -------------------- | ----------------------------------------- |
+| `eq` | Equal to |
+| `neq` | Not equal to |
+| `lt` | Less than |
+| `lte` | Less than or equal to |
+| `gt` | Greater than |
+| `gte` | Greater than or equal to |
+| `in` | Exists in one of the values |
+| `nin` | Not in one of the values |
+| `null` | It is null |
+| `nnull` | It is not null |
+| `contains`, `like` | Contains the substring |
+| `ncontains`, `nlike` | Doesn't contain the substring |
+| `rlike` | Contains a substring using a wildcard |
| `nrlike` | Not contains a substring using a wildcard |
-| `between` | The value is between two values |
-| `nbetween` | The value is not between two values |
-| `empty` | The value is empty (null or falsy) |
-| `nempty` | The value is not empty (null or falsy) |
-| `all` | Contains all given related item's IDs |
-| `has` | Has one or more related items's IDs |
+| `between` | The value is between two values |
+| `nbetween` | The value is not between two values |
+| `empty` | The value is empty (null or falsy) |
+| `nempty` | The value is not empty (null or falsy) |
+| `all` | Contains all given related item's IDs |
+| `has` | Has one or more related items's IDs |
## Relational
-You can target related values by nesting field names. For example, if you have a relational [Many-to-One](#)
-`author` field, you can set a rule for the `author.name` field using the following syntax.
+You can target related values by nesting field names. For example, if you have a relational
+[Many-to-One](#) `author` field, you can set a rule for the `author.name` field using the following
+syntax.
```json
{
@@ -84,52 +87,49 @@ You can target related values by nesting field names. For example, if you have a
## Logical Operators
-You can nest or group multiple rules using the `_and` or `_or` logical operators. Each operator holds an array of rules, allowing for more complex filtering.
+You can nest or group multiple rules using the `_and` or `_or` logical operators. Each operator
+holds an array of rules, allowing for more complex filtering.
```json
{
- "_or": [
- {
- "_and": [
- {
- "owner": {
- "_eq": "$CURRENT_USER"
- }
- },
- {
- "status": {
- "_in": [
- "published",
- "draft"
- ]
- }
- }
- ]
- },
- {
- "_and": [
- {
- "owner": {
- "_neq": "$CURRENT_USER"
- }
- },
- {
- "status": {
- "_in": [
- "published"
- ]
- }
- }
- ]
- }
- ]
+ "_or": [
+ {
+ "_and": [
+ {
+ "owner": {
+ "_eq": "$CURRENT_USER"
+ }
+ },
+ {
+ "status": {
+ "_in": ["published", "draft"]
+ }
+ }
+ ]
+ },
+ {
+ "_and": [
+ {
+ "owner": {
+ "_neq": "$CURRENT_USER"
+ }
+ },
+ {
+ "status": {
+ "_in": ["published"]
+ }
+ }
+ ]
+ }
+ ]
}
```
## Dynamic Variables
-In addition to static values, you can also filter against _dynamic_ values using the following variables.
+In addition to static values, you can also filter against _dynamic_ values using the following
+variables.
-* `$CURRENT_USER` — The primary key of the currently authenticated user
-* `$CURRENT_ROLE` — The primary key of the role for the currently authenticated user
-* `$NOW` — The current timestamp
+- `$CURRENT_USER` — The primary key of the currently authenticated user
+- `$CURRENT_ROLE` — The primary key of the role for the currently authenticated user
+- `$NOW` — The current timestamp
diff --git a/docs/reference/item-objects.md b/docs/reference/item-objects.md
index 02e8c0c473..35aff08cb6 100644
--- a/docs/reference/item-objects.md
+++ b/docs/reference/item-objects.md
@@ -4,8 +4,8 @@
## Syntax
-* **Field** — Any valid root field or [relational field](#)
-* **Value** — Any valid static value, or [dynamic variable](#)
+- **Field** — Any valid root field or [relational field](#)
+- **Value** — Any valid static value, or [dynamic variable](#)
```
{
@@ -23,8 +23,9 @@
## Relational
-You can set related values by nesting field names. For example, if you have a relational [Many-to-One](#)
-`author` field, you can set a rule for the `author.name` field using the following syntax.
+You can set related values by nesting field names. For example, if you have a relational
+[Many-to-One](#) `author` field, you can set a rule for the `author.name` field using the following
+syntax.
```json
{
@@ -38,6 +39,6 @@ You can set related values by nesting field names. For example, if you have a re
In addition to static values, you can also set _dynamic_ values using the following variables.
-* `$CURRENT_USER` — The primary key of the currently authenticated user
-* `$CURRENT_ROLE` — The primary key of the role for the currently authenticated user
-* `$NOW` — The current timestamp
+- `$CURRENT_USER` — The primary key of the currently authenticated user
+- `$CURRENT_ROLE` — The primary key of the role for the currently authenticated user
+- `$NOW` — The current timestamp
diff --git a/docs/reference/sdk-js.md b/docs/reference/sdk-js.md
index e3660bce20..cf2ca4c983 100644
--- a/docs/reference/sdk-js.md
+++ b/docs/reference/sdk-js.md
@@ -1,6 +1,7 @@
# SDK JS
-The JS SDK is a small wrapper around [Axios](https://npmjs.com/axios) that makes it a little easier to use the Directus API from a JavaScript powered project.
+The JS SDK is a small wrapper around [Axios](https://npmjs.com/axios) that makes it a little easier
+to use the Directus API from a JavaScript powered project.
## Installation
@@ -56,7 +57,7 @@ const directus = new DirectusSDK('https://api.example.com/', {
storage: new MemoryStore(), // Storage adapter where refresh tokens are stored in JSON mode
mode: 'json', // What login mode to use. One of `json`, `cookie`
autoRefresh: true, // Whether or not to automatically refresh the access token on login
- }
+ },
});
```
@@ -85,18 +86,19 @@ You can tap into the Axios instance used directly through `directus.axios`.
```js
directus.items('articles').create({
- title: 'My New Article'
+ title: 'My New Article',
});
```
##### Multiple Items
+
```js
directus.items('articles').create([
{
- title: 'My First Article'
+ title: 'My First Article',
},
{
- title: 'My Second Article'
+ title: 'My Second Article',
},
]);
```
@@ -116,9 +118,9 @@ directus.items('articles').read({
search: 'Directus',
filter: {
date_published: {
- _gte: '$NOW'
- }
- }
+ _gte: '$NOW',
+ },
+ },
});
```
@@ -149,29 +151,21 @@ directus.items('articles').read([15, 42], { fields: ['title'] });
```js
// One
directus.items('articles').update(15, {
- title: 'An Updated title'
+ title: 'An Updated title',
});
// Multiple
directus.items('articles').update([15, 42], {
- title: 'An Updated title'
+ title: 'An Updated title',
});
```
Supports optional query:
```js
-directus.items('articles').update(
- 15,
- { title: 'An Updated title' },
- { fields: ['title'] }
-);
+directus.items('articles').update(15, { title: 'An Updated title' }, { fields: ['title'] });
-directus.items('articles').update(
- [15, 42],
- { title: 'An Updated title' },
- { fields: ['title'] }
-);
+directus.items('articles').update([15, 42], { title: 'An Updated title' }, { fields: ['title'] });
```
##### Multiple Items, Multiple Values
@@ -192,16 +186,19 @@ directus.items('articles').update([
Supports optional query:
```js
-directus.items('articles').update([
- {
- id: 15,
- title: 'Article 15',
- },
- {
- id: 42,
- title: 'Article 42',
- },
-], { fields: ['title'] });
+directus.items('articles').update(
+ [
+ {
+ id: 15,
+ title: 'Article 15',
+ },
+ {
+ id: 42,
+ title: 'Article 42',
+ },
+ ],
+ { fields: ['title'] }
+);
```
##### Multiple Items by Query, Single Value
@@ -209,14 +206,14 @@ directus.items('articles').update([
```js
directus.items('articles').update(
{
- archived: true
+ archived: true,
},
{
filter: {
publish_date: {
- _gte: '$NOW'
- }
- }
+ _gte: '$NOW',
+ },
+ },
}
);
```
@@ -249,9 +246,9 @@ directus.activity.read();
directus.activity.read({
filter: {
action: {
- _eq: 'create'
- }
- }
+ _eq: 'create',
+ },
+ },
});
```
@@ -281,7 +278,7 @@ directus.activity.read([15, 42], { fields: ['action'] });
directus.activity.comments.create({
collection: 'articles',
item: 15,
- comment: 'Hello, world!'
+ comment: 'Hello, world!',
});
```
@@ -311,13 +308,19 @@ Note: these configuration options are passed in the top level SDK constructor.
##### mode
-`cookie` or `json`. When in cookie mode, the API will set the refresh token in a `httpOnly` secure cookie that can't be accessed from client side JS. This is the most secure way to connect to the API from a public front-end website.
+`cookie` or `json`. When in cookie mode, the API will set the refresh token in a `httpOnly` secure
+cookie that can't be accessed from client side JS. This is the most secure way to connect to the API
+from a public front-end website.
-When you can't rely on cookies, or need more control over handling the storage of the cookie, use `json` mode. This will return the refresh token like "regular" in the payload. You can use the `storage` option (see below) to control where the refresh token is stored / read from
+When you can't rely on cookies, or need more control over handling the storage of the cookie, use
+`json` mode. This will return the refresh token like "regular" in the payload. You can use the
+`storage` option (see below) to control where the refresh token is stored / read from
##### storage
-When using `json` for mode, the refresh token needs to be stored somewhere. The `storage` option allows you to plug in any object that has an async `setItem()` and `getItem()` method. This allows you to plugin things like [`localforage`](https://github.com/localForage/localForage) directly:
+When using `json` for mode, the refresh token needs to be stored somewhere. The `storage` option
+allows you to plug in any object that has an async `setItem()` and `getItem()` method. This allows
+you to plugin things like [`localforage`](https://github.com/localForage/localForage) directly:
```js
import localforage from 'localforage';
@@ -328,7 +331,8 @@ const directus = new DirectusSDK('https://api.example.com', { storage: localfora
##### autoRefresh
-Whether or not to automatically call `refresh()` when the access token is about to expire. Defaults to `true`
+Whether or not to automatically call `refresh()` when the access token is about to expire. Defaults
+to `true`
#### Get / Set Token
@@ -473,7 +477,7 @@ directus.server.specs.oas();
#### Ping the Server
```js
-directus.server.ping()
+directus.server.ping();
```
#### Get Server/Project Info
@@ -540,7 +544,7 @@ Supports optional query:
```js
directus.users.me.read({
- fields: ['last_access']
+ fields: ['last_access'],
});
```
@@ -553,10 +557,7 @@ directus.users.me.update({ first_name: 'Admin' });
Supports optional query:
```js
-directus.users.me.update(
- { first_name: 'Admin' },
- { fields: ['last_access'] }
-);
+directus.users.me.update({ first_name: 'Admin' }, { fields: ['last_access'] });
```
---