Meta description and keywords doesn't rendering in frontend

Created on 23 April 2021, over 3 years ago
Updated 2 July 2024, 6 months ago

I can only see the title in source code of my multi-language website. Other data (description or keywords) is not rendering in frontend.

I just installed the module and updated the default settings. title has been rendered but others have not rendered.
Then I added it to the content type and updated metatags from content and only title works, but the others were not rendered.

Here my html.html.twig

<head-placeholder token="{{ placeholder_token }}">
<title>{{ head_title|safe_join(' | ') }}</title>
<css-placeholder token="{{ placeholder_token }}">
<js-placeholder token="{{ placeholder_token }}">
πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Documentation

Created by

πŸ‡ΉπŸ‡·Turkey byybora Istanbul

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¬πŸ‡§United Kingdom amityweb

    The ONLy way I can get meta data to display is using this tag:
    {{ page.attached }}

    There is ZERO information about this online. There is ZERO information about what tag to use in the theme to add the code, only head_title for the tag.

    If Drupal is supposed to magically add the meta information like descriptions, then it was not for me. In my template there is no tag to output it. So does that mean Drupal does some sort of find and replace to inject it? Which really is not good anyway.

    Using {{ page.attached }} for me outputs all the correct extra META tags now. The strange thing is, even though I added that tag AFTER my tag, the code is added above it which is very strange and annoying.

  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    Thanks for spotting that. I opened πŸ“Œ Document that {{ page.attached }} must be in html.html.twig Active to add it to the documentation.

Production build 0.71.5 2024