Skip to content

Commit d8030fa

Browse files
authored
Merge pull request #6670 from nikolajlauridsen/add-delivery-api-install-docs
Update enabling delivery api
2 parents e297658 + 697e44a commit d8030fa

File tree

2 files changed

+44
-0
lines changed
  • 14/umbraco-cms/reference/content-delivery-api
  • 15/umbraco-cms/reference/content-delivery-api

2 files changed

+44
-0
lines changed

14/umbraco-cms/reference/content-delivery-api/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,19 @@ The Delivery API is an opt-in feature in Umbraco. It must be explicitly enabled
1414

1515
### Enable the Content Delivery API
1616

17+
When creating your project, you can enable the Delivery API using the `--use-delivery-api` or `-da` flag. This will automatically add the necessary configuration to your project.
18+
19+
```bash
20+
dotnet new umbraco -n MyProject -da
21+
```
22+
23+
You can also enable the Delivery API at a later point by following these steps:
24+
1725
1. Open your project's `appsettings.json`.
1826
2. Insert the `DeliveryApi` configuration section under `Umbraco:CMS`.
1927
3. Add the `Enabled` key and set its value to `true`.
28+
4. Open `Program.Cs`
29+
5. Add `.AddDeliveryApi()` to `builder.CreateUmbracoBuilder()`
2030

2131
{% code title="appsettings.json" %}
2232
```json
@@ -32,6 +42,18 @@ The Delivery API is an opt-in feature in Umbraco. It must be explicitly enabled
3242
```
3343
{% endcode %}
3444

45+
{% code title="Program.cs" %}
46+
```csharp
47+
builder.CreateUmbracoBuilder()
48+
.AddBackOffice()
49+
.AddWebsite()
50+
.AddDeliveryApi()
51+
.AddComposers()
52+
.Build();
53+
54+
```
55+
{% endcode %}
56+
3557
Once the Content Delivery API is enabled, the next step is to rebuild the Delivery API content index (_DeliveryApiContentIndex_). This can be done using the **Examine Management** dashboard in the **Settings** section of the Umbraco Backoffice.
3658

3759
1. Access the Umbraco Backoffice.

15/umbraco-cms/reference/content-delivery-api/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,19 @@ The Delivery API is an opt-in feature in Umbraco. It must be explicitly enabled
1414

1515
### Enable the Content Delivery API
1616

17+
When creating your project, you can enable the Delivery API using the `--use-delivery-api` or `-da` flag. This will automatically add the necessary configuration to your project.
18+
19+
```bash
20+
dotnet new umbraco -n MyProject -da
21+
```
22+
23+
You can also enable the Delivery API at a later point by following these steps:
24+
1725
1. Open your project's `appsettings.json`.
1826
2. Insert the `DeliveryApi` configuration section under `Umbraco:CMS`.
1927
3. Add the `Enabled` key and set its value to `true`.
28+
4. Open `Program.Cs`
29+
5. Add `.AddDeliveryApi()` to `builder.CreateUmbracoBuilder()`
2030

2131
{% code title="appsettings.json" %}
2232
```json
@@ -32,6 +42,18 @@ The Delivery API is an opt-in feature in Umbraco. It must be explicitly enabled
3242
```
3343
{% endcode %}
3444

45+
{% code title="Program.cs" %}
46+
```csharp
47+
builder.CreateUmbracoBuilder()
48+
.AddBackOffice()
49+
.AddWebsite()
50+
.AddDeliveryApi()
51+
.AddComposers()
52+
.Build();
53+
54+
```
55+
{% endcode %}
56+
3557
Once the Content Delivery API is enabled, the next step is to rebuild the Delivery API content index (_DeliveryApiContentIndex_). This can be done using the **Examine Management** dashboard in the **Settings** section of the Umbraco Backoffice.
3658

3759
1. Access the Umbraco Backoffice.

0 commit comments

Comments
 (0)