Add "Contribution Record for" prefix to title

Created on 1 August 2025, 15 days ago

Problem/Motivation

Title is the same as issue title. Could confuse google and people in browser history or tabs.

Steps to reproduce

Proposed resolution

Add "Contribution Record for ..." prefix.

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

๐Ÿ‡ญ๐Ÿ‡บHungary Gรกbor Hojtsy Hungary

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

Comments & Activities

  • Issue created by @Gรกbor Hojtsy
  • ๐Ÿ‡ช๐Ÿ‡ธSpain fjgarlin

    Adding more words to the visual title might not be desired. We might want to target only the <title> attribute if that's what Google and browser history cares about.

  • ๐Ÿ‡ช๐Ÿ‡ธSpain fjgarlin

    In this case, it can be done via metatag configuration on the site.

    Config file: config/sync/metatag.metatag_defaults.node__contribution_record.yml
    Contents:

    langcode: en
    status: true
    dependencies: {  }
    id: node__contribution_record
    label: 'Content: Contribution record'
    tags:
      og_title: 'Contribution Records for [node:title]'
      title: 'Contribution Records for [node:title] | [site:name]'
    

    That translates into the following markup:

        <meta property="og:title" content="Contribution Records for Olivero: Center align content (instead of left align)" />
        ...
        <title>Contribution Records for Olivero: Center align content (instead of left align) | Drupal.org</title>
    

    And the h1 of the page is unaffected.

    Browser history:

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States drumm NY, US

    That makes sense to me.

  • ๐Ÿ‡ช๐Ÿ‡ธSpain fjgarlin

    Great. Merged via configuration on the site.

Production build 0.71.5 2024