Skip to content

Commit

Permalink
add levels to Notebook schema
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleguido committed Dec 13, 2024
1 parent 90d5056 commit d9f6d22
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,3 +252,11 @@ export const ModelLanguagesLabels: Record<string, string> = {
it: "Italian",
"en-fr-de": "English, French, German",
}

export const NotebookLevels = [
"beginner",
"expert-in-methods",
"skilled-in-methods",
"expert-in-domain",
"skilled-in-domain",
]
5 changes: 4 additions & 1 deletion src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
PlanImpressoUser,
PlanNone,
PlanEducational,
NotebookLevels,
} from "../constants"

const CorpusAccessUserPlansToPlan: Record<string, string> = {
Expand Down Expand Up @@ -164,8 +165,10 @@ const notebooks = defineCollection({
.optional(),
showLinks: z.boolean().optional(),
authors: z.array(reference("authors")).optional(),
// this gives circular reference
// note: this prevents circular reference
// BEFORE: seealso: z.array(z.lazy(() => reference("notebooks"))).optional(),
seealso: z.array(z.string()).optional(),
level: z.enum(NotebookLevels as any).default("beginner"),
// seealso: z.array(z.lazy(() => reference("notebooks"))).optional(),
}),
})
Expand Down

0 comments on commit d9f6d22

Please sign in to comment.