Title

Global

Methods

# AuthorTags(seoConfig, …params)

AuthorTags adds the twitter:creator tag for story pages

Parameters:
Name Type Attributes Description
seoConfig *
params * <repeatable>

See Generator for other Parameters

View Source src/author-tags.js, line 10

# abstract Generator(seoConfig, config, pageType, data, opts) → {Object}

This is the signature of a generator, though this sample generator is unused

Please see the following list of generators

Parameters:
Name Type Description
seoConfig Object

The configuration passed into SEO class. Please see the individual generators for which properties are used

config Object

The configuration object. Please see the Config API

pageType string

The page type currently being rendered. Usually something like 'home-page'

data Object

The data returned by the loadData function

opts Object

Option

url string

The current URL being served

View Source Generator.js, line 21

A map of all tags. ex: {"og:image": "https://my.domain/image.png"}

Object

# ImageTags(seoConfig, …params)

ImageTags adds the og and twitter images

For a story page, this comes from the hero image. For a collection page (including home and section pages), the image will come from the collection hero image.

If the current story URL contains a cardId in the query parameters, then the title and description will come from card["social-share"]

Parameters:
Name Type Attributes Description
seoConfig *
enableOgTags boolean

Add og tags for Facebook

enableTwitterCards boolean

Add twitter tags

params * <repeatable>

See Generator for other Parameters

View Source src/image-tags.js, line 90

# StaticTags(seoConfig, …params)

StaticTags puts whatever tags you've passed to it

Parameters:
Name Type Attributes Description
seoConfig *
staticTags Object

List of tags to be added. ex: {"viewport": "width=device-width,initial-scale=1.0"}

params * <repeatable>

See Generator for other Parameters

View Source src/static-tags.js, line 12

# StoryAmpTags(seoConfig, …params)

StoryAmpTags adds the amphref to stories which support amp.

Parameters:
Name Type Attributes Description
seoConfig *
ampStoryPages boolean | "public"

Should amp story pages be shown for all stories (true), not shown (false), or only be shown for public stories ("public"). Default: true

appendHostToAmpUrl boolean

If set to true, the url to be appended to the slug is computed based on the currentHostUrl and the domain slug, else the url is taken as the sketches host. Default: false

decodeAmpUrl boolean

If set to true, the storySlug that goes as the amp href url is decoded, else the storyslug is encoded. Default: false

params * <repeatable>

See Generator for other Parameters

View Source src/amp-tags.js, line 40

# StructuredDataTags(seoConfig, …params)

StructuredData adds tags for schema.org's structured data

Parameters:
Name Type Attributes Description
seoConfig *
structuredData StructuredDataConfig

Please see StructuredDataConfig for a full list of supported options

params * <repeatable>

See Generator for other Parameters

View Source src/structured-data/structured-data-tags.js, line 384

# TextTags(seoConfig, …params)

TextTags adds the majority of basic tags, such as

  • Canonical URLs
  • Title and Description
  • Keywords

If the current URL contains a cardId in the query parameters, then the title and description will come from card["social-share"]

Parameters:
Name Type Attributes Description
seoConfig *
enableOgTags boolean

Add og tags for Facebook

enableTwitterCards boolean

Add twitter tags

enableNews boolean

Add tags for Google News, like news_keywords

customTags Object

Add tags for a custom page type. Usually looks like {"custom-page": {"title": "value", "canonicalUrl": "value"}}

params * <repeatable>

See Generator for other Parameters

View Source src/text-tags.js, line 210

Type Definitions

# Organization

Options for a schema.org Organization Example

{
  name: "Quintype",
  url: "http://www.quintype.com/",
  logo: "https://quintype.com/logo.png",
  sameAs: ["https://www.facebook.com/quintype","https://twitter.com/quintype_in","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"]
}

View Source src/structured-data/structured-data-tags.js, line 328

# StructuredDataConfig

Options to StructuredDataTags

Properties:
Name Type Description
enableBreadcrumbList boolean

Should breadcrumbs be enabled (default true)

enableLiveBlog boolean

Should LiveBlog schema be implemented for live blogs (default false)

enableVideo boolean

Should VideoObject be enabled for video stories (default false)

enableNewsArticle boolean | "withoutArticleSchema"

If set to true, then both Article and NewsArticle schema are implemented. If set to "withoutArticleSchema", then only NewsArticle is implemented

organization Organization

The organization to put on the homepage. See Organization for an example

website Website

The website and search urls. See Website for an example

header Object

Enable WPHeader tag. ex: {cssSelector: ".header"}

footer Object

Enable WPFooter tag. ex: {cssSelector: ".footer"}

structuredDataTags Array

An array of tags describing the publisher. eg: {structuredDataTags: ["section-page", "tag-page"]}

isSubscriptionsEnabled boolean

Enable subscription based schema (default false)

isShowcaseProduct boolean

Should product type be showcase (default false, fallback: basic)

View Source src/structured-data/structured-data-tags.js, line 358

# Website

Options for a schema.org Website Example

{
  url: 'https://www.quintype.com/',
  searchpath: 'search?q={q}',
  queryinput: 'required name=q',
  name: 'Quintype',
  headline: 'Quintype - Discover news',
  keywords: 'news,quintype'
}

View Source src/structured-data/structured-data-tags.js, line 342