diff options
Diffstat (limited to 'src/page')
-rw-r--r-- | src/page/listing.js | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/page/listing.js b/src/page/listing.js index da4c2968..c770f825 100644 --- a/src/page/listing.js +++ b/src/page/listing.js @@ -14,11 +14,21 @@ import {getTotalDuration} from '../util/wiki-data.js'; export const description = `wiki-wide listing pages & index`; -export function pathsTargetless() { +export function targets({wikiData}) { + return ( + wikiData.listingSpec + .filter(listing => listing.contentFunction)); +} + +export function pathsForTarget(listing) { return [ { - type: 'page', path: ['listing', 'albums/by-name'], - contentFunction: {name: 'listAlbumsByName'}, + type: 'page', + path: ['listing', listing.directory], + contentFunction: { + name: listing.contentFunction, + args: [listing], + }, }, ]; } |