diff --git a/schema/index.yaml b/schema/index.yaml index 1543981..2dcb917 100644 --- a/schema/index.yaml +++ b/schema/index.yaml @@ -81,6 +81,9 @@ $defs: required: - name properties: + id: + type: string + pattern: "^[a-z0-9-]+$" name: type: string caption: diff --git a/src/people/_images/mykola.png b/src/people/_images/mykola-siusko.png similarity index 100% rename from src/people/_images/mykola.png rename to src/people/_images/mykola-siusko.png diff --git a/utils/engine.js b/utils/engine.js index 5f43fef..1d5432a 100644 --- a/utils/engine.js +++ b/utils/engine.js @@ -55,7 +55,10 @@ export class Engine { arr.push(obj); } if (ext === "yaml" && fn !== "index") { - const item = await readYamlFile(join(dir, dirEntry.name)); + const item = Object.assign( + { id: fn }, + await readYamlFile(join(dir, dirEntry.name)), + ); if (opts.loader === "person") { // load image const img = images.find((i) => i.id === fn);