Ghost/core/server/services/routing/helpers/render-entries.js
kirrg001 c2fa469c4d Dynamic Routing Beta: Channels
refs #9601

- refactor architecture of routing so you can define a channel
- a channel is a different way of looking at your posts (a view)
- a channel does not change the url of a resource

Example channel

```
routes:
  /worldcup-2018-russia/:
    controller: channel
    filter: tag:football18
    data: tag.football18
```

- added ability to redirect resources to a channel/static route
- support templates for channels
- ensure we still support static routes (e.g. /about/: home)
- ensure pagination + rss works out of the box
2018-06-24 02:06:58 +02:00

13 lines
431 B
JavaScript

const debug = require('ghost-ignition').debug('services:routing:helpers:render-entries'),
formatResponse = require('./format-response'),
renderer = require('./renderer');
module.exports = function renderEntries(req, res) {
debug('renderEntries called');
return function renderEntries(result) {
// Format data 2
// Render
return renderer(req, res, formatResponse.entries(result));
};
};