harlan-zw / nuxt-site-config

Unifying site config with powerful and flexible APIs, for module authors and users.

Home Page:https://nuxtseo.com/site-config

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deprecate SiteLink (Discussion)

harlan-zw opened this issue · comments

Details

The <SiteLink> component was introduced as a way for end-users and modules to implement links that respected the trailing slash option.

However, in the latest Nuxt SEO, we now set the default trailing slash for the NuxtLink, this is a recent feature of the Nuxt core (see harlan-zw/nuxt-seo@1879310).

So the only valid usage of SiteLink would now just to be add links that are absolute (which isn't recommended generally) and links with a custom base, which seems quite niche.

Therefore we likely don't need SiteLink anymore and it will be deprecated unless anyone has any good ideas for it to exist.

Related to applying the trailing slash to the NuxtLink. Does this mean that any NuxtLink wrapper (e.g. NuxtLinkLocale from nuxt/i18n) will inherit the same settings and I don't have to add trailing slashes manually?

Yes this looks to be the case but haven't tested it personally.

I'll check it out and report to i18n repo if there's issues. I think with that in hand SiteLink should be deprecated indeed

This is blocked by nuxt/nuxt#25532.

Basically default trailing slash rule in Nuxt is currently blocking