From c0289eecb38e6cc23b54820c8e5d24d9d6d67403 Mon Sep 17 00:00:00 2001 From: Javier Vela Date: Thu, 7 Oct 2021 20:03:16 +0200 Subject: [PATCH 01/17] azure blob storage add publicAccessLevel param --- .../components-reference/supported-bindings/blobstorage.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/blobstorage.md b/daprdocs/content/en/reference/components-reference/supported-bindings/blobstorage.md index 04eae4780..bb8dcdb69 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/blobstorage.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/blobstorage.md @@ -32,6 +32,8 @@ spec: value: - name: getBlobRetryCount value: + - name: publicAccessLevel + value: ``` {{% alert title="Warning" color="warning" %}} The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described [here]({{< ref component-secrets.md >}}). @@ -46,6 +48,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr | container | Y | Output | The name of the Blob Storage container to write to | `myexamplecontainer` | | decodeBase64 | N | Output | Configuration to decode base64 file content before saving to Blob Storage. (In case of saving a file with binary content). `true` is the only allowed positive value. Other positive variations like `"True", "1"` are not acceptable. Defaults to `false` | `true`, `false` | | getBlobRetryCount | N | Output | Specifies the maximum number of HTTP GET requests that will be made while reading from a RetryReader Defaults to `10` | `1`, `2` +| publicAccessLevel | N | Output | Specifies whether data in the container may be accessed publicly and the level of access (only it's used if the container is created by dapr). Defaults to `none` | `blob`, `container`, `none` ## Binding support From 5edac2577f0a15ad4acd8744e6654bbf7d506b04 Mon Sep 17 00:00:00 2001 From: Javier Vela Date: Sat, 9 Oct 2021 05:57:46 +0200 Subject: [PATCH 02/17] Update daprdocs/content/en/reference/components-reference/supported-bindings/blobstorage.md Co-authored-by: greenie-msft <56556602+greenie-msft@users.noreply.github.com> --- .../components-reference/supported-bindings/blobstorage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/blobstorage.md b/daprdocs/content/en/reference/components-reference/supported-bindings/blobstorage.md index bb8dcdb69..6929238ed 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/blobstorage.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/blobstorage.md @@ -48,7 +48,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr | container | Y | Output | The name of the Blob Storage container to write to | `myexamplecontainer` | | decodeBase64 | N | Output | Configuration to decode base64 file content before saving to Blob Storage. (In case of saving a file with binary content). `true` is the only allowed positive value. Other positive variations like `"True", "1"` are not acceptable. Defaults to `false` | `true`, `false` | | getBlobRetryCount | N | Output | Specifies the maximum number of HTTP GET requests that will be made while reading from a RetryReader Defaults to `10` | `1`, `2` -| publicAccessLevel | N | Output | Specifies whether data in the container may be accessed publicly and the level of access (only it's used if the container is created by dapr). Defaults to `none` | `blob`, `container`, `none` +| publicAccessLevel | N | Output | Specifies whether data in the container may be accessed publicly and the level of access (only used if the container is created by Dapr). Defaults to `none` | `blob`, `container`, `none` ## Binding support From aa8d5bfc45363be71ee950993eacb9c4396eb15f Mon Sep 17 00:00:00 2001 From: Phil Kedy Date: Mon, 18 Oct 2021 18:18:18 -0400 Subject: [PATCH 03/17] Adding instructions to update CRDs prior to upgrading via Helm --- .../hosting/kubernetes/kubernetes-upgrade.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-upgrade.md b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-upgrade.md index f4697792d..80a795a29 100644 --- a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-upgrade.md +++ b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-upgrade.md @@ -49,14 +49,26 @@ Then proceed with the `dapr upgrade --runtime-version {{% dapr-latest-version lo From version 1.0.0 onwards, upgrading Dapr using Helm is no longer a disruptive action since existing certificate values will automatically be re-used. -1. Upgrade Dapr from 1.0.0 (or newer) to any [NEW VERSION] > v1.0.0: +1. Upgrade Dapr from 1.0.0 (or newer) to any [NEW VERSION] > 1.0.0: + + *Helm does not handle upgrading CRDs, so you will need to perform that manually. CRDs are backward-compatible and should only be installed forward.* + + ***Note**: The Dapr version is included in the commands below* + + For version {{% dapr-latest-version long="true" %}}: + + ```bash + kubectl replace -f https://raw.githubusercontent.com/dapr/dapr/v{{% dapr-latest-version long="true" %}}/charts/dapr/crds/components.yaml + kubectl replace -f https://raw.githubusercontent.com/dapr/dapr/v{{% dapr-latest-version long="true" %}}/charts/dapr/crds/configuration.yaml + kubectl replace -f https://raw.githubusercontent.com/dapr/dapr/v{{% dapr-latest-version long="true" %}}/charts/dapr/crds/subscription.yaml + ``` ```bash helm repo update ``` ```bash - helm upgrade dapr dapr/dapr --version [NEW VERSION] --namespace dapr-system --wait + helm upgrade dapr dapr/dapr --version {{% dapr-latest-version long="true" %}} --namespace dapr-system --wait ``` *If you're using a values file, remember to add the `--values` option when running the upgrade command.* From fabda714adb92ea8a9dd5a984e54930684eb8ab8 Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Wed, 20 Oct 2021 23:01:54 +0800 Subject: [PATCH 04/17] Update cron.md --- .../supported-bindings/cron.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md b/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md index 70d6d9599..719329a74 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md @@ -59,6 +59,20 @@ For ease of use, the Dapr cron binding also supports few shortcuts: * `@every 15s` where `s` is seconds, `m` minutes, and `h` hours * `@daily` or `@hourly` which runs at that period from the time the binding is initialized +## Listen to the cron binding + +After setting up the cron binding, all we need to do is listen on an endpoint that matches the name of our component. let's assume the is `scheduled`. Note that this will be made as a HTTP `POST` request. The example below shows how a simple Node.js Express application can receive calls on the `/scheduled` endpoint and write a message to the console. + +```js +app.post('/scheduled', async function(req, res){ + console.log("scheduled endpoint called", req.body) + res.status(200).send() +}); +``` + +If we run this, we'll see that the /scheduled endpoint is called every five minutes by the Dapr sidecar. + + ## Binding support This component supports both **input and output** binding interfaces. @@ -74,3 +88,4 @@ This component supports **output binding** with the following operations: - [How-To: Trigger application with input binding]({{< ref howto-triggers.md >}}) - [How-To: Use bindings to interface with external resources]({{< ref howto-bindings.md >}}) - [Bindings API reference]({{< ref bindings_api.md >}}) +- [Scheduled tasks with the Cron binding in Dapr](https://markheath.net/post/dapr-cron-binding) From b1f6af10e48084088500db6653ef8244d5da6037 Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Fri, 22 Oct 2021 13:08:05 +0800 Subject: [PATCH 05/17] Update daprdocs/content/en/reference/components-reference/supported-bindings/cron.md Co-authored-by: greenie-msft <56556602+greenie-msft@users.noreply.github.com> --- .../reference/components-reference/supported-bindings/cron.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md b/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md index 719329a74..d6f0680c2 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md @@ -61,7 +61,7 @@ For ease of use, the Dapr cron binding also supports few shortcuts: ## Listen to the cron binding -After setting up the cron binding, all we need to do is listen on an endpoint that matches the name of our component. let's assume the is `scheduled`. Note that this will be made as a HTTP `POST` request. The example below shows how a simple Node.js Express application can receive calls on the `/scheduled` endpoint and write a message to the console. +After setting up the cron binding, all you need to do is listen on an endpoint that matches the name of your component. Assume the is `scheduled`. Note that this will be made as a HTTP `POST` request. The below example shows how a simple Node.js Express application can receive calls on the `/scheduled` endpoint and write a message to the console. ```js app.post('/scheduled', async function(req, res){ From a2378a250ca2159c2bc05bfcf8b1ec636a490f49 Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Fri, 22 Oct 2021 13:08:11 +0800 Subject: [PATCH 06/17] Update daprdocs/content/en/reference/components-reference/supported-bindings/cron.md Co-authored-by: greenie-msft <56556602+greenie-msft@users.noreply.github.com> --- .../en/reference/components-reference/supported-bindings/cron.md | 1 - 1 file changed, 1 deletion(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md b/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md index d6f0680c2..53f25adf5 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md @@ -88,4 +88,3 @@ This component supports **output binding** with the following operations: - [How-To: Trigger application with input binding]({{< ref howto-triggers.md >}}) - [How-To: Use bindings to interface with external resources]({{< ref howto-bindings.md >}}) - [Bindings API reference]({{< ref bindings_api.md >}}) -- [Scheduled tasks with the Cron binding in Dapr](https://markheath.net/post/dapr-cron-binding) From 22ea0b39d299b6d139eefb695366211c537d0ea6 Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Fri, 22 Oct 2021 13:08:26 +0800 Subject: [PATCH 07/17] Update daprdocs/content/en/reference/components-reference/supported-bindings/cron.md Co-authored-by: greenie-msft <56556602+greenie-msft@users.noreply.github.com> --- .../reference/components-reference/supported-bindings/cron.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md b/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md index 53f25adf5..63c721e7b 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md @@ -70,7 +70,7 @@ app.post('/scheduled', async function(req, res){ }); ``` -If we run this, we'll see that the /scheduled endpoint is called every five minutes by the Dapr sidecar. +When running this code, note that the `/scheduled` endpoint is called every five minutes by the Dapr sidecar. ## Binding support From fda162c57bd85d247d61fc3a7da5acfff9551442 Mon Sep 17 00:00:00 2001 From: Maarten Mulders Date: Sat, 23 Oct 2021 21:20:15 +0200 Subject: [PATCH 08/17] Make link to metrics-port work again --- daprdocs/content/en/reference/environment/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/environment/_index.md b/daprdocs/content/en/reference/environment/_index.md index 7eb1bf339..f60d7d256 100644 --- a/daprdocs/content/en/reference/environment/_index.md +++ b/daprdocs/content/en/reference/environment/_index.md @@ -15,6 +15,6 @@ The following table lists the environment variables used by the Dapr runtime, CL | APP_API_TOKEN | Your application | The token used by the application to authenticate requests from Dapr API. Read [authenticate requests from Dapr using token authentication]({{< ref app-api-token >}}) for more information. | | DAPR_HTTP_PORT | Your application | The HTTP port that the Dapr sidecar is listening on. Your application should use this variable to connect to Dapr sidecar instead of hardcoding the port value. Set by the Dapr CLI run command for self hosted or injected by the dapr-sidecar-injector into all the containers in the pod. | | DAPR_GRPC_PORT | Your application | The gRPC port that the Dapr sidecar is listening on. Your application should use this variable to connect to Dapr sidecar instead of hardcoding the port value. Set by the Dapr CLI run command for self hosted or injected by the dapr-sidecar-injector into all the containers in the pod. | -| DAPR_METRICS_PORT | Your application | The HTTP [Prometheus]({{< ref prometheus >}}) port that Dapr sends its metrics information to. Your application can use this variable to send its application specific metrics to have both Dapr metrics and application metrics together. See [metrics-port] ({{< ref arguments-annotations-overview>}}) for more information | +| DAPR_METRICS_PORT | Your application | The HTTP [Prometheus]({{< ref prometheus >}}) port that Dapr sends its metrics information to. Your application can use this variable to send its application specific metrics to have both Dapr metrics and application metrics together. See [metrics-port]({{< ref arguments-annotations-overview>}}) for more information | | DAPR_API_TOKEN | Dapr sidecar | The token used for Dapr API authentication for requests from the application. Read [enable API token authentication in Dapr]({{< ref api-token >}}) for more information. | | NAMESPACE | Dapr sidecar | Used to specify a component's [namespace in self-hosted mode]({{< ref component-scopes >}}) | From 11d2697f94c90d44035c11f587632d278cf3a244 Mon Sep 17 00:00:00 2001 From: Phil Kedy Date: Tue, 26 Oct 2021 18:32:29 -0400 Subject: [PATCH 09/17] Tweaks per PR --- .../en/operations/hosting/kubernetes/kubernetes-upgrade.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-upgrade.md b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-upgrade.md index 80a795a29..c9cac3b05 100644 --- a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-upgrade.md +++ b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-upgrade.md @@ -51,9 +51,9 @@ From version 1.0.0 onwards, upgrading Dapr using Helm is no longer a disruptive 1. Upgrade Dapr from 1.0.0 (or newer) to any [NEW VERSION] > 1.0.0: - *Helm does not handle upgrading CRDs, so you will need to perform that manually. CRDs are backward-compatible and should only be installed forward.* + *Helm does not handle upgrading CRDs, so you need to perform that manually. CRDs are backward-compatible and should only be installed forward.* - ***Note**: The Dapr version is included in the commands below* + >Note: The Dapr version is included in the commands below. For version {{% dapr-latest-version long="true" %}}: From 6d49b942b2850a9e89d07c6e6c52c34418bda8b4 Mon Sep 17 00:00:00 2001 From: Ori Zohar Date: Tue, 26 Oct 2021 16:22:01 -0700 Subject: [PATCH 10/17] DaprCon notice update --- daprdocs/content/en/_index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daprdocs/content/en/_index.md b/daprdocs/content/en/_index.md index 6ca2cff4c..fd2858b3d 100644 --- a/daprdocs/content/en/_index.md +++ b/daprdocs/content/en/_index.md @@ -8,12 +8,12 @@ no_list: true
DaprCon logo - Join us for DaprCon on October 19th-20th, 2021! + Watch DaprCon sessions on-demand!

- The first ever DaprCon will take place October 19th-20th, 2021 virtually! Tune in for free and attend technical sessions, panels and real world examples from the community on building applications with Dapr!

Learn more >> + The first ever DaprCon took place October 19th-20th, 2021. Read this recap and find links to all on-demand content

Learn more >>

- +
From 9988188cd7983876da0795949b26cbd10ab7b720 Mon Sep 17 00:00:00 2001 From: Will Tsai Date: Fri, 29 Oct 2021 14:00:46 -0700 Subject: [PATCH 11/17] added cloudevent examples --- .../pubsub/howto-publish-subscribe.md | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md b/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md index 20f49f250..ca2c4289d 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md +++ b/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md @@ -486,6 +486,33 @@ If you want to use your own custom CloudEvent, make sure to specify the content Read about content types [here](#content-types), and about the [Cloud Events message format]({{< ref "pubsub-overview.md#cloud-events-message-format" >}}). +#### Example + +{{< tabs "Dapr CLI" "HTTP API (Bash)" "HTTP API (PowerShell)">}} + +{{% codetab %}} +Publish a custom CloudEvent to the `deathStarStatus` topic: +```bash +dapr publish --publish-app-id testpubsub --pubsub pubsub --topic deathStarStatus --data '{"specversion" : "1.0", "type" : "com.dapr.cloudevent.sent", "source" : "testcloudeventspubsub", "subject" : "Cloud Events Test", "id" : "someCloudEventId", "time" : "2021-08-02T09:00:00Z", "datacontenttype" : "application/cloudevents+json", "data" : {"status": "completed"}}' +``` +{{% /codetab %}} + +{{% codetab %}} +Publish a custom CloudEvent to the `deathStarStatus` topic: +```bash +curl -X POST http://localhost:3500/v1.0/publish/pubsub/deathStarStatus -H "Content-Type: application/cloudevents+json" -d '{"specversion" : "1.0", "type" : "com.dapr.cloudevent.sent", "source" : "testcloudeventspubsub", "subject" : "Cloud Events Test", "id" : "someCloudEventId", "time" : "2021-08-02T09:00:00Z", "datacontenttype" : "application/cloudevents+json", "data" : {"status": "completed"}}' +``` +{{% /codetab %}} + +{{% codetab %}} +Publish a custom CloudEvent to the `deathStarStatus` topic: +```powershell +Invoke-RestMethod -Method Post -ContentType 'application/cloudevents+json' -Body '{"specversion" : "1.0", "type" : "com.dapr.cloudevent.sent", "source" : "testcloudeventspubsub", "subject" : "Cloud Events Test", "id" : "someCloudEventId", "time" : "2021-08-02T09:00:00Z", "datacontenttype" : "application/cloudevents+json", "data" : {"status": "completed"}}' -Uri 'http://localhost:3500/v1.0/publish/pubsub/deathStarStatus' +``` +{{% /codetab %}} + +{{< /tabs >}} + ## Next steps - Try the [Pub/Sub quickstart sample](https://github.com/dapr/quickstarts/tree/master/pub-sub) @@ -494,4 +521,4 @@ Read about content types [here](#content-types), and about the [Cloud Events mes - Learn about [message time-to-live]({{< ref pubsub-message-ttl.md >}}) - Learn [how to configure Pub/Sub components with multiple namespaces]({{< ref pubsub-namespaces.md >}}) - List of [pub/sub components]({{< ref setup-pubsub >}}) -- Read the [API reference]({{< ref pubsub_api.md >}}) +- Read the [API reference]({{< ref pubsub_api.md >}}) \ No newline at end of file From 17c16df9dd886ebc4bb8f3ae5f6475dacc35cb2d Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Sat, 30 Oct 2021 10:32:39 +0800 Subject: [PATCH 12/17] Update daprdocs/content/en/reference/components-reference/supported-bindings/cron.md Co-authored-by: greenie-msft <56556602+greenie-msft@users.noreply.github.com> --- .../reference/components-reference/supported-bindings/cron.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md b/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md index 63c721e7b..5e884c019 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md @@ -61,7 +61,7 @@ For ease of use, the Dapr cron binding also supports few shortcuts: ## Listen to the cron binding -After setting up the cron binding, all you need to do is listen on an endpoint that matches the name of your component. Assume the is `scheduled`. Note that this will be made as a HTTP `POST` request. The below example shows how a simple Node.js Express application can receive calls on the `/scheduled` endpoint and write a message to the console. +After setting up the cron binding, all you need to do is listen on an endpoint that matches the name of your component. Assume the is `scheduled`. This will be made as a HTTP `POST` request. The below example shows how a simple Node.js Express application can receive calls on the `/scheduled` endpoint and write a message to the console. ```js app.post('/scheduled', async function(req, res){ From 9660b6d469c76f7daefb2a58a84f47b54bb65f50 Mon Sep 17 00:00:00 2001 From: Aaron Crawfis Date: Tue, 2 Nov 2021 14:46:25 -0700 Subject: [PATCH 13/17] Add target to shortcode --- daprdocs/layouts/shortcodes/button.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/layouts/shortcodes/button.html b/daprdocs/layouts/shortcodes/button.html index 5ab0ddc9b..93158c2f5 100644 --- a/daprdocs/layouts/shortcodes/button.html +++ b/daprdocs/layouts/shortcodes/button.html @@ -5,4 +5,4 @@ {{- if $page -}}{{- $link = ref . $page -}}{{- end -}} -{{ $text }} +{{ $text }} From e01c92582132389019b486f2a50f098943160b70 Mon Sep 17 00:00:00 2001 From: Aaron Crawfis Date: Tue, 2 Nov 2021 14:49:57 -0700 Subject: [PATCH 14/17] Add new tab be configurable --- daprdocs/layouts/shortcodes/button.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daprdocs/layouts/shortcodes/button.html b/daprdocs/layouts/shortcodes/button.html index 93158c2f5..ea60f81b1 100644 --- a/daprdocs/layouts/shortcodes/button.html +++ b/daprdocs/layouts/shortcodes/button.html @@ -2,7 +2,8 @@ {{ $page := .Get "page" }} {{ $link := .Get "link" | default "#" }} {{ $text := .Get "text" }} +{{ $opentab := .Get "newtab" | default False }} {{- if $page -}}{{- $link = ref . $page -}}{{- end -}} -{{ $text }} +{{ $text }} From abfdd53b2f63fc5cd2ac6cd6d95809ee8608a4ea Mon Sep 17 00:00:00 2001 From: Aaron Crawfis Date: Tue, 2 Nov 2021 14:59:08 -0700 Subject: [PATCH 15/17] Add option for new tab to be opt in --- daprdocs/content/en/contributing/contributing-docs.md | 6 ++++-- daprdocs/layouts/shortcodes/button.html | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/daprdocs/content/en/contributing/contributing-docs.md b/daprdocs/content/en/contributing/contributing-docs.md index 1e73bda86..16567f2fc 100644 --- a/daprdocs/content/en/contributing/contributing-docs.md +++ b/daprdocs/content/en/contributing/contributing-docs.md @@ -334,6 +334,8 @@ The shortcode would be: To create a button in a webpage, use the `button` shortcode. +An optional "newtab" parameter will indicate if the page should open in a new tab. Options are "true" or "false". Default is "false", where the page will open in the same tab. + #### Link to an external page ``` @@ -346,10 +348,10 @@ To create a button in a webpage, use the `button` shortcode. You can also reference pages in your button as well: ``` -{{}} +{{}} ``` -{{< button text="My Button" page="contributing" >}} +{{< button text="My Button" page="contributing" newtab="true" >}} #### Button colors diff --git a/daprdocs/layouts/shortcodes/button.html b/daprdocs/layouts/shortcodes/button.html index ea60f81b1..24419146c 100644 --- a/daprdocs/layouts/shortcodes/button.html +++ b/daprdocs/layouts/shortcodes/button.html @@ -2,8 +2,8 @@ {{ $page := .Get "page" }} {{ $link := .Get "link" | default "#" }} {{ $text := .Get "text" }} -{{ $opentab := .Get "newtab" | default False }} +{{ $newtab := .Get "newtab" | default "false" }} {{- if $page -}}{{- $link = ref . $page -}}{{- end -}} -{{ $text }} +{{ $text }} From f5cdf8941d19e2b850e85b81de5a8b0700d69ead Mon Sep 17 00:00:00 2001 From: DarinShapiroMS Date: Wed, 3 Nov 2021 13:18:32 -0700 Subject: [PATCH 16/17] fixed typo in component yaml The attribute "value" was spelled "vale" --- .../supported-bindings/kubernetes-binding.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/kubernetes-binding.md b/daprdocs/content/en/reference/components-reference/supported-bindings/kubernetes-binding.md index e3d759f39..11a1de338 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/kubernetes-binding.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/kubernetes-binding.md @@ -25,7 +25,7 @@ spec: - name: namespace value: - name: resyncPeriodInSec - vale: "" + value: "" ``` ## Spec metadata fields From 1cab3a65598af332bfddfbf64844098a1daa4599 Mon Sep 17 00:00:00 2001 From: greenie-msft <56556602+greenie-msft@users.noreply.github.com> Date: Thu, 4 Nov 2021 14:09:03 -0700 Subject: [PATCH 17/17] Update cron.md Change to [NAME] to avoid Hugo from trying to interpolate HTML --- .../reference/components-reference/supported-bindings/cron.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md b/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md index 5e884c019..44649f354 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md @@ -61,7 +61,7 @@ For ease of use, the Dapr cron binding also supports few shortcuts: ## Listen to the cron binding -After setting up the cron binding, all you need to do is listen on an endpoint that matches the name of your component. Assume the is `scheduled`. This will be made as a HTTP `POST` request. The below example shows how a simple Node.js Express application can receive calls on the `/scheduled` endpoint and write a message to the console. +After setting up the cron binding, all you need to do is listen on an endpoint that matches the name of your component. Assume the [NAME] is `scheduled`. This will be made as a HTTP `POST` request. The below example shows how a simple Node.js Express application can receive calls on the `/scheduled` endpoint and write a message to the console. ```js app.post('/scheduled', async function(req, res){