Skip to content

add json-ld to blogs#1768

Merged
Alek99 merged 2 commits intomainfrom
carlos/update-blog-meta
Mar 6, 2026
Merged

add json-ld to blogs#1768
Alek99 merged 2 commits intomainfrom
carlos/update-blog-meta

Conversation

@carlosabadia
Copy link
Collaborator

No description provided.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 6, 2026

Greptile Summary

This PR adds JSON-LD structured data to blog posts with a new blog_jsonld helper function and a _normalize_image_url utility in pcweb/meta/meta.py. The JSON-LD implementation correctly builds a @graph with BlogPosting entries and optional FAQPage data when FAQ items are present in the post frontmatter.

Key Finding:

  • The new _normalize_image_url helper duplicates URL normalization logic that already exists inline in create_meta_tags. The existing function should be refactored to call the new helper to avoid code duplication.

The PR demonstrates the feature by adding a faq frontmatter block to one sample blog post and injects the JSON-LD script as the first child of the page section in page.py.

Confidence Score: 4/5

  • Safe to merge. The JSON-LD implementation is sound; the flagged issue is a code quality concern that should be fixed before landing.
  • The PR successfully implements JSON-LD structured data for blog posts with correct schema.org conventions. One code quality issue — duplicated URL normalization logic — should be consolidated for maintainability. No functional bugs or breaking changes detected.
  • pcweb/meta/meta.py should refactor create_meta_tags to call the new _normalize_image_url helper instead of duplicating the logic inline.

Comments Outside Diff (1)

  1. pcweb/meta/meta.py, line 99-109 (link)

    The new _normalize_image_url helper (lines 112–116) duplicates the inline normalization logic already in this function (lines 99–102). The logic should be consolidated by calling the helper here:

Last reviewed commit: 7d60dc8

@Alek99 Alek99 merged commit 8156447 into main Mar 6, 2026
10 checks passed
@Alek99 Alek99 deleted the carlos/update-blog-meta branch March 6, 2026 19:37
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.

2 participants