Oct 08, 2020 in Drupal 8, Snippets

Most websites abandon the body field in favor of paragraphs. One flaw this has, is that no longer a summary is provided for your (auto-generated) metatag description. This snippet fixes this issue.

This token will take the first field of your paragraph (typically field_paragraphs), given the fact the first paragraph has a textfield called field_text


Beware of the fact that this is not a perfect implementation. The text can be too long, of the first paragraph can have no field text available. Another solution is to check this post: Scrape first available text from your node and save them as meta description in drupal 8