You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow titleTemplate in middleware's headDefaults #796
titleTemplate can only be set once, for the whole site, in void.config.ts.
resolveHead() in src/pages/head.ts reads the template only from the config layer:
consttemplate=configHead?.titleTemplate;
headDefaults is typed HeadDescriptor, which has no titleTemplate, and a layout can't set head. So nothing can give one section of the site its own template:
This doesn't type check, and if it's cast the template is ignored. Admin tabs read "Users | My Site" like every other page, so they can't be told apart from the app's own tabs. Today each admin page has to build Users | Admin by hand, and leave out the config's titleTemplate, or the site name would be added too.
Proposal
Let headDefaults take titleTemplate, and have resolveHead() use the middleware's template before the config's:
Activity
feat(pages): allow `titleTemplate` in middleware `headDefaults` (void…