From b47b51401f22ef7b991da156919dbcc3de1ee4c8 Mon Sep 17 00:00:00 2001 From: Marcos Lilljedahl Date: Wed, 23 Mar 2022 13:59:39 -0300 Subject: [PATCH 1/3] Attempt to automatically select OS tab based on user user-agent This is a quick fix to attempt to automatically select the user's OS tab on the pages that requires so which potentially avoids users following incorrect docs Signed-off-by: Marcos Lilljedahl --- docs/core-concepts/1203-client.md | 2 +- docs/getting-started/1200-local-dev.md | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/core-concepts/1203-client.md b/docs/core-concepts/1203-client.md index 0655651a..78151611 100644 --- a/docs/core-concepts/1203-client.md +++ b/docs/core-concepts/1203-client.md @@ -32,7 +32,7 @@ You can use a local socket in an action: import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; - + diff --git a/docs/getting-started/1200-local-dev.md b/docs/getting-started/1200-local-dev.md index 45f8a556..f1ab70d5 100644 --- a/docs/getting-started/1200-local-dev.md +++ b/docs/getting-started/1200-local-dev.md @@ -12,7 +12,10 @@ Within 5 minutes, you will have a local CI/CD loop and run your first test & bui import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; - Date: Wed, 23 Mar 2022 15:32:08 -0300 Subject: [PATCH 2/3] Add markdownlint to Makefile We're currently running markdownlint in CI and we didn't have a target for that in our makefile. Adding that to prevent rejected PR's due to markdown linting errors Signed-off-by: Marcos Lilljedahl --- Makefile | 8 ++++++-- docs/core-concepts/1215-what-is-cue.md | 2 +- docs/getting-started/1200-local-dev.md | 6 +++--- docs/learn/1005-what_is_cue.md | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index ad5c733d..8776bfad 100644 --- a/Makefile +++ b/Makefile @@ -42,14 +42,14 @@ cuefmt: # Format all cue files .PHONY: cuelint cuelint: cuefmt # Lint and format all cue files - @test -z "$$(git status -s . | grep -e "^ M" | grep .cue | cut -d ' ' -f3 | tee /dev/stderr)" + @test -z "$$(git status -s . | grep -e "^ M" | grep "\.cue" | cut -d ' ' -f3 | tee /dev/stderr)" .PHONY: shellcheck shellcheck: # Run shellcheck shellcheck $$(find . -type f \( -iname \*.bats -o -iname \*.bash -o -iname \*.sh \) -not -path "*/node_modules/*" -not -path "*/bats-*/*") .PHONY: lint -lint: shellcheck cuelint golint docslint # Lint everything +lint: shellcheck cuelint golint docslint mdlint # Lint everything .PHONY: integration integration: core-integration universe-test doc-test # Run all integration tests @@ -82,6 +82,10 @@ docs: dagger # Generate docs docslint: docs # Generate & lint docs @test -z "$$(git status -s . | grep -e "^ M" | grep docs/reference | cut -d ' ' -f3 | tee /dev/stderr)" +.PHONY: mdlint +mdlint: # Markdown lint for web + @markdownlint ./docs README.md + .PHONY: web web: # Run the website locally yarn --cwd "./website" install diff --git a/docs/core-concepts/1215-what-is-cue.md b/docs/core-concepts/1215-what-is-cue.md index 2a20fcc6..d02b25d3 100644 --- a/docs/core-concepts/1215-what-is-cue.md +++ b/docs/core-concepts/1215-what-is-cue.md @@ -147,7 +147,7 @@ Bob: ``` -The output here is a product of _*unifying*_ the `#Person` _definition_ with an object that contains _concrete values_ each of which is the product of unifying the concrete value with the _types_ and _constraints_ declared by the field in the definition. [Try it in the CUE playground](https://cuelang.org/play/?id=nAUx1-VlrY4#cue@export@yaml) +The output here is a product of _unifying_ the `#Person` _definition_ with an object that contains _concrete values_ each of which is the product of unifying the concrete value with the _types_ and _constraints_ declared by the field in the definition. [Try it in the CUE playground](https://cuelang.org/play/?id=nAUx1-VlrY4#cue@export@yaml) ### Default Values and the Nature of Inheritance diff --git a/docs/getting-started/1200-local-dev.md b/docs/getting-started/1200-local-dev.md index f1ab70d5..19e2f78b 100644 --- a/docs/getting-started/1200-local-dev.md +++ b/docs/getting-started/1200-local-dev.md @@ -13,9 +13,9 @@ Within 5 minutes, you will have a local CI/CD loop and run your first test & bui import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; Date: Thu, 24 Mar 2022 15:55:24 -0300 Subject: [PATCH 3/3] Add BrowserOnly component to avoid SSG errors Signed-off-by: Marcos Lilljedahl --- docs/core-concepts/1203-client.md | 7 ++++++- docs/getting-started/1200-local-dev.md | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/core-concepts/1203-client.md b/docs/core-concepts/1203-client.md index 78151611..80afc27a 100644 --- a/docs/core-concepts/1203-client.md +++ b/docs/core-concepts/1203-client.md @@ -31,8 +31,11 @@ You can use a local socket in an action: import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; +import BrowserOnly from '@docusaurus/BrowserOnly'; - + + {() => + @@ -48,6 +51,8 @@ import TabItem from '@theme/TabItem'; + } + ## Environment variables diff --git a/docs/getting-started/1200-local-dev.md b/docs/getting-started/1200-local-dev.md index 19e2f78b..f5ebb669 100644 --- a/docs/getting-started/1200-local-dev.md +++ b/docs/getting-started/1200-local-dev.md @@ -11,7 +11,10 @@ This guide shows you the Dagger way. Within 5 minutes, you will have a local CI/CD loop and run your first test & build pipeline. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; +import BrowserOnly from '@docusaurus/BrowserOnly'; + +{() => +} + + :::tip Now that we are comfortable with our local CI/CD loop, let us configure a remote CI environment in the second part.