updates for events

This commit is contained in:
2023-05-21 14:35:55 -07:00
parent 17a406e546
commit 2dd300f4dc
8 changed files with 81 additions and 66 deletions

View File

@@ -3,7 +3,7 @@ import type { XMLBuilder } from 'xmlbuilder2/lib/interfaces';
import { create as create_xml } from 'xmlbuilder2';
import { BuildState } from './state';
import { write_text } from '../fs';
import { app_version } from '../conf';
import { AuthorConfig, app_version } from '../conf';
import { map_output_file_to_url } from './helpers';
import { DateTime } from 'luxon';
@@ -12,7 +12,7 @@ export interface RSSEntry {
in_file: string;
title?: string;
description?: string;
author_name?: string;
authors?: AuthorConfig[];
html_content?: string;
tags?: string[];
}
@@ -100,8 +100,10 @@ export async function write_rss_if_needed(state: BuildState) {
item.ele('description').txt(entry.description);
}
if (entry.author_name) {
item.ele('dc:creator').ele({ $: entry.author_name });
if (entry.authors) {
for (const author of entry.authors) {
item.ele('dc:creator').ele({ $: author.name || author.url || author.email });
}
}
if (entry.tags) {