Support shortlink in generateMetadata #65847
Driesigner
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goals
Add support for shortlink in the generateMetadata function.
Non-Goals
No response
Background
Using the generateMetadata function, we can add meta data to the head of the page. By adding an alternate.canonical to the metadata object, next will generate a
<link rel="canonical" href="my.awesome.canonical" />
. But for shortlink, this doesn't seem to be possible.I'm working on a headless drupal project, in which the shortlink should be
https://my.domain/node/node-id
. The node is being fetched in the page component.Proposal
I would suggest a new property
shortlink
in the Metadata alternatives object. This would ensure a similar workflow as the canonical link. It would lead to the generation of<link rel="shortlink" href="my.awesome.shortlink" />
Beta Was this translation helpful? Give feedback.
All reactions