fix: allow summary and tag to be optional for rss
This commit is contained in:
parent
ffd36e96db
commit
c31a4f0aa1
@ -7,10 +7,10 @@ const generateRssItem = (post) => `
|
||||
<guid>${siteMetadata.siteUrl}/blog/${post.slug}</guid>
|
||||
<title>${escape(post.title)}</title>
|
||||
<link>${siteMetadata.siteUrl}/blog/${post.slug}</link>
|
||||
<description>${escape(post.summary)}</description>
|
||||
${post.summary && <description>escape(post.summary)</description>}
|
||||
<pubDate>${new Date(post.date).toUTCString()}</pubDate>
|
||||
<author>${siteMetadata.email} (${siteMetadata.author})</author>
|
||||
${post.tags.map((t) => `<category>${t}</category>`).join('')}
|
||||
${post.tags && post.tags.map((t) => `<category>${t}</category>`).join('')}
|
||||
</item>
|
||||
`
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user