« get me outta code hell

static.js « page « src - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/page/static.js
blob: c9d806ffc258da0ec235afdf774d080ea1320097 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
export const description = `static wiki-wide content pages specified in data`;

// Static pages are written in the wiki's data folder and contain content and
// basic page metadata. They're used for a variety of purposes, such as an
// "about" page, a changelog, links to places beyond the wiki, and so on.
export function targets({wikiData}) {
  return wikiData.staticPageData;
}

export function pathsForTarget(staticPage) {
  return [
    {
      type: 'page',
      path: ['staticPage', staticPage.directory],

      contentFunction: {
        name: 'generateStaticPage',
        args: [staticPage],
      },
    },
  ];
}