GraphQL
The GraphQL API is a great way to integrate Advanced SEO with your headless front end.
Enable GraphQL
Enable GraphQL in the addon's config:
SEO Fields
The Advance SEO data of your entries and terms is separated into three distinct fields:
Fields | Description |
---|---|
| Contains computed fields like the |
| Contains the augmented data of the SEO blueprint fields |
| Contains the rendered Advanced SEO |
The easiest way to get the data is to use the seo
field on Statamic's existing entries
, entry
, terms
, and term
queries:
Available Queries
SEO Meta
The seoMeta
query is an alternative to using the seo
field on the entries
, entry
, terms
, and term
queries.
Argument | Type | Description |
---|---|---|
|
| The ID of the entry/term to query |
|
| Specify the site of your entry/term. This is only necessary when dealing with a term, as the term's ID isn't unique per site. But it can also be helpful if you want to get an entry in a different site. |
Get the computed title of an entry:
Get the computed title of the brands
term of the tags
taxonomy in the german
site:
SEO Defaults
Use the seoDefaults
query to get the default data. The query consists of three fields:
Fields | Description |
---|---|
| Get site defaults like |
| Get the defaults of a specific collection |
| Get the defaults of a specific taxonomy |
Site Defaults
Argument | Type | Description |
---|---|---|
|
| Specify the site of the returned data |
Get the site_name
from the general
site defaults:
Get the data from the german
site:
Collection Defaults
Argument | Type | Description |
---|---|---|
|
| The handle of the collection to query |
|
| Specify the site of the returned data |
Get the title
from the pages
collection defaults:
Get the data from the german
site:
Taxonomy Defaults
Argument | Type | Description |
---|---|---|
|
| The handle of the taxonomy to query |
|
| Specify the site of the returned data |
Get the title
from the tags
taxonomy defaults:
Get the data from the german
site:
SEO Sitemaps
Use the seoSitemaps
query to get the data of your collection, taxonomy, and custom sitemaps. The query consists of three fields sharing the same structure:
Fields | Description |
---|---|
| Get the collection sitemaps |
| Get the taxonomy sitemaps |
| Get the custom sitemaps |
Get the loc
of all collection, taxonomy, and custom sitemaps:
Argument | Type | Description |
---|---|---|
|
| Change the base URL of your sitemap data. |
|
| Filter the sitemaps by handle of their collection, taxonomy, or custom sitemap. |
|
| Filter the data by site. |
Last updated