Closed sliderzxc closed 11 months ago
Thanks for filing the issue.
I'll answer here for now before the docs are done (which may take a while)
The default way to set your site title globally is inside your site/.kobweb/conf.yaml config file.
site/.kobweb/conf.yaml
If you want to change the title from code, for example on a page by page basis, you can use the Kotlin/JS standard library to do it (document.title)
document.title
If you create a default app (kobweb create app) you'll see I do this in the PageLayout component;
kobweb create app
PageLayout
https://github.com/varabyte/kobweb-templates/blob/fa5cf62f6fc50c91a791f767e2a9fbce0c5eab43/app/default/site/src/site/components/layouts/PageLayout.kt.ftl#L19
Hope that helps!
thanks <3)
Thanks for filing the issue.
I'll answer here for now before the docs are done (which may take a while)
The default way to set your site title globally is inside your
site/.kobweb/conf.yaml
config file.If you want to change the title from code, for example on a page by page basis, you can use the Kotlin/JS standard library to do it (
document.title
)If you create a default app (
kobweb create app
) you'll see I do this in thePageLayout
component;https://github.com/varabyte/kobweb-templates/blob/fa5cf62f6fc50c91a791f767e2a9fbce0c5eab43/app/default/site/src/site/components/layouts/PageLayout.kt.ftl#L19
Hope that helps!