diff --git a/src/routes/blog/rss.xml/+server.ts b/src/routes/blog/rss.xml/+server.ts
index 69564c5..59429cf 100644
--- a/src/routes/blog/rss.xml/+server.ts
+++ b/src/routes/blog/rss.xml/+server.ts
@@ -21,6 +21,26 @@ function makeThumbnail(post: App.BlogPost): string {
return `
`;
}
+function makeAuthors(post: App.BlogPost): string {
+ const authors =
+ (post.authors == null
+ ? []
+ : typeof post.authors === 'string'
+ ? [post.authors]
+ : post.authors)
+ .map(a => escapeXml(a));
+
+ if (authors.length === 0) return '';
+
+ let authorsString = authors[0];
+ if (authors.length > 1) {
+ const lastAuthor = authors.pop();
+ authorsString = `${authors.join(', ')} и ${lastAuthor}`;
+ }
+
+ return `\n${authorsString}`;
+}
+
export async function GET({ setHeaders }) {
setHeaders({
'Cache-Control': 'max-age=0, s-maxage=3600',
@@ -36,7 +56,7 @@ export async function GET({ setHeaders }) {
${feedUpdated.toUTCString()}
${posts.map((post) => `-
${escapeXml(post.title)}
-
+${makeAuthors(post)}
https://teasanctuary.ru/blog/${post.slug}
https://teasanctuary.ru/blog/${post.slug}
${(new Date(post.date!)).toUTCString()}