This commit is contained in:
matthieu42morin 2024-04-29 05:58:48 +02:00
parent c7d48b3d96
commit 37880d297b
1 changed files with 41 additions and 39 deletions

View File

@ -4,6 +4,7 @@ import { site } from '$lib/config/site'
import { feed } from '$lib/config/general' import { feed } from '$lib/config/general'
import { favicon, any } from '$lib/config/icon' import { favicon, any } from '$lib/config/icon'
import { genPosts } from '$lib/utils/posts' import { genPosts } from '$lib/utils/posts'
import readingTime from 'reading-time'
const render = (posts = genPosts({ postHtml: true, postLimit: feed.limit, filterUnlisted: true })) => ({ const render = (posts = genPosts({ postHtml: true, postLimit: feed.limit, filterUnlisted: true })) => ({
version: 'https://jsonfeed.org/version/1.1', version: 'https://jsonfeed.org/version/1.1',
@ -31,6 +32,7 @@ const render = (posts = genPosts({ postHtml: true, postLimit: feed.limit, filter
title: post.title, title: post.title,
content_html: post.html, content_html: post.html,
summary: post['summary'], summary: post['summary'],
readingTime,
image: post['image'], image: post['image'],
date_published: post.published ?? post.created, date_published: post.published ?? post.created,
date_modified: post.updated ?? post.published ?? post.created, date_modified: post.updated ?? post.published ?? post.created,