From 9424e4e52a1802a52423c09ba4ee8533abc2cb4d Mon Sep 17 00:00:00 2001 From: Jonathan Matthews Date: Thu, 16 Nov 2023 13:51:37 +0000 Subject: [PATCH] docs/{concept,howto,tutorial}: promote About pages This change moves the content found at - /docs/concept/about-these-guides/ - /docs/howto/about-these-guides/ - /docs/tutorial/about-these-tutorials/ ... up one level, to their respective top-level containers. The original approach was taken to ensure that a user already inside any of these hierarchies (e.g. reading a tutorial) had an obviously clickable way to reach these pages' explanatory content. The top-level container links on the left hand nav now suit this purpose, rendering a separate "About" page redundant. This change necessarily removes the Netlify redirect from the top-level container page to the About page. The top-level container page contains a category index by default, and this index is left intact (instead of removing it with `index_hide:true`) to provide the {ctrl/cmd}-F "search on page" user with an easy route to any specific category sub-page they might wish to reach. The `hide_summary:true` parameter is used on some pages to exclude them from this automatically generated index, but without excluding them from the left hand nav. This shouldn't affect the content on the *excluded* page in any way. Pages are also updated to use the hugo `{{< tag "xyz" >}}` shortcode, as it was introduced after the relevant pages were originally written. Preview-Path: /docs/concept/ Preview-Path: /docs/howto/ Preview-Path: /docs/tutorial/ Preview-Path: /docs/concept/about-these-guides/ Preview-Path: /docs/howto/about-these-guides/ Preview-Path: /docs/tutorial/about-these-tutorials/ Signed-off-by: Jonathan Matthews Change-Id: I8ecdbc7953ceecfa5aec6b07cf30b1df56704a92 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1172243 TryBot-Result: CUEcueckoo Reviewed-by: Paul Jolly --- content/docs/concept/_en.md | 14 +++ content/docs/concept/about-these-guides/en.md | 13 --- .../docs/concept/about-these-guides/page.cue | 3 - content/docs/concept/find-a-guide/en.md | 1 + content/docs/concept/popular-guides/en.md | 1 + content/docs/howto/_en.md | 80 ++++++++++++++++ content/docs/howto/about-these-guides/en.md | 89 ------------------ .../howto/about-these-guides/gen_cache.cue | 18 ---- .../docs/howto/about-these-guides/page.cue | 3 - content/docs/howto/find-a-guide/en.md | 1 + content/docs/howto/gen_cache.cue | 16 ++++ content/docs/howto/popular-guides/en.md | 1 + content/docs/tutorial/_en.md | 17 ++++ .../docs/tutorial/about-these-tutorials/en.md | 15 --- .../tutorial/about-these-tutorials/page.cue | 3 - content/docs/tutorial/find-a-tutorial/en.md | 1 + content/docs/tutorial/new-to-cue/en.md | 1 + hugo/content/en/docs/concept/_index.md | 14 +++ .../docs/concept/about-these-guides/index.md | 13 --- .../en/docs/concept/find-a-guide/index.md | 1 + .../en/docs/concept/popular-guides/index.md | 1 + hugo/content/en/docs/howto/_index.md | 82 +++++++++++++++++ .../en/docs/howto/about-these-guides/index.md | 91 ------------------- .../en/docs/howto/find-a-guide/index.md | 1 + .../en/docs/howto/popular-guides/index.md | 1 + hugo/content/en/docs/tutorial/_index.md | 17 ++++ .../tutorial/about-these-tutorials/index.md | 15 --- .../en/docs/tutorial/find-a-tutorial/index.md | 1 + .../en/docs/tutorial/new-to-cue/index.md | 1 + internal/ci/netlify/netlify.cue | 9 -- netlify.toml | 18 ---- 31 files changed, 252 insertions(+), 290 deletions(-) delete mode 100644 content/docs/concept/about-these-guides/en.md delete mode 100644 content/docs/concept/about-these-guides/page.cue delete mode 100644 content/docs/howto/about-these-guides/en.md delete mode 100644 content/docs/howto/about-these-guides/gen_cache.cue delete mode 100644 content/docs/howto/about-these-guides/page.cue create mode 100644 content/docs/howto/gen_cache.cue delete mode 100644 content/docs/tutorial/about-these-tutorials/en.md delete mode 100644 content/docs/tutorial/about-these-tutorials/page.cue delete mode 100644 hugo/content/en/docs/concept/about-these-guides/index.md delete mode 100644 hugo/content/en/docs/howto/about-these-guides/index.md delete mode 100644 hugo/content/en/docs/tutorial/about-these-tutorials/index.md diff --git a/content/docs/concept/_en.md b/content/docs/concept/_en.md index ec418c5e1..adc6b4d3f 100644 --- a/content/docs/concept/_en.md +++ b/content/docs/concept/_en.md @@ -3,3 +3,17 @@ title: Concept Guides weight: 50 toc_hide: false --- + +## About these guides + +Concept Guides explain the systems and ideas that drive CUE's design. + +They explore the foundations and implications of CUE's theoretical basis in +depth, and provide background information to help the CUE user discover how +best to take advantage of its unique and powerful features. + +Follow the links on the left hand side of this page to +[Find a guide]({{< relref "find-a-guide" >}}) and to see a curated list of +[Popular guides]({{< relref "popular-guides" >}}). + +## All available concept guides diff --git a/content/docs/concept/about-these-guides/en.md b/content/docs/concept/about-these-guides/en.md deleted file mode 100644 index d91a3d379..000000000 --- a/content/docs/concept/about-these-guides/en.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: About these guides -weight: 10 -toc_hide: false ---- - -CUE's Concept Guides explain the systems and ideas that drive CUE's design. -They explore in depth the foundations and implications of CUE's theoretical -basis, and provide background information that helps the CUE user discover how -best to exercise its different features. - -Follow the links on the left hand side of this page to [Find a tutorial](TODO) and -to see a curated list of [Popular guides](TODO) diff --git a/content/docs/concept/about-these-guides/page.cue b/content/docs/concept/about-these-guides/page.cue deleted file mode 100644 index 2879c083e..000000000 --- a/content/docs/concept/about-these-guides/page.cue +++ /dev/null @@ -1,3 +0,0 @@ -package site - -content: docs: concept: "about-these-guides": {} diff --git a/content/docs/concept/find-a-guide/en.md b/content/docs/concept/find-a-guide/en.md index ff3601b12..e574d1b6a 100644 --- a/content/docs/concept/find-a-guide/en.md +++ b/content/docs/concept/find-a-guide/en.md @@ -2,6 +2,7 @@ title: Find a guide 🔍 weight: 20 toc_hide: false +hide_summary: true --- # TODO diff --git a/content/docs/concept/popular-guides/en.md b/content/docs/concept/popular-guides/en.md index 916a0979c..6493c340c 100644 --- a/content/docs/concept/popular-guides/en.md +++ b/content/docs/concept/popular-guides/en.md @@ -2,6 +2,7 @@ title: Popular guides weight: 30 toc_hide: false +hide_summary: true --- # TODO diff --git a/content/docs/howto/_en.md b/content/docs/howto/_en.md index 15f33ef7b..75a4e283e 100644 --- a/content/docs/howto/_en.md +++ b/content/docs/howto/_en.md @@ -3,3 +3,83 @@ title: How-to Guides weight: 40 toc_hide: false --- + +## About these guides + +CUE's documentation site is divided into several sections. The "How-to Guides" +section contains: + +- Guides that demonstrate how to use CUE tools: {{< tag "tooling" >}} +- Commented CUE guides that briefly illustrate CUE language features and + techniques: {{< tag "commented cue" >}} +- Guides that contain step-by-step instructions for integrating CUE with 3rd + party ecosystems and tools: {{< tag "ecosystem" >}} +- Guides that explain how to encode and decode information stored in languages + other than CUE: {{< tag "encodings" >}} + +Each guide has one or more tags, displayed at the top and bottom of the page. +Each tag links to a search page that shows other guides associated with the +same tag. + +## Commented CUE guides + +Some How-to Guides use CUE's useful style of +"[literate](https://en.wikipedia.org/wiki/Literate_programming) configuration". +We refer to them as {{< tag "commented cue" >}} guides. + +Commented CUE guides tend to be short, presenting commented CUE code alongside +some input data, with a `cue` command showing the concrete result of the +technique they're demonstrating. Often that result is an error message, showing +that `cue` has caught the deliberate mistakes in our example data. + +Here's an example: + +{{{with code "en" "example"}}} +! exec cue vet .:example data.yml +cmp stderr out.err +-- example.cue -- +package example + +// CUE comments start with "//". +// they run to the end of the +// line + +// f1 is a regular field which +// must be a string + +f1: string + +// f2 is a required field which +// must be an integer over 10 + +f2!: int & >10 +-- data.yml -- +# f1 is actually an integer +f1: 123 + +# f2 is actually a string +f2: "some string value" +-- out.err -- +f1: conflicting values 123 and string (mismatched types int and string): + ./data.yml:2:6 + ./example.cue:10:5 +f2: conflicting values "some string value" and int (mismatched types string and int): + ./data.yml:5:6 + ./example.cue:15:6 +{{{end}}} + +Commented CUE guides require you, the reader, to *modify* their examples +before you use them. Don't use the CUE exactly as it's presented, but first +adapt the variable names and data structures to suit your configuration. + +Unlike some of our longer, step-by-step guides, the features showcased in +Commented CUE guides are self-contained and -- we believe! -- easy to adapt to +any situation. Each guide has a "Related content" section containing links to +in-depth explanation and discussion of the techniques and language features +used. + +If you find any guides confusing, incomplete, or not detailed enough, then we +would really appreciate you telling us about your experience - just use the +"Report an Issue" link at the very bottom of the guide's page! + +## All available how-to guides diff --git a/content/docs/howto/about-these-guides/en.md b/content/docs/howto/about-these-guides/en.md deleted file mode 100644 index 5bb9ff42c..000000000 --- a/content/docs/howto/about-these-guides/en.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: About these guides -weight: 10 -toc_hide: false ---- - -## How-to Guides - -CUE's documentation site is divided into several sections. This section, -"How-to Guides", contains: - -- Guides that demonstrate how to use CUE tools: - [🔍 tag:tooling](TODO) -- Commented CUE guides that briefly illustrate CUE language features and - techniques: - [🔍 tag:Commented CUE](TODO) -- Longer form guides that show how to use more advanced techniques: - [🔍 tag:FIXME](TODO) -- Guides that contain step-by-step instructions for integrating CUE with 3rd - party ecosystems and tools: - [🔍 tag:ecosystem](TODO) -- Guides that explain how to encode and decode information stored in languages - other than CUE: - [🔍 tag:encoding](TODO) - -Each guide has one or more tags, displayed at the top and bottom of the page. -Each tag links to a search page that shows other guides associated with the -same tag. - -## Commented CUE Guides - -Some How-to Guides use CUE's useful style of -"[literate](https://en.wikipedia.org/wiki/Literate_programming) configuration". -We refer to them as "**Commented CUE**" guides. - -Commented CUE guides tend to be short, presenting commented CUE code alongside -some input data, with a `cue` command showing the concrete result of the -technique they're demonstrating. Often that result is an error message, showing -that `cue` has caught the deliberate mistakes in our example data. - -Here's an example: - -{{{with code "en" "example"}}} -! exec cue vet .:example data.yml -cmp stderr out.err --- example.cue -- -package example - -// CUE comments start with "//". -// they run to the end of the -// line - -// f1 is a regular field which -// must be a string - -f1: string - -// f2 is a required field which -// must be an integer over 10 - -f2!: int & >10 --- data.yml -- -# f1 is actually an integer -f1: 123 - -# f2 is actually a string -f2: "some string value" --- out.err -- -f1: conflicting values 123 and string (mismatched types int and string): - ./data.yml:2:6 - ./example.cue:10:5 -f2: conflicting values "some string value" and int (mismatched types string and int): - ./data.yml:5:6 - ./example.cue:15:6 -{{{end}}} - -Commented CUE guides require you, the reader, to *modify* their examples -before you use them. Don't use the CUE exactly as it's presented, but first -adapt the variable names and data structures to suit your configuration. - -Unlike some of our longer, step-by-step guides, the features showcased in -Commented CUE guides are self-contained and -- we believe! -- easy to adapt to -any situation. Each guide has a "Related content" section containing links to -in-depth explanation and discussion of the techniques and language features -used. - -If you find any guides confusing, incomplete, or not detailed enough, then we -would really appreciate you [telling us](FIXME:docs-and-content-bug-tracker) -about your experience! diff --git a/content/docs/howto/about-these-guides/gen_cache.cue b/content/docs/howto/about-these-guides/gen_cache.cue deleted file mode 100644 index c845d4b27..000000000 --- a/content/docs/howto/about-these-guides/gen_cache.cue +++ /dev/null @@ -1,18 +0,0 @@ -package site -{ - content: { - docs: { - howto: { - "about-these-guides": { - page: { - cache: { - code: { - example: "yqmkRAiwteffdSCxIrFElnHfoKrGbKGeJX1ua55Mpnc=" - } - } - } - } - } - } - } -} diff --git a/content/docs/howto/about-these-guides/page.cue b/content/docs/howto/about-these-guides/page.cue deleted file mode 100644 index 8c7bbc88e..000000000 --- a/content/docs/howto/about-these-guides/page.cue +++ /dev/null @@ -1,3 +0,0 @@ -package site - -content: docs: howto: "about-these-guides": {} diff --git a/content/docs/howto/find-a-guide/en.md b/content/docs/howto/find-a-guide/en.md index ff3601b12..e574d1b6a 100644 --- a/content/docs/howto/find-a-guide/en.md +++ b/content/docs/howto/find-a-guide/en.md @@ -2,6 +2,7 @@ title: Find a guide 🔍 weight: 20 toc_hide: false +hide_summary: true --- # TODO diff --git a/content/docs/howto/gen_cache.cue b/content/docs/howto/gen_cache.cue new file mode 100644 index 000000000..d636f7b9b --- /dev/null +++ b/content/docs/howto/gen_cache.cue @@ -0,0 +1,16 @@ +package site +{ + content: { + docs: { + howto: { + page: { + cache: { + code: { + example: "yqmkRAiwteffdSCxIrFElnHfoKrGbKGeJX1ua55Mpnc=" + } + } + } + } + } + } +} diff --git a/content/docs/howto/popular-guides/en.md b/content/docs/howto/popular-guides/en.md index 916a0979c..6493c340c 100644 --- a/content/docs/howto/popular-guides/en.md +++ b/content/docs/howto/popular-guides/en.md @@ -2,6 +2,7 @@ title: Popular guides weight: 30 toc_hide: false +hide_summary: true --- # TODO diff --git a/content/docs/tutorial/_en.md b/content/docs/tutorial/_en.md index a1b6d85cf..2c5b2a08c 100644 --- a/content/docs/tutorial/_en.md +++ b/content/docs/tutorial/_en.md @@ -3,3 +3,20 @@ title: Tutorials weight: 30 toc_hide: false --- + +## About these tutorials + +CUE tutorials are practical lessons that help you try out language features, +workflows, and tools in low risk, practise settings. + +To discover the range of tutorials that are available, use the +[Find a tutorial]({{< relref "find-a-tutorial" >}}) link on the left hand side +of this page. + +If you're new to CUE then start by reading the +[CUE Tour]({{< relref "/tour" >}}) and +[Language Guide]({{< relref "/language-guide" >}}), and then try out some +tutorials specifically selected for you on the +["New to CUE?"]({{< relref "new-to-cue" >}}) page. + +## All available tutorials diff --git a/content/docs/tutorial/about-these-tutorials/en.md b/content/docs/tutorial/about-these-tutorials/en.md deleted file mode 100644 index 07dbbbe77..000000000 --- a/content/docs/tutorial/about-these-tutorials/en.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: About these tutorials -weight: 10 -toc_hide: false ---- - -CUE tutorials are practical lessons that help you try out language features, -workflows, and tools in low risk, practise settings. - -To discover the range of tutorials that are available, use the [Find a -tutorial](TODO) link on the left hand side of this page. - -If you're new to CUE then start by reading the [CUE tour](TODO) and [Language -Guide](TODO), and then try out some tutorials specifically selected for you on -the ["New to CUE?"](TODO) page. diff --git a/content/docs/tutorial/about-these-tutorials/page.cue b/content/docs/tutorial/about-these-tutorials/page.cue deleted file mode 100644 index 0f203eee8..000000000 --- a/content/docs/tutorial/about-these-tutorials/page.cue +++ /dev/null @@ -1,3 +0,0 @@ -package site - -content: docs: tutorial: "about-these-tutorials": {} diff --git a/content/docs/tutorial/find-a-tutorial/en.md b/content/docs/tutorial/find-a-tutorial/en.md index a5660d90f..9af48adb3 100644 --- a/content/docs/tutorial/find-a-tutorial/en.md +++ b/content/docs/tutorial/find-a-tutorial/en.md @@ -2,6 +2,7 @@ title: Find a tutorial 🔍 weight: 20 toc_hide: false +hide_summary: true --- # TODO diff --git a/content/docs/tutorial/new-to-cue/en.md b/content/docs/tutorial/new-to-cue/en.md index 518c9a81b..81bb0ae70 100644 --- a/content/docs/tutorial/new-to-cue/en.md +++ b/content/docs/tutorial/new-to-cue/en.md @@ -2,6 +2,7 @@ title: New to CUE? weight: 30 toc_hide: false +hide_summary: true --- # Welcome! diff --git a/hugo/content/en/docs/concept/_index.md b/hugo/content/en/docs/concept/_index.md index ec418c5e1..adc6b4d3f 100644 --- a/hugo/content/en/docs/concept/_index.md +++ b/hugo/content/en/docs/concept/_index.md @@ -3,3 +3,17 @@ title: Concept Guides weight: 50 toc_hide: false --- + +## About these guides + +Concept Guides explain the systems and ideas that drive CUE's design. + +They explore the foundations and implications of CUE's theoretical basis in +depth, and provide background information to help the CUE user discover how +best to take advantage of its unique and powerful features. + +Follow the links on the left hand side of this page to +[Find a guide]({{< relref "find-a-guide" >}}) and to see a curated list of +[Popular guides]({{< relref "popular-guides" >}}). + +## All available concept guides diff --git a/hugo/content/en/docs/concept/about-these-guides/index.md b/hugo/content/en/docs/concept/about-these-guides/index.md deleted file mode 100644 index d91a3d379..000000000 --- a/hugo/content/en/docs/concept/about-these-guides/index.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: About these guides -weight: 10 -toc_hide: false ---- - -CUE's Concept Guides explain the systems and ideas that drive CUE's design. -They explore in depth the foundations and implications of CUE's theoretical -basis, and provide background information that helps the CUE user discover how -best to exercise its different features. - -Follow the links on the left hand side of this page to [Find a tutorial](TODO) and -to see a curated list of [Popular guides](TODO) diff --git a/hugo/content/en/docs/concept/find-a-guide/index.md b/hugo/content/en/docs/concept/find-a-guide/index.md index ff3601b12..e574d1b6a 100644 --- a/hugo/content/en/docs/concept/find-a-guide/index.md +++ b/hugo/content/en/docs/concept/find-a-guide/index.md @@ -2,6 +2,7 @@ title: Find a guide 🔍 weight: 20 toc_hide: false +hide_summary: true --- # TODO diff --git a/hugo/content/en/docs/concept/popular-guides/index.md b/hugo/content/en/docs/concept/popular-guides/index.md index 916a0979c..6493c340c 100644 --- a/hugo/content/en/docs/concept/popular-guides/index.md +++ b/hugo/content/en/docs/concept/popular-guides/index.md @@ -2,6 +2,7 @@ title: Popular guides weight: 30 toc_hide: false +hide_summary: true --- # TODO diff --git a/hugo/content/en/docs/howto/_index.md b/hugo/content/en/docs/howto/_index.md index 15f33ef7b..bf534ef0c 100644 --- a/hugo/content/en/docs/howto/_index.md +++ b/hugo/content/en/docs/howto/_index.md @@ -3,3 +3,85 @@ title: How-to Guides weight: 40 toc_hide: false --- + +## About these guides + +CUE's documentation site is divided into several sections. The "How-to Guides" +section contains: + +- Guides that demonstrate how to use CUE tools: {{< tag "tooling" >}} +- Commented CUE guides that briefly illustrate CUE language features and + techniques: {{< tag "commented cue" >}} +- Guides that contain step-by-step instructions for integrating CUE with 3rd + party ecosystems and tools: {{< tag "ecosystem" >}} +- Guides that explain how to encode and decode information stored in languages + other than CUE: {{< tag "encodings" >}} + +Each guide has one or more tags, displayed at the top and bottom of the page. +Each tag links to a search page that shows other guides associated with the +same tag. + +## Commented CUE guides + +Some How-to Guides use CUE's useful style of +"[literate](https://en.wikipedia.org/wiki/Literate_programming) configuration". +We refer to them as {{< tag "commented cue" >}} guides. + +Commented CUE guides tend to be short, presenting commented CUE code alongside +some input data, with a `cue` command showing the concrete result of the +technique they're demonstrating. Often that result is an error message, showing +that `cue` has caught the deliberate mistakes in our example data. + +Here's an example: + +{{< code-tabs >}} +{{< code-tab name="example.cue" language="cue" area="top-left" >}} +package example + +// CUE comments start with "//". +// they run to the end of the +// line + +// f1 is a regular field which +// must be a string + +f1: string + +// f2 is a required field which +// must be an integer over 10 + +f2!: int & >10 +{{< /code-tab >}} +{{< code-tab name="data.yml" language="yml" area="top-right" >}} +# f1 is actually an integer +f1: 123 + +# f2 is actually a string +f2: "some string value" +{{< /code-tab >}} +{{< code-tab name="TERMINAL" language="err" type="terminal" area="bottom" >}} +$ cue vet .:example data.yml +f1: conflicting values 123 and string (mismatched types int and string): + ./data.yml:2:6 + ./example.cue:10:5 +f2: conflicting values "some string value" and int (mismatched types string and int): + ./data.yml:5:6 + ./example.cue:15:6 +{{< /code-tab >}} +{{< /code-tabs >}} + +Commented CUE guides require you, the reader, to *modify* their examples +before you use them. Don't use the CUE exactly as it's presented, but first +adapt the variable names and data structures to suit your configuration. + +Unlike some of our longer, step-by-step guides, the features showcased in +Commented CUE guides are self-contained and -- we believe! -- easy to adapt to +any situation. Each guide has a "Related content" section containing links to +in-depth explanation and discussion of the techniques and language features +used. + +If you find any guides confusing, incomplete, or not detailed enough, then we +would really appreciate you telling us about your experience - just use the +"Report an Issue" link at the very bottom of the guide's page! + +## All available how-to guides diff --git a/hugo/content/en/docs/howto/about-these-guides/index.md b/hugo/content/en/docs/howto/about-these-guides/index.md deleted file mode 100644 index 699aa2d19..000000000 --- a/hugo/content/en/docs/howto/about-these-guides/index.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: About these guides -weight: 10 -toc_hide: false ---- - -## How-to Guides - -CUE's documentation site is divided into several sections. This section, -"How-to Guides", contains: - -- Guides that demonstrate how to use CUE tools: - [🔍 tag:tooling](TODO) -- Commented CUE guides that briefly illustrate CUE language features and - techniques: - [🔍 tag:Commented CUE](TODO) -- Longer form guides that show how to use more advanced techniques: - [🔍 tag:FIXME](TODO) -- Guides that contain step-by-step instructions for integrating CUE with 3rd - party ecosystems and tools: - [🔍 tag:ecosystem](TODO) -- Guides that explain how to encode and decode information stored in languages - other than CUE: - [🔍 tag:encoding](TODO) - -Each guide has one or more tags, displayed at the top and bottom of the page. -Each tag links to a search page that shows other guides associated with the -same tag. - -## Commented CUE Guides - -Some How-to Guides use CUE's useful style of -"[literate](https://en.wikipedia.org/wiki/Literate_programming) configuration". -We refer to them as "**Commented CUE**" guides. - -Commented CUE guides tend to be short, presenting commented CUE code alongside -some input data, with a `cue` command showing the concrete result of the -technique they're demonstrating. Often that result is an error message, showing -that `cue` has caught the deliberate mistakes in our example data. - -Here's an example: - -{{< code-tabs >}} -{{< code-tab name="example.cue" language="cue" area="top-left" >}} -package example - -// CUE comments start with "//". -// they run to the end of the -// line - -// f1 is a regular field which -// must be a string - -f1: string - -// f2 is a required field which -// must be an integer over 10 - -f2!: int & >10 -{{< /code-tab >}} -{{< code-tab name="data.yml" language="yml" area="top-right" >}} -# f1 is actually an integer -f1: 123 - -# f2 is actually a string -f2: "some string value" -{{< /code-tab >}} -{{< code-tab name="TERMINAL" language="err" type="terminal" area="bottom" >}} -$ cue vet .:example data.yml -f1: conflicting values 123 and string (mismatched types int and string): - ./data.yml:2:6 - ./example.cue:10:5 -f2: conflicting values "some string value" and int (mismatched types string and int): - ./data.yml:5:6 - ./example.cue:15:6 -{{< /code-tab >}} -{{< /code-tabs >}} - -Commented CUE guides require you, the reader, to *modify* their examples -before you use them. Don't use the CUE exactly as it's presented, but first -adapt the variable names and data structures to suit your configuration. - -Unlike some of our longer, step-by-step guides, the features showcased in -Commented CUE guides are self-contained and -- we believe! -- easy to adapt to -any situation. Each guide has a "Related content" section containing links to -in-depth explanation and discussion of the techniques and language features -used. - -If you find any guides confusing, incomplete, or not detailed enough, then we -would really appreciate you [telling us](FIXME:docs-and-content-bug-tracker) -about your experience! diff --git a/hugo/content/en/docs/howto/find-a-guide/index.md b/hugo/content/en/docs/howto/find-a-guide/index.md index ff3601b12..e574d1b6a 100644 --- a/hugo/content/en/docs/howto/find-a-guide/index.md +++ b/hugo/content/en/docs/howto/find-a-guide/index.md @@ -2,6 +2,7 @@ title: Find a guide 🔍 weight: 20 toc_hide: false +hide_summary: true --- # TODO diff --git a/hugo/content/en/docs/howto/popular-guides/index.md b/hugo/content/en/docs/howto/popular-guides/index.md index 916a0979c..6493c340c 100644 --- a/hugo/content/en/docs/howto/popular-guides/index.md +++ b/hugo/content/en/docs/howto/popular-guides/index.md @@ -2,6 +2,7 @@ title: Popular guides weight: 30 toc_hide: false +hide_summary: true --- # TODO diff --git a/hugo/content/en/docs/tutorial/_index.md b/hugo/content/en/docs/tutorial/_index.md index a1b6d85cf..2c5b2a08c 100644 --- a/hugo/content/en/docs/tutorial/_index.md +++ b/hugo/content/en/docs/tutorial/_index.md @@ -3,3 +3,20 @@ title: Tutorials weight: 30 toc_hide: false --- + +## About these tutorials + +CUE tutorials are practical lessons that help you try out language features, +workflows, and tools in low risk, practise settings. + +To discover the range of tutorials that are available, use the +[Find a tutorial]({{< relref "find-a-tutorial" >}}) link on the left hand side +of this page. + +If you're new to CUE then start by reading the +[CUE Tour]({{< relref "/tour" >}}) and +[Language Guide]({{< relref "/language-guide" >}}), and then try out some +tutorials specifically selected for you on the +["New to CUE?"]({{< relref "new-to-cue" >}}) page. + +## All available tutorials diff --git a/hugo/content/en/docs/tutorial/about-these-tutorials/index.md b/hugo/content/en/docs/tutorial/about-these-tutorials/index.md deleted file mode 100644 index 07dbbbe77..000000000 --- a/hugo/content/en/docs/tutorial/about-these-tutorials/index.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: About these tutorials -weight: 10 -toc_hide: false ---- - -CUE tutorials are practical lessons that help you try out language features, -workflows, and tools in low risk, practise settings. - -To discover the range of tutorials that are available, use the [Find a -tutorial](TODO) link on the left hand side of this page. - -If you're new to CUE then start by reading the [CUE tour](TODO) and [Language -Guide](TODO), and then try out some tutorials specifically selected for you on -the ["New to CUE?"](TODO) page. diff --git a/hugo/content/en/docs/tutorial/find-a-tutorial/index.md b/hugo/content/en/docs/tutorial/find-a-tutorial/index.md index a5660d90f..9af48adb3 100644 --- a/hugo/content/en/docs/tutorial/find-a-tutorial/index.md +++ b/hugo/content/en/docs/tutorial/find-a-tutorial/index.md @@ -2,6 +2,7 @@ title: Find a tutorial 🔍 weight: 20 toc_hide: false +hide_summary: true --- # TODO diff --git a/hugo/content/en/docs/tutorial/new-to-cue/index.md b/hugo/content/en/docs/tutorial/new-to-cue/index.md index 518c9a81b..81bb0ae70 100644 --- a/hugo/content/en/docs/tutorial/new-to-cue/index.md +++ b/hugo/content/en/docs/tutorial/new-to-cue/index.md @@ -2,6 +2,7 @@ title: New to CUE? weight: 30 toc_hide: false +hide_summary: true --- # Welcome! diff --git a/internal/ci/netlify/netlify.cue b/internal/ci/netlify/netlify.cue index 1138c0064..91697c402 100644 --- a/internal/ci/netlify/netlify.cue +++ b/internal/ci/netlify/netlify.cue @@ -68,15 +68,6 @@ config: #config & { redirects: [{ from: "/docs/introduction/" to: "/docs/introduction/welcome/" - }, { - from: "/docs/tutorial/" - to: "/docs/tutorial/about-these-tutorials/" - }, { - from: "/docs/howto/" - to: "/docs/howto/about-these-guides/" - }, { - from: "/docs/concept/" - to: "/docs/concept/about-these-guides/" }, { from: "/cl/*" to: "https://review.gerrithub.io/c/:splat" diff --git a/netlify.toml b/netlify.toml index 364bf521c..98b130de2 100644 --- a/netlify.toml +++ b/netlify.toml @@ -26,24 +26,6 @@ status = 302 force = true -[[redirects]] - from = "/docs/tutorial/" - to = "/docs/tutorial/about-these-tutorials/" - status = 302 - force = true - -[[redirects]] - from = "/docs/howto/" - to = "/docs/howto/about-these-guides/" - status = 302 - force = true - -[[redirects]] - from = "/docs/concept/" - to = "/docs/concept/about-these-guides/" - status = 302 - force = true - [[redirects]] from = "/cl/*" to = "https://review.gerrithub.io/c/:splat"