Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Commit

Permalink
Fixed: feed should now contains all entries (0.4.2)
Browse files Browse the repository at this point in the history
(same bug as fixed in 0.4.1, but for rss feed instead of
collection.json)
  • Loading branch information
MoOx committed Nov 3, 2015
1 parent 97796ac commit 877b523
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 24 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 0.4.2 - 2015-11-03

- Fixed: feed should now contains all entries
(same bug as fixed in 0.4.1, but for rss feed instead of collection.json)

# 0.4.1 - 2015-11-03

- Fixed: `collection.json` should now contains all entries, even for the static
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "statinamic",
"version": "0.4.1",
"version": "0.4.2",
"description": "A static website generator to create dynamic website using React components.",
"keywords": [
"react",
Expand Down
46 changes: 23 additions & 23 deletions src/md-collection-loader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,31 +106,31 @@ export default function(input) {
})))
// emit updated collection
this.emitFile(collectionUrl, newJSON)

// emit updated feeds
const feeds = query.feeds || []
const feedsOptions = query.feedsOptions || {}
Object.keys(feeds).forEach((name) => {
const { feedOptions, collectionOptions } = feeds[name]
this.emitFile(name, feed({
feedOptions: {
...feedsOptions,
...feedOptions,
},
destination: name,
collection: enhanceCollection(
cache.map((item) => ({
...item.head,
description: item.body,
__filename: item.__filename,
__url: item.__url,
})),
collectionOptions
),
}))
})
}, 100)
}

// emit updated feeds
const feeds = query.feeds || []
const feedsOptions = query.feedsOptions || {}
Object.keys(feeds).forEach((name) => {
const { feedOptions, collectionOptions } = feeds[name]
this.emitFile(name, feed({
feedOptions: {
...feedsOptions,
...feedOptions,
},
destination: name,
collection: enhanceCollection(
cache.map((item) => ({
...item.head,
description: item.body,
__filename: item.__filename,
__url: item.__url,
})),
collectionOptions
),
}))
})

return "module.exports = __webpack_public_path__ + " + JSON.stringify(jsonUrl)
}

0 comments on commit 877b523

Please sign in to comment.