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
Currently, when setting page titles in Vike, we have to manually handle title templates for each page. Having built-in support for title templates would improve developer experience and provide a consistent way to handle page titles across the application.
Current Workaround
Currently, we have to manually concatenate titles:
config({title: `My Site | ${pageContext.config.meta?.title}`,});
Proposed Solution
Add support for title templates similar to other meta frameworks. For example:
exportdefault{meta: {titleTemplate: '%s | My Site',// or (title) => `${title} | My Site`}}
Then in page components:
config({title: 'Articles',// Would automatically become "Articles | My Site"})
The text was updated successfully, but these errors were encountered:
Description
Description
Currently, when setting page titles in Vike, we have to manually handle title templates for each page. Having built-in support for title templates would improve developer experience and provide a consistent way to handle page titles across the application.
Current Workaround
Currently, we have to manually concatenate titles:
Proposed Solution
Add support for title templates similar to other meta frameworks. For example:
Then in page components:
The text was updated successfully, but these errors were encountered: