cue-lang / docs-and-content

A place to discuss, plan, and track documentation on cuelang.org
5 stars 1 forks source link

play: default example and/or comments #91

Closed jpluscplusm closed 5 months ago

jpluscplusm commented 7 months ago
myitcv commented 7 months ago

I'd suggest something simply that involves a definition (schema) and some data being validated by that schema.

jpluscplusm commented 6 months ago
  • [x] What example and/or comments should show up when the user visits /play?
// Welcome to CUE!
//
// Play around with CUE by typing directly into this window,
// or use the Examples menu to load some CUE.
//
// There are many examples of how to use the language on the CUE
// documentation site, https://cuelang.org/docs/, with the language
// tour being a great place to start: https://cuelang.org/docs/tour/.
// Just Ctrl-click links to open them in a new window.
//
// You can safely delete the text in this editor window - simply
// reload the page to see this message again. Happy CUEing!

// This is a comment
_greeting: "Welcome" // Hidden fields start with "_"
#project:  "CUE"     // Definitions start with "#"

message: "\(_greeting) to \(#project)!" // Data fields are exported
jpluscplusm commented 6 months ago
  • [x] Where does /play's default CUE come from, given the CUE is currently blank?

It doesn't come from anywhere.

https://cue-lang/cuelang.org/cl/1187811 adds an example, and defaults to loading it if no other CUE has been loaded through the id= or example= params.

jpluscplusm commented 5 months ago

Closed via https://github.com/cue-lang/cuelang.org/commit/e2395e7e4d58f0bb269f8ba8c9aa6a36fe03d054