mirror of
https://github.com/r-freeman/portfolio.git
synced 2024-11-22 13:35:41 +00:00
Add image to rss feed
This commit is contained in:
parent
a41a318841
commit
7d9820af01
@ -33,12 +33,14 @@ export async function GET(req: NextRequest) {
|
||||
let _article = $('article').first()
|
||||
let title = _article.find('h1').first().text()
|
||||
let date = _article.find('time').first().attr('datetime') ?? new Date()
|
||||
let image = _article.find('image').first().html() ?? ""
|
||||
let content = _article.find('.prose').first().html() ?? ""
|
||||
|
||||
feed.addItem({
|
||||
title,
|
||||
id: url,
|
||||
link: url,
|
||||
image,
|
||||
content,
|
||||
author: [author],
|
||||
contributor: [author],
|
||||
|
Loading…
Reference in New Issue
Block a user