Skip to content

Related blog component #3768

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

Blargian
Copy link
Member

@Blargian Blargian commented May 7, 2025

Summary

Adds a related blog component which uses the keywords on each page to search for related blog posts.

Overview:

  • adds src/components/RelatedBlogs which queries Algolia blogs index and displays the results
  • adds RelatedBlogs to src/theme/DocItem/Layout/index.js such that it shows at the bottom of each page. If a page specifies show_related_blogs: false then it will not show.
  • adds keywords to many pages as they return better results than the fallback method detailed below.

Notes:

  • The component searches first on keywords
  • If no keywords exist, it falls back to title
  • If no results are returned, nothing is displayed

To do:

  • Be able to specify docs directories from docusaurus.config.js so that it's not necessary to add show_related_blogs to each page individually (eg. we would want to exclude all reference docs).
  • Mobile styling + further styling tweaks
  • Only index blogs less than 18 months old

Checklist

@Blargian Blargian requested review from a team as code owners May 7, 2025 18:48
@Blargian Blargian requested a review from laeg May 7, 2025 18:48
Copy link

vercel bot commented May 7, 2025

@Blargian is attempting to deploy a commit to the ClickHouse Team on Vercel.

A member of the Team first needs to authorize it.

@Blargian Blargian linked an issue May 7, 2025 that may be closed by this pull request
@Blargian Blargian removed the request for review from laeg May 7, 2025 20:09
Copy link

vercel bot commented May 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clickhouse-docs ✅ Ready (Inspect) Visit Preview May 12, 2025 8:48am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
clickhouse-docs-ru ⬜️ Ignored (Inspect) Visit Preview May 12, 2025 8:48am
clickhouse-docs-zh ⬜️ Ignored (Inspect) Visit Preview May 12, 2025 8:48am

@@ -0,0 +1,3180 @@
{
Copy link
Contributor

@gingerwizard gingerwizard May 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets not checkin

Copy link
Contributor

@gingerwizard gingerwizard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Lets default to false and replace the existing related blog posts which are static - if a page has current related, we'll show
  2. Move the keywords to the CMS and extract with Algolia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Related blogs component
2 participants