API reference of `@frontity/head-tags` package
This package is designed to get automatically all the metadata that the REST API Head Tags plugin exposes in the REST API (SEO metadata from plugins like Yoast SEO or All in One SEO), and add them as meta tags in the
<head>section of the rendered page.
head-tagspackage to your project:
npm i @frontity/head-tags
Do this in your root and include it in your
As it works automatically, It doesn't have settings itself, but it requires two Frontity parameters to work:
state.frontity.url: The URL of your site. Usually defined in the
@frontity/wp-sourceinstalled and updated to at least the
This package will automatically add all the meta tags defined in WordPress for the page (through plugins like Yoast SEO or All in One SEO) in the
<head>section of the rendered page. So there are no additional steps to do. Just install the package and everything will work out of the box.
It is a function that accepts a
linkas parameter and it returns an array with the
head_tagsfield of that link.
will return something like
content: "Hello world! - My Site",
content: "max-snippet:-1, max-image-preview:large, max-video-preview:-1",