Gets the page's SEO-related link tags.
Use the links
property to get a page's SEO-related link tags which provide additional
SEO information about your page. For example, the tags may contain a link to a canonical
or alternate version of the current page.
Note:
You should always invoke the wixSeoFrontend.links
getter outside of the onReady()
event handler to
ensure receiving the proper response.
function links(): Promise<Array<Link>>;
import { seo } from "@wix/site-seo";
const wixClient = createClient({ host: site.host(), modules: { seo } });
let links = await wixClient.seo.links();
/* links:
*
* [
* {
* "rel": "canonical",
* "href": "http://mysite.com/canonical_version"
* }, {
* "rel": "author",
* "href": "http://mysite.com/janedoe"
* }
* ]
*/
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.