Skip to content

Fixes #5446 Improve Description Metatag defaults.#5454

Draft
tadean wants to merge 3 commits intomainfrom
issue/5446
Draft

Fixes #5446 Improve Description Metatag defaults.#5454
tadean wants to merge 3 commits intomainfrom
issue/5446

Conversation

@tadean
Copy link
Copy Markdown
Contributor

@tadean tadean commented Apr 1, 2026

Description

This PR adds a new token, node:az-automatic-summary that computes a generated summary uising the naive TextRank algorithm. This is a deterministic algorithm selects sentences that are computed by graph scoring to be the most significant.

Release notes

An az-automatic-summary token has been added that computes content summaries. This is used for summaries when a description is not specified by the editor.

Related issues

#5446

How to test

  • Create page content
  • Inspect resulting description metatag

Types of changes

Arizona Quickstart (install profile, custom modules, custom theme)

  • Patch release changes
    • Bug fix
    • Accessibility, performance, or security improvement
    • Critical institutional link or brand change
    • Adding experimental module
    • Update experimental module
  • Minor release changes
    • New feature
    • Breaking or visual change to existing behavior
    • Upgrade experimental module to stable
    • Enable existing module by default or database update
    • Non-critical brand change
    • New internal API or API improvement with backwards compatibility
    • Risky or disruptive cleanup to comply with coding standards
    • High-risk or disruptive change (requires upgrade path, risks regression, etc.)
  • Other or unknown
    • Other or unknown

Drupal core

  • Patch release changes
    • Security update
    • Patch level release (non-security bug-fix release)
    • Patch removal that's no longer necessary
  • Minor release changes
    • Major or minor level update
  • Other or unknown
    • Other or unknown

Drupal contrib projects

  • Patch release changes
    • Security update
    • Patch or minor level update
    • Add new module
    • Patch removal that's no longer necessary
  • Minor release changes
    • Major level update
  • Other or unknown
    • Other or unknown

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My change requires release notes.

@tadean tadean self-assigned this Apr 1, 2026
@tadean tadean added enhancement New feature or request visual change Introduces a visual change accessibility editor experience Improvements to the editor experience for individuals editing Quickstart websites user experience Improvements to user experience labels Apr 1, 2026
@tadean tadean added release notes minor release Issues/PRs that should only be made as part of a minor release (according to our release policy). 3.4.x only labels Apr 1, 2026
@tadean
Copy link
Copy Markdown
Contributor Author

tadean commented Apr 1, 2026

Todo:

  • Improve tokenization so that tags that end without punctuation (such as headers) do not run-on into the following sentence. This leads to headers being considered part of the sentence that comes after. Lack of this currently causes some odd summaries.
  • Prefer summary field where possible - this is deliberately not done right now so that the computed summaries can be seen
  • Do not select low-scoring sentences even if it is the "best" sentence
  • Langcode-based stopword handling
  • Allow several sentences in summary, as long as they are high-schoring.

@tadean
Copy link
Copy Markdown
Contributor Author

tadean commented Apr 1, 2026

image
<meta property="og:description" content="Wilbur Wildcat&#039;s book review on The Life of Leonardo da Vinci, exploring the Renaissance master&#039;s boundless creativity and curiosity." />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.4.x only accessibility editor experience Improvements to the editor experience for individuals editing Quickstart websites enhancement New feature or request minor release Issues/PRs that should only be made as part of a minor release (according to our release policy). release notes user experience Improvements to user experience visual change Introduces a visual change

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant