harlan-zw / nuxt-site-config

Unifying site config with powerful and flexible APIs, for module authors and users.
https://nuxtseo.com/site-config
61 stars 3 forks source link

Deprecate SiteLink (Discussion) #19

Open harlan-zw opened 5 months ago

harlan-zw commented 5 months ago

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 https://github.com/harlan-zw/nuxt-seo/commit/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.

MuhammadM1998 commented 5 months ago

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?

harlan-zw commented 5 months ago

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

MuhammadM1998 commented 5 months ago

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

harlan-zw commented 5 months ago

This is blocked by https://github.com/nuxt/nuxt/issues/25532.

Basically default trailing slash rule in Nuxt is currently blocking