diff --git a/.gitignore b/.gitignore index 2b35b2b..b343449 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /test/tests.* /test/coverage.* repository/ +!/dogfood/repository/ /repository.yaml /blox /_build/ \ No newline at end of file diff --git a/dogfood/repository/_build/manifest.json b/dogfood/repository/_build/manifest.json new file mode 100755 index 0000000..f2ee4ba --- /dev/null +++ b/dogfood/repository/_build/manifest.json @@ -0,0 +1,67 @@ +{ + "Root": "repository", + "Namespace": "schemas.cueblox.com", + "Output": "_build", + "Schemas": [ + { + "Namespace": "schemas.cueblox.com", + "Name": "article", + "Versions": [ + { + "Namespace": "schemas.cueblox.com", + "Name": "v1", + "Schema": "article", + "Definition": "{\n\t_schema: {\n\t\tname: \"Article\"\n\t\tnamespace: \"schemas.cueblox.com\"\n\t}\n\n\t#Article: {\n\t\t_model: {\n\t\t\tplural: \"articles\"\n\t\t\tsupportedExtensions: [\"yaml\", \"yml\", \"md\", \"mdx\"]\n\t\t}\n\n\ttitle: string\n\texcerpt: string\n featured: bool | *false\n draft: bool | *false\n publish_date: string\n image?: string\n last_edit_date?: string\n edit_description?: string\n\tbody?: string\n\ttags?: [...string]\n category_id?: string\n profile_id?: string\n\t}\n\n}\n" + } + ] + }, + { + "Namespace": "schemas.cueblox.com", + "Name": "category", + "Versions": [ + { + "Namespace": "schemas.cueblox.com", + "Name": "v1", + "Schema": "category", + "Definition": "{\n\t_schema: {\n\t\tname: \"Category\"\n\t\tnamespace: \"schemas.cueblox.com\"\n\t}\n\n\t#Category: {\n\t\t_model: {\n\t\t\tplural: \"categories\"\n\t\t\tsupportedExtensions: [\"yaml\", \"yml\", \"md\", \"mdx\"]\n\t\t}\n\n\tname: string\n\tdescription: string\n body?: string\n\t}\n\n\n}\n" + } + ] + }, + { + "Namespace": "schemas.cueblox.com", + "Name": "page", + "Versions": [ + { + "Namespace": "schemas.cueblox.com", + "Name": "v1", + "Schema": "page", + "Definition": "{\n\t_schema: {\n\t\tname: \"Page\"\n\t\tnamespace: \"schemas.cueblox.com\"\n\t}\n\n\t#Page: {\n\t\t_model: {\n\t\t\tplural: \"pages\"\n\t\t\tsupportedExtensions: [\"yaml\", \"yml\", \"md\", \"mdx\"]\n\t\t}\n\n\ttitle: string\n\texcerpt: string\n draft: bool | *false\n publish_date: string\n image?: string\n\tbody?: string\n\ttags?: [...string]\n\t}\n\n}\n" + } + ] + }, + { + "Namespace": "schemas.cueblox.com", + "Name": "profile", + "Versions": [ + { + "Namespace": "schemas.cueblox.com", + "Name": "v1", + "Schema": "profile", + "Definition": "{\n\t_schema: {\n\t\tname: \"Profile\"\n\t\tnamespace: \"schemas.cueblox.com\"\n\t}\n\n\t#Profile: {\n\t\t_model: {\n\t\t\tplural: \"profiles\"\n\t\t\tsupportedExtensions: [\"yaml\", \"yml\", \"md\", \"mdx\"]\n\t\t}\n\n\t\tfirst_name: string\n\t\tlast_name: string\n\t\tage?: int\n\t\tcompany?: string\n\t\ttitle?: string\n\t\tbody?: string\n\t\tsocial_accounts?: [...#TwitterAccount | #GitHubAccount | #MiscellaneousAccount]\n\t}\n\n\t#TwitterAccount: {\n\t\tnetwork: \"twitter\"\n\t\tusername: string\n\t\turl: *\"https://twitter.com/\\(username)\" | string\n\t}\n\n\t#GitHubAccount: {\n\t\tnetwork: \"github\"\n\t\tusername: string\n\t\turl: *\"https://github.com/\\(username)\" | string\n\t}\n\n\t#MiscellaneousAccount: {\n\t\tnetwork: string\n\t\turl: string\n\t}\n}\n" + } + ] + }, + { + "Namespace": "schemas.cueblox.com", + "Name": "website", + "Versions": [ + { + "Namespace": "schemas.cueblox.com", + "Name": "v1", + "Schema": "website", + "Definition": "{\n\t_schema: {\n\t\tname: \"Profile\"\n\t\tnamespace: \"schemas.cueblox.com\"\n\t}\n\n\t#Website: {\n\t\t_model: {\n\t\t\tplural: \"websites\"\n\t\t\tsupportedExtensions: [\"yaml\", \"yml\"]\n\t\t}\n\n\t\turl: string\n\t\tprofile_id?: string\n\t\tbody?: string\n\t}\n}\n" + } + ] + } + ] +} \ No newline at end of file diff --git a/dogfood/repository/article/v1/schema.cue b/dogfood/repository/article/v1/schema.cue new file mode 100755 index 0000000..b2ddd04 --- /dev/null +++ b/dogfood/repository/article/v1/schema.cue @@ -0,0 +1,27 @@ +{ + _schema: { + name: "Article" + namespace: "schemas.cueblox.com" + } + + #Article: { + _model: { + plural: "articles" + supportedExtensions: ["yaml", "yml", "md", "mdx"] + } + + title: string + excerpt: string + featured: bool | *false + draft: bool | *false + publish_date: string + image?: string + last_edit_date?: string + edit_description?: string + body?: string + tags?: [...string] + category_id?: string + profile_id?: string + } + +} diff --git a/dogfood/repository/category/v1/schema.cue b/dogfood/repository/category/v1/schema.cue new file mode 100755 index 0000000..af7b02b --- /dev/null +++ b/dogfood/repository/category/v1/schema.cue @@ -0,0 +1,19 @@ +{ + _schema: { + name: "Category" + namespace: "schemas.cueblox.com" + } + + #Category: { + _model: { + plural: "categories" + supportedExtensions: ["yaml", "yml", "md", "mdx"] + } + + name: string + description: string + body?: string + } + + +} diff --git a/dogfood/repository/page/v1/schema.cue b/dogfood/repository/page/v1/schema.cue new file mode 100755 index 0000000..3a039f4 --- /dev/null +++ b/dogfood/repository/page/v1/schema.cue @@ -0,0 +1,22 @@ +{ + _schema: { + name: "Page" + namespace: "schemas.cueblox.com" + } + + #Page: { + _model: { + plural: "pages" + supportedExtensions: ["yaml", "yml", "md", "mdx"] + } + + title: string + excerpt: string + draft: bool | *false + publish_date: string + image?: string + body?: string + tags?: [...string] + } + +} diff --git a/dogfood/repository/profile/v1/schema.cue b/dogfood/repository/profile/v1/schema.cue new file mode 100755 index 0000000..c8d7155 --- /dev/null +++ b/dogfood/repository/profile/v1/schema.cue @@ -0,0 +1,38 @@ +{ + _schema: { + name: "Profile" + namespace: "schemas.cueblox.com" + } + + #Profile: { + _model: { + plural: "profiles" + supportedExtensions: ["yaml", "yml", "md", "mdx"] + } + + first_name: string + last_name: string + age?: int + company?: string + title?: string + body?: string + social_accounts?: [...#TwitterAccount | #GitHubAccount | #MiscellaneousAccount] + } + + #TwitterAccount: { + network: "twitter" + username: string + url: *"https://twitter.com/\(username)" | string + } + + #GitHubAccount: { + network: "github" + username: string + url: *"https://github.com/\(username)" | string + } + + #MiscellaneousAccount: { + network: string + url: string + } +} diff --git a/dogfood/repository/website/v1/schema.cue b/dogfood/repository/website/v1/schema.cue new file mode 100755 index 0000000..fdec2c2 --- /dev/null +++ b/dogfood/repository/website/v1/schema.cue @@ -0,0 +1,17 @@ +{ + _schema: { + name: "Profile" + namespace: "schemas.cueblox.com" + } + + #Website: { + _model: { + plural: "websites" + supportedExtensions: ["yaml", "yml"] + } + + url: string + profile_id?: string + body?: string + } +}