You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 14/umbraco-cms/reference/content-delivery-api/README.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,19 @@ The Delivery API is an opt-in feature in Umbraco. It must be explicitly enabled
14
14
15
15
### Enable the Content Delivery API
16
16
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
+
17
25
1. Open your project's `appsettings.json`.
18
26
2. Insert the `DeliveryApi` configuration section under `Umbraco:CMS`.
19
27
3. Add the `Enabled` key and set its value to `true`.
28
+
4. Open `Program.Cs`
29
+
5. Add `.AddDeliveryApi()` to `builder.CreateUmbracoBuilder()`
20
30
21
31
{% code title="appsettings.json" %}
22
32
```json
@@ -32,6 +42,18 @@ The Delivery API is an opt-in feature in Umbraco. It must be explicitly enabled
32
42
```
33
43
{% endcode %}
34
44
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
+
35
57
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.
Copy file name to clipboardExpand all lines: 15/umbraco-cms/reference/content-delivery-api/README.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,19 @@ The Delivery API is an opt-in feature in Umbraco. It must be explicitly enabled
14
14
15
15
### Enable the Content Delivery API
16
16
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
+
17
25
1. Open your project's `appsettings.json`.
18
26
2. Insert the `DeliveryApi` configuration section under `Umbraco:CMS`.
19
27
3. Add the `Enabled` key and set its value to `true`.
28
+
4. Open `Program.Cs`
29
+
5. Add `.AddDeliveryApi()` to `builder.CreateUmbracoBuilder()`
20
30
21
31
{% code title="appsettings.json" %}
22
32
```json
@@ -32,6 +42,18 @@ The Delivery API is an opt-in feature in Umbraco. It must be explicitly enabled
32
42
```
33
43
{% endcode %}
34
44
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
+
35
57
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.
0 commit comments