Skip to content
This repository was archived by the owner on Aug 30, 2018. It is now read-only.
This repository was archived by the owner on Aug 30, 2018. It is now read-only.

Twitter card descriptions #468

@paulmason

Description

@paulmason

Just noticed a bit of an inconsistency https://github.com/Shopify/Timber/blob/master/snippets/social-meta-tags.liquid

Line 46:

<meta property="og:description" content="{{ page_description | escape }}”>

Line 71:

<meta name="twitter:description" content="{{ product.description | strip_html | truncatewords: 140, '' | escape }}”>

Line 77:

<meta name="twitter:description" content="{{ article.excerpt_or_content | strip_html | truncatewords: 140, '' | escape }}”>

The code on line 46 is a bit more versatile. I think line 71, & 77 would be better written as:

<meta name="twitter:description" content="{{ page_description | escape }}”>

The page description is used for the meta description and automatically inherits from the product.description and article.excerpt_or_content. Using the page description gives the user that extra step of control. Sometimes the product descriptions will have html that needs to be rephrased to make sense in plain text.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions