Open ZackPlauche opened 6 days ago
Interesting. We do work with such a component. In our codebase it is called StoryblokLink
too.
Some suggestions to make this work which definitely should be considered:
<NuxtLink :external="true"/>
the link is "External" too when it starts with e.g mailto:; tel:
resolve_links: 'url'
is set. This passes the full story object to a potential link where the translated slug can be inside. (Full_slug <= should contain the correct link if the lang parameter has been passed to Storyblok)/
. This should be optional I guess in this component. So all links which are /home
should be able to be replaced by just a /
. That's to ensure no duplicated URLs (Duplicated Content) are created and we don't need to handle canonical tags. useStoryblokLinkConstructor / useStoryblokLinkResolver()
which outputs the link needed to render in a NuxtLink. This is pretty useful when resolving something on demand or when creating custom Javascript code to either download something or similar.
Description
As a developer using Storyblok SDK I want a link component that easily handles all potential scenarios for the Storyblok link field so I don't re-write the same logic and have a faster experience developing with Storyblok and converting my components to work properly :)
Suggested solution or improvement
I'd like to add a built-in Storyblok component called
StoryblokLink
that handles all of the different situations from the Storyblok link field.Something like:
Usage:
Additional context
No response
Validations