PagesOptions

Properties
NameTypeDescription
customRoutesArray.<PagesRoute>

The custom routes.

customUrlsPagesCustomUrlsOptions

The URLs to the custom pages.

enableLocalizationBoolean

Is true if pages should be localized; this has no effect on custom page redirects.

enableRouterBoolean

Is true if the pages router should be enabled; this is required for any of the pages options to take effect. Caution, this is an experimental feature that may not be appropriate for production.

forceRedirectBoolean

Is true if responses should always be redirects and never content, false if the response type should depend on the request type (GET request -> content response; POST request -> redirect response).

localizationFallbackLocaleString

The fallback locale for localization if no matching translation is provided for the given locale. This is only relevant when providing translation resources via JSON file.

localizationJsonPathString

The path to the JSON file for localization; the translations will be used to fill template placeholders according to the locale.

pagesEndpointString

The API endpoint for the pages. Default is 'apps'.

pagesPathString

The path to the pages directory; this also defines where the static endpoint '/apps' points to. Default is the './public/' directory.

placeholdersObject

The placeholder keys and values which will be filled in pages; this can be a simple object or a callback function.