Hi <@UFT11FKSP>, Just wanted to check do we have a...
# kilua
s
Hi @Robert Jaros, Just wanted to check do we have any option at the moment to specify metadata(keywords, title, desc, openGraph etc.) about the page specific to a particular route just like we have in next js ?
r
No, there is no such option. Please open an issue.
s
r
Do you have some suggestions how to implement this feature? There is no "Page" concept in Kilua, just a composable Router function with a number of nested routes. For static export I use external list of url addresses (from a configuration file). But metadata generation should be fully dynamic, so it should be somehow bound to the routes.
In one of my own Kilua projects (Spring Boot based) I use custom SSR configuration with Thymeleaf template instead of static
index.html
, just to add custom, dynamic metadata. But I'm not sure this solution can be easily generalized.
s
Yeah, By page i mean for each route specifically. May be something we need to do in route block. May be we can do something like just adding it via meta tags if possible with options like name, title, description and property attribute etc. Then we can specify the meta tags of each route specifically and while navigating, we need to update those special meta tags of the page. Though i have not explored kilua deeply yet. But that is just a suggestion if possible.
Hi @Robert Jaros, What do you think, is it seems feasible to implement, As i am considering this for some of my projects for which i was considering the next js currently ?
r
Hi, I'll take a closer look at this next week. It seems like an important feature and I think it should be possible.
s
Ok thanx. Also i was checking the meta element in kilua, it does not have name, content properties and it is a kind of wrapper over HTMLMetaElement from kotlinx browser api , which have these properties? IF we can expose them in kilua dev.kilua.html.Meta as well. Just like we have in kotlinx-html-js, there we can specify meta by tag:
Copy code
meta { 
    name = "description"
    content = "App description"
}
Then it should be very easy i think then.