varabyte / kobweb

A modern framework for full stack web apps in Kotlin, built upon Compose HTML
https://kobweb.varabyte.com
Apache License 2.0
1.46k stars 65 forks source link

Add support for custom slugs inside @Page annotations #6

Closed bitspittle closed 2 years ago

bitspittle commented 2 years ago

I need to think through this feature. Do we even want to allow it? Will it allow us to specify dynamic routes, e.g. https://nextjs.org/docs/routing/dynamic-routes ?

If we do support it, we need to update the Kobweb gradle plugin to detect the slug name inside the annotation and use it instead of the file name.

bitspittle commented 2 years ago

... and @Api annotations too!

bitspittle commented 2 years ago

@Page annotations are done.

bitspittle commented 2 years ago

Actually closing this for now with just @Page support for now, since that's user visible and API calls are usually on the backend.

If someone wants this feature for API calls later, we can file a new bug then!