From 0710ba55fe973b0865e46ef4de9bdb875b07289b Mon Sep 17 00:00:00 2001 From: newbe36524 Date: Mon, 5 Apr 2021 15:00:02 +0800 Subject: [PATCH 1/9] Replace button by alert section since there is some issue about crowdin --- daprdocs/content/en/getting-started/_index.md | 5 +++-- daprdocs/content/en/getting-started/get-started-api.md | 4 +++- daprdocs/content/en/getting-started/get-started-component.md | 4 +++- daprdocs/content/en/getting-started/install-dapr-cli.md | 5 +++-- daprdocs/content/en/getting-started/install-dapr-selfhost.md | 5 +++-- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/daprdocs/content/en/getting-started/_index.md b/daprdocs/content/en/getting-started/_index.md index bfcf1a98f..8330ffd79 100644 --- a/daprdocs/content/en/getting-started/_index.md +++ b/daprdocs/content/en/getting-started/_index.md @@ -22,5 +22,6 @@ The following steps in this guide are: 1. Configure a component 1. Explore Dapr quickstarts -First step: Install the Dapr CLI >> - +{{% alert color="primary" %}} +[First step: Install the Dapr CLI >>]({{< ref install-dapr-cli.md >}}) +{{% /alert %}} diff --git a/daprdocs/content/en/getting-started/get-started-api.md b/daprdocs/content/en/getting-started/get-started-api.md index b795de4f0..4683eb918 100644 --- a/daprdocs/content/en/getting-started/get-started-api.md +++ b/daprdocs/content/en/getting-started/get-started-api.md @@ -101,4 +101,6 @@ Exit the redis-cli with: exit ``` -Next step: Define a component >> +{{% alert color="primary" %}} +[Next step: Define a component >>]({{< ref get-started-component.md >}}) +{{% /alert %}} diff --git a/daprdocs/content/en/getting-started/get-started-component.md b/daprdocs/content/en/getting-started/get-started-component.md index 73c13bdfd..e64fa18bc 100644 --- a/daprdocs/content/en/getting-started/get-started-component.md +++ b/daprdocs/content/en/getting-started/get-started-component.md @@ -90,4 +90,6 @@ You should see output with the secret you stored in the JSON file. {"my-secret":"I'm Batman"} ``` -Next step: Explore Dapr quickstarts >> +{{% alert color="primary" %}} +[Next step: Explore Dapr quickstarts >>]({{< ref quickstarts.md >}}) +{{% /alert %}} \ No newline at end of file diff --git a/daprdocs/content/en/getting-started/install-dapr-cli.md b/daprdocs/content/en/getting-started/install-dapr-cli.md index f6ea8a6be..8da604d0a 100644 --- a/daprdocs/content/en/getting-started/install-dapr-cli.md +++ b/daprdocs/content/en/getting-started/install-dapr-cli.md @@ -110,5 +110,6 @@ Flags: Use "dapr [command] --help" for more information about a command. ``` -Next step: Initialize Dapr >> - +{{% alert color="primary" %}} +[Next step: Initialize Dapr >>]({{< ref install-dapr-selfhost.md >}}) +{{% /alert %}} \ No newline at end of file diff --git a/daprdocs/content/en/getting-started/install-dapr-selfhost.md b/daprdocs/content/en/getting-started/install-dapr-selfhost.md index c6ab64b43..218bd826b 100644 --- a/daprdocs/content/en/getting-started/install-dapr-selfhost.md +++ b/daprdocs/content/en/getting-started/install-dapr-selfhost.md @@ -109,5 +109,6 @@ You will see the Dapr config, Dapr binaries directory, and the default component {{< /tabs >}} -Next step: Use the Dapr API >> - +{{% alert color="primary" %}} +[Next step: Use the Dapr API >>]({{< ref get-started-api.md >}}) +{{% /alert %}} \ No newline at end of file From 804dcac1ef6177a3e79c94146f1ca8a2397faeaa Mon Sep 17 00:00:00 2001 From: Aaron Crawfis Date: Mon, 5 Apr 2021 12:53:15 -0700 Subject: [PATCH 2/9] Add token flag --- .github/workflows/azure-static-web-apps-proud-bay-0e9e0e81e.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/azure-static-web-apps-proud-bay-0e9e0e81e.yml b/.github/workflows/azure-static-web-apps-proud-bay-0e9e0e81e.yml index 0028230f8..3c14f7651 100644 --- a/.github/workflows/azure-static-web-apps-proud-bay-0e9e0e81e.yml +++ b/.github/workflows/azure-static-web-apps-proud-bay-0e9e0e81e.yml @@ -29,6 +29,7 @@ jobs: with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PROUD_BAY_0E9E0E81E }} repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) + skip_deploy_on_missing_secrets: true action: "upload" ###### Repository/Build Configurations - These values can be configured to match your app requirements. ###### # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig @@ -48,4 +49,5 @@ jobs: uses: Azure/static-web-apps-deploy@v0.0.1-preview with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PROUD_BAY_0E9E0E81E }} + skip_deploy_on_missing_secrets: true action: "close" From eace5730f1199e61a009bec5fe8071d62aab7c0a Mon Sep 17 00:00:00 2001 From: Aaron Crawfis Date: Mon, 5 Apr 2021 13:28:22 -0700 Subject: [PATCH 3/9] Add button shortcode --- daprdocs/layouts/shortcodes/button.html | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 daprdocs/layouts/shortcodes/button.html diff --git a/daprdocs/layouts/shortcodes/button.html b/daprdocs/layouts/shortcodes/button.html new file mode 100644 index 000000000..54ca0c714 --- /dev/null +++ b/daprdocs/layouts/shortcodes/button.html @@ -0,0 +1,7 @@ +{{ $color := .Get "color" | default "primary" }} +{{ $page := .Get "page" }} +{{ $link := .Get "link" | default "#" }} + +{{- if $page -}}{{- $link = ref . $page -}}{{- end -}} + +{{ .Inner }} From 08b8bf0c150bc0005e6be22a4782bec08185a522 Mon Sep 17 00:00:00 2001 From: Aaron Crawfis Date: Mon, 5 Apr 2021 13:35:37 -0700 Subject: [PATCH 4/9] Add regex to button --- 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 54ca0c714..d931eab64 100644 --- a/daprdocs/layouts/shortcodes/button.html +++ b/daprdocs/layouts/shortcodes/button.html @@ -4,4 +4,4 @@ {{- if $page -}}{{- $link = ref . $page -}}{{- end -}} -{{ .Inner }} +{{ .Inner | replaceRE "(.*)\n" "$1" }} From c58a9faa79196f6ccecec374c2e178f042e40ffe Mon Sep 17 00:00:00 2001 From: Aaron Crawfis Date: Mon, 5 Apr 2021 13:47:28 -0700 Subject: [PATCH 5/9] Update to parameter instead of inner --- 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 d931eab64..5ab0ddc9b 100644 --- a/daprdocs/layouts/shortcodes/button.html +++ b/daprdocs/layouts/shortcodes/button.html @@ -1,7 +1,8 @@ {{ $color := .Get "color" | default "primary" }} {{ $page := .Get "page" }} {{ $link := .Get "link" | default "#" }} +{{ $text := .Get "text" }} {{- if $page -}}{{- $link = ref . $page -}}{{- end -}} -{{ .Inner | replaceRE "(.*)\n" "$1" }} +{{ $text }} From 2fba3f8c052dd1ffed05a5e28f5e3f4777f92acf Mon Sep 17 00:00:00 2001 From: Aaron Crawfis Date: Mon, 5 Apr 2021 13:47:35 -0700 Subject: [PATCH 6/9] Add docs --- .../en/contributing/contributing-docs.md | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/daprdocs/content/en/contributing/contributing-docs.md b/daprdocs/content/en/contributing/contributing-docs.md index 3fa66cbe5..c782e6300 100644 --- a/daprdocs/content/en/contributing/contributing-docs.md +++ b/daprdocs/content/en/contributing/contributing-docs.md @@ -127,6 +127,10 @@ As an example, for this specific section the complete reference to the page and {{}} ``` +## Shortcodes + +The following are useful shortcodes for writing Dapr documentation + ### Images The markdown spec used by Docsy and Hugo does not give an option to resize images using markdown notation. Instead, raw HTML is used. @@ -230,6 +234,46 @@ The shortcode would be: {{}} ``` +### Buttons + +To create a button in a webpage, use the `button` shortcode. + +#### Link to an external page + +``` +{{}} +``` + +{{< button text="My Button" link="https://example.com" >}} + +#### Link to another docs page + +You can also reference pages in your button as well: +``` +{{}} +``` + +{{< button text="My Button" page="contributing" >}} + +#### Button colors + +You can customize the colors using the Bootstrap colors: +``` +{{}} +{{}} +{{}} +{{}} +{{}} +{{}} +``` + +{{< button text="My Button" link="https://example.com" color="primary" >}} +{{< button text="My Button" link="https://example.com" color="secondary" >}} +{{< button text="My Button" link="https://example.com" color="success" >}} +{{< button text="My Button" link="https://example.com" color="danger" >}} +{{< button text="My Button" link="https://example.com" color="warning" >}} +{{< button text="My Button" link="https://example.com" color="info" >}} + ### References - [Docsy authoring guide](https://www.docsy.dev/docs/adding-content/) From 8778e50f4c832399a9a274b82a3f0971940f231f Mon Sep 17 00:00:00 2001 From: newbe36524 Date: Tue, 6 Apr 2021 16:24:28 +0800 Subject: [PATCH 7/9] update to button tag --- daprdocs/content/en/getting-started/_index.md | 4 +--- daprdocs/content/en/getting-started/get-started-api.md | 4 +--- daprdocs/content/en/getting-started/get-started-component.md | 4 +--- daprdocs/content/en/getting-started/install-dapr-cli.md | 4 +--- daprdocs/content/en/getting-started/install-dapr-selfhost.md | 4 +--- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/daprdocs/content/en/getting-started/_index.md b/daprdocs/content/en/getting-started/_index.md index 8330ffd79..f82e9faca 100644 --- a/daprdocs/content/en/getting-started/_index.md +++ b/daprdocs/content/en/getting-started/_index.md @@ -22,6 +22,4 @@ The following steps in this guide are: 1. Configure a component 1. Explore Dapr quickstarts -{{% alert color="primary" %}} -[First step: Install the Dapr CLI >>]({{< ref install-dapr-cli.md >}}) -{{% /alert %}} +{{< button text="First step: Install the Dapr CLI >>" page="install-dapr-cli" >}} diff --git a/daprdocs/content/en/getting-started/get-started-api.md b/daprdocs/content/en/getting-started/get-started-api.md index 4683eb918..1e684538d 100644 --- a/daprdocs/content/en/getting-started/get-started-api.md +++ b/daprdocs/content/en/getting-started/get-started-api.md @@ -101,6 +101,4 @@ Exit the redis-cli with: exit ``` -{{% alert color="primary" %}} -[Next step: Define a component >>]({{< ref get-started-component.md >}}) -{{% /alert %}} +{{< button text="Next step: Define a component >>" page="get-started-component" >}} diff --git a/daprdocs/content/en/getting-started/get-started-component.md b/daprdocs/content/en/getting-started/get-started-component.md index e64fa18bc..4c026f242 100644 --- a/daprdocs/content/en/getting-started/get-started-component.md +++ b/daprdocs/content/en/getting-started/get-started-component.md @@ -90,6 +90,4 @@ You should see output with the secret you stored in the JSON file. {"my-secret":"I'm Batman"} ``` -{{% alert color="primary" %}} -[Next step: Explore Dapr quickstarts >>]({{< ref quickstarts.md >}}) -{{% /alert %}} \ No newline at end of file +{{< button text="Next step: Explore Dapr quickstarts >>" page="quickstarts" >}} diff --git a/daprdocs/content/en/getting-started/install-dapr-cli.md b/daprdocs/content/en/getting-started/install-dapr-cli.md index 8da604d0a..30a7cc743 100644 --- a/daprdocs/content/en/getting-started/install-dapr-cli.md +++ b/daprdocs/content/en/getting-started/install-dapr-cli.md @@ -110,6 +110,4 @@ Flags: Use "dapr [command] --help" for more information about a command. ``` -{{% alert color="primary" %}} -[Next step: Initialize Dapr >>]({{< ref install-dapr-selfhost.md >}}) -{{% /alert %}} \ No newline at end of file +{{< button text="Next step: Initialize Dapr >>" page="install-dapr-selfhost" >}} diff --git a/daprdocs/content/en/getting-started/install-dapr-selfhost.md b/daprdocs/content/en/getting-started/install-dapr-selfhost.md index 218bd826b..8afb8235a 100644 --- a/daprdocs/content/en/getting-started/install-dapr-selfhost.md +++ b/daprdocs/content/en/getting-started/install-dapr-selfhost.md @@ -109,6 +109,4 @@ You will see the Dapr config, Dapr binaries directory, and the default component {{< /tabs >}} -{{% alert color="primary" %}} -[Next step: Use the Dapr API >>]({{< ref get-started-api.md >}}) -{{% /alert %}} \ No newline at end of file +{{< button text="Next step: Use the Dapr API >>" page="get-started-api" >}} From de24b00ad9ceb91bdacdc76bf94f451e1deb937e Mon Sep 17 00:00:00 2001 From: Harry Kimpel Date: Tue, 6 Apr 2021 18:30:15 +0200 Subject: [PATCH 8/9] Fixed broken links in tracing section --- daprdocs/.gitignore | 1 + .../monitoring/tracing/supported-tracing-backends/newrelic.md | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 daprdocs/.gitignore diff --git a/daprdocs/.gitignore b/daprdocs/.gitignore new file mode 100644 index 000000000..c2658d7d1 --- /dev/null +++ b/daprdocs/.gitignore @@ -0,0 +1 @@ +node_modules/ diff --git a/daprdocs/content/en/operations/monitoring/tracing/supported-tracing-backends/newrelic.md b/daprdocs/content/en/operations/monitoring/tracing/supported-tracing-backends/newrelic.md index d2cb50fb3..a78b2e1dc 100644 --- a/daprdocs/content/en/operations/monitoring/tracing/supported-tracing-backends/newrelic.md +++ b/daprdocs/content/en/operations/monitoring/tracing/supported-tracing-backends/newrelic.md @@ -12,7 +12,7 @@ description: "Set-up New Relic for distributed tracing" ## Configure Dapr tracing -Dapr natively captures metrics and traces that can be send directly to New Relic. The easiest way to export these is by configuring Dapr to send the traces to [New Relic's Trace API](https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/trace-api/report-zipkin-format-traces-trace-api#existing-zipkin) using the Zipkin trace format. +Dapr natively captures metrics and traces that can be send directly to New Relic. The easiest way to export these is by configuring Dapr to send the traces to [New Relic's Trace API](https://docs.newrelic.com/docs/distributed-tracing/trace-api/report-zipkin-format-traces-trace-api/) using the Zipkin trace format. In order for the integration to send data to New Relic [Telemetry Data Platform](https://newrelic.com/platform/telemetry-data-platform), you need a [New Relic Insights Insert API key](https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys#insights-insert-key). @@ -108,7 +108,7 @@ All the data that is collected from Dapr, Kubernetes or any services that run on * [New Relic Account Signup](https://newrelic.com/signup) * [Telemetry Data Platform](https://newrelic.com/platform/telemetry-data-platform) * [Distributed Tracing](https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/get-started/introduction-distributed-tracing) -* [New Relic Trace API](https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/trace-api) +* [New Relic Trace API](https://docs.newrelic.com/docs/distributed-tracing/trace-api/introduction-trace-api/) * [New Relic Metric API](https://docs.newrelic.com/docs/telemetry-data-platform/get-data/apis/introduction-metric-api) * [Types of New Relic API keys](https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys) * [New Relic OpenTelemetry User Experience](https://blog.newrelic.com/product-news/opentelemetry-user-experience/) From 654a3fe97105bcc052544b618f14db8be415dbeb Mon Sep 17 00:00:00 2001 From: Harry Kimpel Date: Tue, 6 Apr 2021 18:34:46 +0200 Subject: [PATCH 9/9] Fixed broken links in tracing section --- .../monitoring/tracing/supported-tracing-backends/newrelic.md | 1 - 1 file changed, 1 deletion(-) diff --git a/daprdocs/content/en/operations/monitoring/tracing/supported-tracing-backends/newrelic.md b/daprdocs/content/en/operations/monitoring/tracing/supported-tracing-backends/newrelic.md index a78b2e1dc..11d382240 100644 --- a/daprdocs/content/en/operations/monitoring/tracing/supported-tracing-backends/newrelic.md +++ b/daprdocs/content/en/operations/monitoring/tracing/supported-tracing-backends/newrelic.md @@ -109,7 +109,6 @@ All the data that is collected from Dapr, Kubernetes or any services that run on * [Telemetry Data Platform](https://newrelic.com/platform/telemetry-data-platform) * [Distributed Tracing](https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/get-started/introduction-distributed-tracing) * [New Relic Trace API](https://docs.newrelic.com/docs/distributed-tracing/trace-api/introduction-trace-api/) -* [New Relic Metric API](https://docs.newrelic.com/docs/telemetry-data-platform/get-data/apis/introduction-metric-api) * [Types of New Relic API keys](https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys) * [New Relic OpenTelemetry User Experience](https://blog.newrelic.com/product-news/opentelemetry-user-experience/) * [Alerts and Applied Intelligence](https://docs.newrelic.com/docs/alerts-applied-intelligence)