Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Related Posts Block

No security coverage Under active development

This module adds a configurable block that displays semantically related content on your Drupal site. It uses embeddings to find posts that are related by meaning, even if they don't share tags or keywords.

Summary (≤200 characters):

Related Posts Block displays semantically related Drupal content using embeddings, helping visitors discover relevant posts even when they do not share tags or keywords.

Features

Related Posts Block adds a configurable block that finds and displays published nodes related to the current page by meaning, rather than relying only on shared taxonomy terms, keywords, or manual links.

- Select the content type to compare.
- Choose which text fields contribute to matching.
- Optionally include node titles.
- Configure the number of related posts to show.
- Supports Cloudflare Workers AI, OpenAI-compatible embedding APIs, and generic JSON embedding endpoints.
- Caches generated embeddings in Drupal’s key-value store.
- Regenerates embeddings when relevant node content or provider settings change.
- Uses mean-centering and vector normalization to improve semantic match quality.

Use this module when you want automated related content suggestions for articles, knowledge-base pages, blogs, documentation, listings, or other node-based content.

Post-Installation

1. Enable the module at Administration > Extend.
2. Go to Configuration > Content authoring > Related posts block:
`/admin/config/content/related-posts-block`
3. Configure an embedding API provider, endpoint, API token, and model where applicable.
4. Place the “Related posts (embeddings)” block in a theme region.
5. In the block configuration, map the Node context to the node from the current route.
6. Select a content type, choose the text fields to compare, and set the number of results.

The first request may create embeddings for nodes that do not yet have cached vectors. Later page requests reuse stored embeddings until content or settings change.

Additional Requirements

- Drupal 10.3+ or Drupal 11.
- Drupal core Node module.
- An external embedding API.

Supported API formats:

- Cloudflare Workers AI.
- OpenAI-compatible embeddings APIs.
- Generic JSON APIs with configurable request and response paths.

No additional Drupal modules or libraries are required.

A reliable embedding provider is recommended. Cloudflare Workers AI is a practical option for sites that want hosted embeddings without operating a machine-learning service.

Similar projects

Taxonomy- and keyword-based related-content solutions generally match nodes by shared terms or text. Related Posts Block differs by using embeddings to identify conceptually similar content even where posts use different wording and do not share taxonomy tags.

It complements, rather than replaces, editorial curation, taxonomy, search, and recommendation tools.

Supporting this Module

No funding or sponsorship links are currently configured.

Community Documentation

Community documentation, walkthroughs, demo sites, and contributed examples can be added here as they become available.

For now, see the module’s included `README.txt` for installation, configuration, provider setup, and security guidance.

Ask your assistant about Related Posts Block

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Aug 2026
Latest release
1 month ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core PHP Release date
1.0.x-dev Dev 10–11 Aug 27, 2026