@pagehub/sdk/page-settings/fields is the list of a page's settings, with each one's default. PageHub's page settings form and its settings API both read this list, so a field is added in one place.
TypeScript
The fields
Each entry is { key, nodePath?, defaultValue }. key is the flat name a form and the API use; nodePath is where the value is stored, when that differs (the SEO fields live under seo.*).
| Group | Keys |
|---|---|
| Basic | pageSlug, pathPattern |
SEO (stored under seo.*) | pageTitle, pageDescription, pageKeywords, pageAuthor, ogTitle, ogDescription, ogImage, ogType (default website), twitterCard (default summary_large_image), twitterSite, twitterCreator, canonicalUrl, jsonLd, schema |
| Advanced | headCode, footerCode, bodyClass, hideHeader, hideFooter, hideChrome, pagePassword, themeOverrides |
| Access | conditionGroups, pageConditionFailAction, pageConditionRedirectUrl, pageConditionFallbackPageId |
The page name and the home and 404 flags aren't in the list: they're handled on their own.
Helpers
PAGE_SETTINGS_KEYS: just the keys, for an allowlist.pageSettingsDefaults(): an object with every key set to its default.readSettingsProps(source): reads every field from stored props (followingnodePath), filling in defaults.writeSettingsProps(target, values): writes a set of values back to their storage paths, and removes a flat copy of a field that moved underseo.*.