Skip to content

Commit

Permalink
docs/tour: move info block after code example
Browse files Browse the repository at this point in the history
This places an incidental info block after the more important content on
the page that directly introduces conditional fields.

Closes cue-lang/cue#3116

Preview-Path: /docs/tour/expressions/conditional/
Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
Change-Id: I52122d84c8368ba6fa50758b2b9154a684eeaa26
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1194254
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Paul Jolly <paul@myitcv.io>
  • Loading branch information
jpluscplusm committed May 4, 2024
1 parent 520bdec commit 24ebac4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
11 changes: 5 additions & 6 deletions content/docs/tour/expressions/conditional/en.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ weight: 40

Field comprehensions can be used to add fields conditionally.

{{< info >}}
When `cue export` processes multiple files it *unifies* their contents.
The value of the `price` field in `stock.yaml` is available inside `file.cue`,
and triggers the conditional inclusion of the required fields.
{{< /info >}}

{{{with code "en" "tour"}}}
! exec cue export file.cue stock.yaml
cmp stderr out
Expand All @@ -32,3 +26,8 @@ reason: field is required but not present:
./file.cue:5:1
{{{end}}}

{{< info >}}
When `cue export` processes multiple files it *unifies* their contents.
The value of the `price` field in `stock.yaml` is available inside `file.cue`,
and triggers the conditional inclusion of the required fields.
{{< /info >}}
11 changes: 5 additions & 6 deletions hugo/content/en/docs/tour/expressions/conditional/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ weight: 40

Field comprehensions can be used to add fields conditionally.

{{< info >}}
When `cue export` processes multiple files it *unifies* their contents.
The value of the `price` field in `stock.yaml` is available inside `file.cue`,
and triggers the conditional inclusion of the required fields.
{{< /info >}}

{{< code-tabs >}}
{{< code-tab name="file.cue" language="cue" area="top-left" >}}
price: number
Expand All @@ -34,3 +28,8 @@ reason: field is required but not present:
{{< /code-tab >}}
{{< /code-tabs >}}

{{< info >}}
When `cue export` processes multiple files it *unifies* their contents.
The value of the `price` field in `stock.yaml` is available inside `file.cue`,
and triggers the conditional inclusion of the required fields.
{{< /info >}}

0 comments on commit 24ebac4

Please sign in to comment.