Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rss and Json don't render author field #111

Open
vedmant opened this issue Aug 18, 2022 · 0 comments
Open

Rss and Json don't render author field #111

vedmant opened this issue Aug 18, 2022 · 0 comments

Comments

@vedmant
Copy link

vedmant commented Aug 18, 2022

I added author field to items:

ideas.forEach((idea) => {
    feed.addItem({
      title: idea.title,
      id: idea.short_id,
      link: `${urlBase}/${idea.short_id}/${idea.slug}`,
      content: idea.content,
      date: new Date(idea.idea_date),
      author: idea.user.name,
    })
  })

But in the rss elements are like this:

         <item>
            <title><![CDATA[New board]]></title>
            <link>https://www.bla.com/nkkmzt/new-board</link>
            <guid>nkkmzt</guid>
            <pubDate>Sat, 23 Jul 2022 16:22:21 GMT</pubDate>
            <content:encoded><![CDATA[<p>Test</p>]]></content:encoded>
        </item>

And for JSON:

{
id: "i43be6",
content_html: "<p>Test</p>",
url: "https://www.dailyidea.com/i43be6/an-idea",
title: "An idea",
date_modified: "2022-07-23T16:34:06.000Z",
author: { }
}

I validatedidea.user.name is present and are strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant