Skip to content

Add flag dont show blog in the gallery#1769

Open
carlosabadia wants to merge 1 commit intomainfrom
carlos/show-blog-cards-flag
Open

Add flag dont show blog in the gallery#1769
carlosabadia wants to merge 1 commit intomainfrom
carlos/show-blog-cards-flag

Conversation

@carlosabadia
Copy link
Collaborator

No description provided.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 9, 2026

Greptile Summary

This PR correctly implements the show_in_cards feature for hiding blog posts from listing surfaces while keeping them routable. The changes are sound and well-distributed across all listing call-sites (blog gallery, navbar, about page news section, and post sidebar). The filtering logic in blog_data_visible() properly excludes posts marked show_in_cards: False while route generation still includes all posts, preserving their accessibility via direct URLs. No functional issues detected.

Confidence Score: 5/5

  • Safe to merge with no functional issues identified.
  • The implementation is correct and complete. All four listing surfaces properly use blog_data_visible() to filter posts, while hidden posts remain accessible via their direct routes. The feature is properly integrated without breaking existing functionality.
  • No files require special attention.

Important Files Changed

Filename Overview
pcweb/pages/blog/paths.py Adds blog_data_visible() function that correctly filters posts by the show_in_cards metadata flag. Functional and correct.
pcweb/pages/blog/blog.py Refactors component_grid() to use blog_data_visible() via list comprehension. Route generation correctly still iterates blog_data, ensuring all posts remain routable.
pcweb/pages/blog/page.py Uses blog_data_visible() for the "More Posts" sidebar. Hidden posts correctly fall back to showing the first 3 visible posts since they won't be found by title.
pcweb/pages/about/views/news.py Switches to blog_data_visible() for the "What's New In Reflex" section. Correctly displays up to 3 visible posts.
pcweb/views/marketing_navbar.py Uses blog_data_visible() in the navbar blog dropdown with proper empty-list handling. Improves safety compared to the original code.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[blog/ markdown files] --> B[get_blog_data]
    B --> C[blog_data\nmodule-level dict\nall posts]
    C --> D{blog_data_visible}
    D -->|show_in_cards != False| E[Visible posts list]
    D -->|show_in_cards == False| F[Excluded from UI]
    C --> G[blog_routes\nall posts accessible via URL]
    E --> H[component_grid\nblog listing page]
    E --> I[blog_column\nnavbar dropdown]
    E --> J[news section\nabout page]
    E --> K[more_posts\nblog detail page]
    G --> L[Individual blog\npost pages]
    F -.->|still routed| L
Loading

Last reviewed commit: f82e3c8

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.

1 participant