generatePages property

bool generatePages
final

Whether the generator emits a page per record, and static paths for them during static generation, from this model's published records.

A generated page is not necessarily public. Who may open it is the model's view policy, exactly as for any other read: a model whose policy admits only signed-in readers, an owner or a role has private, auth-guarded pages, and a refused reader gets 404.

On by default: every model gets a page per record at /<plural-kebab-model>/:<key> unless it says generatePages: false. What a page shows is decided by the model's other declarations, not by this flag. A @DVModel.sensitiveField(), and the fields that identify a model's privacy subject:, are never on a page, in its head or structured data, in static output or in the sitemap, except for a viewer the model's viewSensitive policy admits. A record the model's view policy refuses has no page: it answers 404, exactly as a record that does not exist.

Models that stand for accounts and credentials -- a User, a Session, an ApiToken, an AuditLog, a row that is its own privacy subject -- and tenant-scoped models get no page unless they ask for one with generatePages: true.

The field-scoped constructors carry the same default so no annotation states a second one; a field's value is never read.

Implementation

final bool generatePages;