-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Describe the problem
Currently SvelteKit templating is fairly simple: it replaces %svelte.head% and %svelte.body% entries in app.html.
However, sometimes it is necessary to augment some parts of app.html that are outside of Svelte's control.
For example, for i18n one needs to be able to change the lang attribute on <html> or set a class on <body> tag.
Describe the proposed solution
It would be useful if SvelteKit provided some built-in templating solution for app.html that extends beyond replacing %svelte.head% and %svelte.body% and provides access other request parameters.
Alternatives considered
It is possible to do such templating in handle hook. For example, we can define some logic in app.html in EJS format and then run the templating engine on response.body before returning it from the hook.
Importance
would make my life easier
Additional Information
No response