From 7c81d7bf5bcb6fb9578ae4ae54684742bf9ae35d Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 22 Feb 2024 01:51:21 +0900 Subject: feat(blog/nuldoc): implement generating Atom feed --- vhosts/blog/nuldoc-src/slide/slide.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'vhosts/blog/nuldoc-src/slide/slide.ts') 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, -- cgit v1.2.3-70-g09d2