Back to top anchor
Documentation

Preconfigured HTML metadata via metatags

We are updating our documentation library to be ready for Sector 10! Find out more in our Sector 10 roadmap or head straight to our collection of Sector 10 - Changes and Updates.

User role
Content Administrator Drupal Sitebuilder
Task
Sitebuilding
Topic
Metadata
Product
Sector Starter kit

Even though HTML metadata is not displayed on your site, it is used by search engines, social media platforms, and other web services. For the Sector Starter Kit we have preconfigured a few basic settings to get you started. 

The <meta> tag - a part of your node's source or code - provides metadata to specify the way your content should be displayed. It provides additional information using, amongst others, page descriptions, keywords, and teaser images. 

Required Drupal contribution modules

The Drupal Metatag module is part of the Sector Starter Kit, and includes more than 15 submodules for specific applications. Since Sector D8 beta 2, the Metatag: Open Graph submodule is activated by default. 

Features and functionality

Your metadata configuration should be specific to your site based on your business objectives and your user needs. But there are a few things that most websites have in common, and the Starter Kit provides a set of tools and settings to support further configuration: 

  • A base set of metadata configuration using tokens to reuse your page titles and body summaries for HTML metadata, and 
  • An image style to allow for specific sizes for your social media images.  

Related entities and configuration

Metadata configuration 

<your-domain>/admin/config/media/image-styles/manage/social_media

Pre-configured settings
Type Tag Token
Global canonical_url [current-page:url]
Global title [current-page:title] | [site:name]

Front page
(also Inherits meta tags from: Global)

canonical_url [site:url]
Front page shortlink [site:url]
403 / 404
(also inherits meta tags from: Global)
robots noindex
403 / 404 canonical_url [site:url]
403 / 404 shortlink [site:url]
Content 
(also inherits meta tags from: Global)
canonical_url [site:url]
Content  description [node:summary]*
Content  title [node:title] | [site:name]
Content  og tags and twitter cards We have preconfigured a few og and twitter card tags, please see {your site}/admin/config/search/metatag for details 
Content: News
( also inherits meta tags from: Global, Content)
og tags, twitter cards, and schema org tags We have preconfigured a few og, twitter card and schema tags, please see {your site}/admin/config/search/metatag for details 
Content Resources (optional)  Under review Under review
Taxonomy terms**  module defaults default mapping
User*** module defaults default mapping

*)If your content type does not have a body field, you can add a content type specific metatag using a different text field or a default text.

**) OOTB taxonomy pages are deactivated and no metatags have been added to the the entity fields. Please review the setting, when to configure public taxonomy pages. 

***) OOTB most Sector sites are expected to not have public user profiles no meta tags have been added to the entity fields

Social media image style

<your-domain>/admin/config/media/image-styles/manage/social_media

The social media image style is a helper style so that you can use an existing image in an extra large image style for Twitter cards and Facebook posts. More info can be found in The Sector demo theme and branding assets

Preconfigured OG image tags 

Type

Tag

Token

Open graph 

og_image:

[sector_media:opengraph_image]

Open graph 

og_image_height:

630

Open graph 

og_image_type:

image/jpeg

Open graph 

og_image_url:

[sector_media:opengraph_image]

Open graph 

og_image_width:

1200

Last updated

Sector 10 is coming!

Find out more in our Sector 10 roadmap.

Need Help?

Sector is brought to you by Sparks Interactive - supporting Sector from Wellington and Auckland

Open Source award winner!

Sparks Interactive are delighted to accept the Open Source Use in Business award for Sector and the Sector.nz open source platform.

Subscribe for Sector updates