MCPcopy Index your code
hub / github.com/adobe/react-spectrum / buildFeed

Function buildFeed

scripts/createFeed.mjs:117–144  ·  view source on GitHub ↗
(type, posts)

Source from the content-addressed store, hash-verified

115}
116
117function buildFeed(type, posts) {
118 const feedItems = [];
119
120 feedItems.push(
121 ...posts.map(function (post) {
122 const feedItem = {
123 item: [
124 {title: post.title},
125 {pubDate: new Date(post.date).toUTCString()},
126 {
127 guid: [
128 {_attr: {isPermaLink: true}},
129 `https://react-spectrum.adobe.com/${type}/${post.fileName}.html`
130 ]
131 },
132 {
133 description: {
134 _cdata: post.description
135 }
136 }
137 ]
138 };
139 return feedItem;
140 })
141 );
142
143 return feedItems;
144}

Callers 1

createFeed.mjsFile · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected