diff options
Diffstat (limited to 'src/page/static.js')
-rw-r--r-- | src/page/static.js | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/src/page/static.js b/src/page/static.js index 2a0f5e5..c9d806f 100644 --- a/src/page/static.js +++ b/src/page/static.js @@ -1,29 +1,22 @@ -// Static content page specification. (These are static pages coded into the -// wiki data folder, used for a variety of purposes, e.g. wiki info, -// changelog, and so on.) +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 write(staticPage) { - const page = { - type: 'page', - path: ['staticPage', staticPage.directory], - page: ({html, transformMultiline}) => ({ - title: staticPage.name, - stylesheet: staticPage.stylesheet, +export function pathsForTarget(staticPage) { + return [ + { + type: 'page', + path: ['staticPage', staticPage.directory], - main: { - content: html.tag('div', {class: 'long-content'}, [ - html.tag('h1', staticPage.name), - transformMultiline(staticPage.content), - ]), + contentFunction: { + name: 'generateStaticPage', + args: [staticPage], }, - - nav: {simple: true}, - }), - }; - - return [page]; + }, + ]; } |