Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions docusaurus/docs/dev-docs/configurations/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ To enable a future flag:

1. (_optional_) If the server is running, stop it with `Ctrl-C`.
2. Open the `config/features.js|ts` file or create it if the file does not exist yet. The file will export a `future` object with all the future flags to enable.
3. To enable a future flag, add its property name (see [full list](#available-future-flags)) to the `future` object and ensure the property's value is set to `true`. The following example shows how to enable the `contentReleasesScheduling` future flag:
3. To enable a future flag, add its property name (see [full list](#available-future-flags)) to the `future` object and ensure the property's value is set to `true`. The following example shows how to enable the `preview` future flag:

<Tabs groupId='js-ts'>

Expand All @@ -40,8 +40,8 @@ To enable a future flag:
```ts title="/config/features.ts"
module.export = ({ env }) => ({
future: {
// You could also simply write: contentReleases: true
contentReleasesScheduling: env.bool('STRAPI_FUTURE_CONTENT_RELEASES_SCHEDULING', false),
// You could also simply write: preview: true
preview: env.bool('STRAPI_FUTURE_PREVIEW', false),
},
})

Expand All @@ -50,10 +50,10 @@ To enable a future flag:
This example assumes that you have an `.env` environment file at the root of your application and that the file includes the following line:

```json title=".env"
STRAPI_FUTURE_CONTENT_RELEASES_SCHEDULING=true
STRAPI_FUTURE_PREVIEW=true
```

If your environment file does not include this value, the `contentReleasesScheduling` future flag property value will default to `false` and the experimental feature will not be enabled.
If your environment file does not include this value, the `preview` future flag property value will default to `false` and the experimental feature will not be enabled.

</TabItem>

Expand All @@ -62,19 +62,19 @@ To enable a future flag:
```ts title="/config/features.ts"
export default {
future: {
// You could also simply write: contentReleases: true
contentReleasesScheduling: env.bool('STRAPI_FUTURE_CONTENT_RELEASES_SCHEDULING', false),
// You could also simply write: preview: true
preview: env.bool('STRAPI_FUTURE_PREVIEW', false),
},
};
```

This example assumes that you have an `.env` environment file at the root of your application and that the file includes the following line:

```json title=".env"
STRAPI_FUTURE_CONTENT_RELEASES_SCHEDULING=true
STRAPI_FUTURE_PREVIEW=true
```

If your environment file does not include this value, the `contentReleases` future flag property value will default to `false` and the experimental feature will not be enabled.
If your environment file does not include this value, the `preview` future flag property value will default to `false` and the experimental feature will not be enabled.

</TabItem>
</Tabs>
Expand Down Expand Up @@ -109,8 +109,8 @@ Developers can use the following APIs to interact with future flags:

There are currently no available future flags. This section will be updated once new experimental features are available for testing.

<!-- The following future flags are currently available and can be used in the `future` object of the `config/features` configuration file:
The following future flags are currently available and can be used in the `future` object of the `config/features` configuration file:

| Property name | Related feature | Suggested environment variable name |
| ----------------- | -------------------------------------------- | ----------------------------------------- |
| `contentReleasesScheduling` | [Releases Scheduling](/user-docs/releases/managing-a-release#scheduling-a-release-) | `STRAPI_FUTURE_CONTENT_RELEASES_SCHEDULING` | -->
| `preview` | [Preview](/user-docs/content-manager/previewing-content) | `STRAPI_FUTURE_PREVIEW` |
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,10 @@ With the Preview feature, you can preview your front end application directly fr
}}
/>

<!-- <div style={{position: 'relative', paddingBottom: 'calc(54.43121693121693% + 50px)', height: '0'}}>
<iframe id="zpen5g4t8p" src="https://app.guideflow.com/embed/zpen5g4t8p" width="100%" height="100%" style={{overflow:'hidden', position:'absolute', border:'none'}} scrolling="no" allow="clipboard-read; clipboard-write" webkitallowfullscreen mozallowfullscreen allowfullscreen allowtransparency="true"></iframe>
</div> -->

:::prerequisites
- The Strapi admin panel user should have read permissions for the content-type.
- The Preview feature should be configured in the code of the `config/admin` file (see [Developer Docs](/dev-docs/preview) for details).
- While the Preview feature is in beta, it should be enabled with the `future.preview` feature flag set to `true` in `config/features` (see [Developer Docs](/dev-docs/configurations/features)).
- The Preview feature should be configured in the code of the `config/admin` file (see [Developer Docs](/dev-docs/preview)).
- A front-end application should already be created and running so you can preview it.
:::

Expand Down