Git Product home page Git Product logo

cuetorials.com's People

Contributors

antoinethebaud avatar arshchimni avatar bbkane avatar bfallik avatar chivalryq avatar eonpatapon avatar fgrosse avatar fresus avatar h1z3y3 avatar kawaz avatar kishaningithub avatar kjgorman avatar likakuli avatar miquelruiz avatar ndrpnt avatar nreilingh avatar olukotun-ts avatar rlespinasse avatar shusann01116 avatar tamalsaha avatar tynes avatar verdverm avatar xanderxaj avatar yujunz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cuetorials.com's Issues

Script to list files which need translation

Goal: make it easy for translators to see which files are new or have changed since and need updating / translating.

It should be easy to write a script which uses git to determine which content/*.md files are older than their english counterpart.

Building Up Values Example Broken

Hi,

The Building Up Values example on https://cuetorials.com/overview/foundations/ doesn't work:

❯ cat building-up.cue 
#Base: {
	name: string
	kind: string
	... // so it can be extended
}
#Meta: {
	// string and a semver regex
	version: string & =~"^v[0-9]+\\.[0-9]+\\.[0-9]+$"
	// list of strings
	labels: [...string]
}

#Permissions: {
	role: string
	public: bool | *false
}

// Building up a schema using a conjunction and embedding
#Schema: #Base & {
	// "embed" meta and permissions
	#Meta
	#Permissions
	// with no '...' this is final
}

value: #Schema & {
	name: "app"
	kind: "deploy"
	version: "v1.0.42"
	labels: ["server", "prod"]
	role: "backend"
	// public: false  (by default)
}

❯ cue export building-up.cue
#Schema: field not allowed: kind:
    ./building-up.cue:3:2
    ./building-up.cue:6:8
    ./building-up.cue:13:15
    ./building-up.cue:19:10
    ./building-up.cue:19:18
    ./building-up.cue:21:2
    ./building-up.cue:22:2
#Schema: field not allowed: name:
    ./building-up.cue:2:2
    ./building-up.cue:6:8
    ./building-up.cue:13:15
    ./building-up.cue:19:10
    ./building-up.cue:19:18
    ./building-up.cue:21:2
    ./building-up.cue:22:2
value: field not allowed: kind:
    ./building-up.cue:3:2
    ./building-up.cue:6:8
    ./building-up.cue:13:15
    ./building-up.cue:19:10
    ./building-up.cue:19:18
    ./building-up.cue:21:2
    ./building-up.cue:22:2
    ./building-up.cue:26:8
    ./building-up.cue:28:2
value: field not allowed: name:
    ./building-up.cue:2:2
    ./building-up.cue:6:8
    ./building-up.cue:13:15
    ./building-up.cue:19:10
    ./building-up.cue:19:18
    ./building-up.cue:21:2
    ./building-up.cue:22:2
    ./building-up.cue:26:8
    ./building-up.cue:27:2

❯ cue version
cue version 0.4.0 linux/amd64

I could get it to work by moving #Base inside of the definition, but that's doing something different.

Combine, minify, hash website assets

Hugo has some helpers to combine, minify, and create files named with their hashes. This should help with loading, both size and caching issues on updates.

Either-or Fields Pattern not referencing definition

Was the pattern meant to look like this? It seems to be missing #Thing for either thing1 or thing2

#First: {
	foo: string
}

#Other: {
	msg: string
}

#Either: #First | #Other

#Thing: {
	name: string
	#Either
}

thing1: #Thing & {
	name: "thing1"
	foo:  "bar"
}

thing2: #Thing & {
	name: "thing2"
	msg:  "hello"
}


Contributors Page

We should have a page on the website to thank all those who have contributed, if they wish to have their name listed.

Let's make it the last menu item.

AnyOf Pattern doesn't work when fields are optional and array

import "list"

#test: this={
	a?:        [...string]
	b?:        string
	c?:        string
	#AnyOfABC: true & list.MinItems([ for label, val in this if list.Contains(["a", "b", "c"], label) {label}], 1)
}
{
	"a": ["bar"],
	"b": "foo"
}
cue eval -c ./test.cue ./testany.json -d "#test"
#test.#AnyOfABC: conflicting values false and true:
    ./test.cue:7:13
    ./test.cue:7:20

changing from array a to string works or changing the array field from optional to default works as well. This is slightly outside of the content of the page, bug a simple derivative.

invalid string: invalid string: invalid whitespace

Hello

I'm trying to gently modify the basic cue example, but often get the below .

The command I'm running is cue cmd -t "name=bob" gen-todos

gen.templates.contents: invalid string: invalid string: invalid whitespace:
    ./first.cue:27:14

This error comes up when modifying what should be considered plain text, within """.

For example:

contents: """
			
			{{ range $T := .I -}}
			
			model {{ $T.name }} {
				id	      Int      @id @default(autoincrement())
				createdAt DateTime @default(now())
                published Boolean  @default(true)			
			}
			{{ end }}
			"""

Oddly, the following code does NOT error:

contents: """
			
			{{ range $T := .I -}}
			
			model {{ $T.name }} {
				id	      Int      @id @default(autoincrement())
				createdAt DateTime @default(now())		
			}
			{{ end }}
			"""

Chinese Edition

These are all the path of the site.
If you want to contribute in Chinese translation work, please claim one of them and pull request all the pages under the one.

Walkthroughs missing?

Hello 👋 , thanks for cuetorials.com, for several topics I find it better/simpler than the original Cue docs 👍

In the walkthrough section I came across this empty page:

image

It's https://cuetorials.com/walkthroughs/kubernetes/helm/, i.e. https://github.com/hofstadter-io/cuetorials.com/blob/055f33e6d9fc99401009d9995b3a1c5b40a324e1/content/walkthroughs/kubernetes/helm.md, which appears empty.

But the others also don't seem to be correct, for example I was expecting a walkthrough on https://cuetorials.com/walkthroughs/building-a-cue-powered-tool/self-driving-desktop/, but there's no walkthrough.

Question - How do you encode to JSON from evaluated cue value?

Hi 👋

Thanks very much for this tutorial repo. Really useful for implementing cue's features, with Go.

I have a (probably) basic question. I have been able to load and evaluate a cue value. How do I encode it to JSON? I am unable to find specific references to this in cue's source as well. I am sure I am missing something.

Any help would be highly appreciated. Thank you :)

Font(s) not loading

For some time now my browsers started to reject loading the truetype font embedded on the site.

On Chrome I get this error in the console:

Refused to load the font 'data:font/truetype;charset=utf-8;base64,d09GRgABAAAAAL...' because it violates the following Content Security Policy directive: "default-src 'self'". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.

The site looks like this:
Screenshot 2022-03-31 at 15 47 43

I don't get any similar logs on Firefox, but the site looks the same there too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.