Skip to content

Commit

Permalink
generate json:api for stages and teams
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed Apr 28, 2022
1 parent d3d70aa commit 4fb8ecb
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ module.exports = {
references: ['teams', 'stage']
});

const teamsJSON = new StaticSiteJson(join(dataDirectory, 'teams'), {
contentFolder: 'teams',
type: 'teams',
attributes: ['name'],
});

const stagesJSON = new StaticSiteJson(join(dataDirectory, 'stages'), {
contentFolder: 'stages',
type: 'stages',
attributes: ['name'],
});

const readmeFile = funnel(dataDirectory, {
files: ['README.md']
});
Expand All @@ -77,7 +89,7 @@ module.exports = {

const tocFile = writeFile('/tocs/rfc.json', JSON.stringify(TocSerializer.serialize({ id: 'rfc', links: rfcs })));

const trees = [rfcsJSON, tocFile, pagesJSON]
const trees = [rfcsJSON, teamsJSON, stagesJSON, tocFile, pagesJSON]

if(existsSync(join(dataDirectory, 'images'))) {
const images = funnel(join(dataDirectory, 'images'), {
Expand Down

0 comments on commit 4fb8ecb

Please sign in to comment.