summaryrefslogtreecommitdiffhomepage
path: root/vhosts/blog/nuldoc-src/slide/slide.ts
diff options
context:
space:
mode:
Diffstat (limited to 'vhosts/blog/nuldoc-src/slide/slide.ts')
-rw-r--r--vhosts/blog/nuldoc-src/slide/slide.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/vhosts/blog/nuldoc-src/slide/slide.ts b/vhosts/blog/nuldoc-src/slide/slide.ts
index 5d5f30eb..388c8c88 100644
--- a/vhosts/blog/nuldoc-src/slide/slide.ts
+++ b/vhosts/blog/nuldoc-src/slide/slide.ts
@@ -4,6 +4,7 @@ import { Revision, stringToDate } from "../revision.ts";
export type Slide = {
sourceFilePath: string;
+ uuid: string;
title: string;
event: string;
talkType: string;
@@ -14,6 +15,7 @@ export type Slide = {
type Toml = {
slide: {
+ uuid: string;
title: string;
event: string;
talkType: string;
@@ -38,6 +40,13 @@ export function createNewSlideFromTomlRootObject(
);
}
+ const uuid = slide.uuid ?? null;
+ if (!uuid) {
+ throw new SlideError(
+ `[slide.new] 'slide.uuid' field not found`,
+ );
+ }
+
const title = slide.title ?? null;
if (!title) {
throw new SlideError(
@@ -103,6 +112,7 @@ export function createNewSlideFromTomlRootObject(
return {
sourceFilePath: sourceFilePath,
+ uuid: uuid,
title: title,
event: event,
talkType: talkType,