Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Related Content Block #54

Open
kevinfodness opened this issue Dec 4, 2023 · 3 comments
Open

Create Related Content Block #54

kevinfodness opened this issue Dec 4, 2023 · 3 comments
Assignees
Labels
elasticsearch Requires understanding Elasticsearch enhancement New feature or request gutenberg Requires understanding Gutenberg php Requires understanding PHP typescript Requires understanding TypeScript

Comments

@kevinfodness
Copy link
Member

kevinfodness commented Dec 4, 2023

Description

Create a block that can be used with full-site editing to display a list of related posts. Out of the box, it should display 3 posts in a horizontal row.

Use Case

As an editor, I want related posts to appear below the post content on an article page.

Acceptance Criteria

  • This issue builds on the plugin templates structure defined in Create Plugin Templates Feature #51
  • The block should be able to be placed below post content using full site editing and should display a list of 3 related posts horizontally in a row, containing the featured image and post title, both of which should link to the post.
  • Add to the single post template created in create-wordpress-theme

Technical Details

  • This block should assume that Elasticsearch Extensions is installed, active, indexed, and configured.
  • Use a More Like This query in Elasticsearch to populate the list of posts.
  • Ensure that the current post is not in the list of related posts (it shouldn't be, but confirm).
  • Match based on post title, post content, categories, and tags.
  • The block should be placed in plugin-templates/blocks/theme-related-content and the category for the block should be theme.
@kevinfodness kevinfodness added enhancement New feature or request php Requires understanding PHP typescript Requires understanding TypeScript gutenberg Requires understanding Gutenberg elasticsearch Requires understanding Elasticsearch labels Dec 4, 2023
@willowCeleste willowCeleste self-assigned this Jan 24, 2024
@willowCeleste
Copy link
Contributor

After speaking to @jakewrfoster we're blocked on this issue until alleyinteractive/elasticsearch-extensions#42 is resolved. This will allow us to leverage elasticsearch-extensions for our "more like this" query.

@renatonascalves
Copy link
Contributor

Some prior art: https://l.alley.dev/5341360777

@jakewrfoster
Copy link
Member

This is now unblocked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
elasticsearch Requires understanding Elasticsearch enhancement New feature or request gutenberg Requires understanding Gutenberg php Requires understanding PHP typescript Requires understanding TypeScript
Projects
None yet
Development

No branches or pull requests

4 participants