diff options
Diffstat (limited to 'src/data/things/static-page.js')
| -rw-r--r-- | src/data/things/static-page.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/data/things/static-page.js b/src/data/things/static-page.js index 52a09c31..999072d3 100644 --- a/src/data/things/static-page.js +++ b/src/data/things/static-page.js @@ -2,22 +2,25 @@ export const DATA_STATIC_PAGE_DIRECTORY = 'static-page'; import * as path from 'node:path'; +import {V} from '#composite'; import {traverse} from '#node-utils'; import {sortAlphabetically} from '#sort'; import Thing from '#thing'; import {isName} from '#validators'; +import {exposeConstant} from '#composite/control-flow'; import {contentString, directory, flag, name, simpleString} from '#composite/wiki-properties'; export class StaticPage extends Thing { static [Thing.referenceType] = 'static'; static [Thing.friendlyName] = `Static Page`; + static [Thing.wikiData] = 'staticPageData'; static [Thing.getPropertyDescriptors] = () => ({ // Update & expose - name: name('Unnamed Static Page'), + name: name(V('Unnamed Static Page')), nameShort: { flags: {update: true, expose: true}, @@ -35,7 +38,11 @@ export class StaticPage extends Thing { script: simpleString(), content: contentString(), - absoluteLinks: flag(), + absoluteLinks: flag(V(false)), + + // Expose only + + isStaticPage: exposeConstant(V(true)), }); static [Thing.findSpecs] = { @@ -76,8 +83,6 @@ export class StaticPage extends Thing { documentMode: onePerFile, documentThing: StaticPage, - save: (results) => ({staticPageData: results}), - sort({staticPageData}) { sortAlphabetically(staticPageData); }, |