Skip to content

Blog Index page sections and feed exclusions - #1744

Open
maribedran wants to merge 198 commits into
mainfrom
blog-feed-exclusions
Open

Blog Index page sections and feed exclusions#1744
maribedran wants to merge 198 commits into
mainfrom
blog-feed-exclusions

Conversation

@maribedran

Copy link
Copy Markdown
Collaborator

One-line summary

Allow filtering by tags; add feed exclusions to the Blog Index Page and create new blog article sections for the page.

Significant changes and points to review

  • Add a new ?tag=<slug> filter to /blog/all/ and /blog/topic/<slug>/ listings
  • Add a new Feed Exclusions field to the Blog Index page to exclude tags and topics from listings
    • The exceptions for the exclusions are listings filtering explicitly for the tag or topic
  • Change the BlogCardsListBlock to list N articles from a tag or topic
  • Create the BlogLatestArticlesBlock to list N most recent articles
  • Implement the Blog Index page logic for displaying articles in the sections:
    • Articles already shown in previous sections are excluded from each section filtering
    • Tags or topics from Feed Exclusions are excluded from sections, unless the section explicitly filters by them
  • Refactor the Blog Index page views so each route only builds the context it needs for its own rendering

Issue / Bugzilla link

https://mozilla-hub.atlassian.net/browse/WT-1494
https://mozilla-hub.atlassian.net/browse/WT-1495

Testing

Run ./manage.py load_page_fixtures and check http://localhost:8000/en-US/flare-docs/sample-pages/test-blog-index/

maribedran and others added 30 commits August 4, 2026 18:04
The 0125 slot is taken by 0125_referralhubpage_extra_content_and_more on
this branch, so 0125_blogtopic becomes 0126 and the topic repoint becomes
0127, with dependencies rewired.
…into WT-1488-blog-topics

    #	git update-ref -d MERGE_HEAD
Pull the select_related/prefetch_related/defer chain into a module-level article_list_queryset() used by both the listing routes and the StreamField article prefetch, and split BlogIndexPage's topic and article queries into live_articles()/get_all_topics(). No behaviour change.

Claude-Session: https://claude.ai/code/session_01KCFWwomEFf6br8y2cB84qy
blog_all_page.html inlined the article-list-item loop and its pagination; move both into cms/includes/blog-article-list.html so the upcoming topic page can share one copy. Callers now set pagination_prev_url and pagination_next_url.

Claude-Session: https://claude.ai/code/session_01KCFWwomEFf6br8y2cB84qy
Move the featured-articles markup and the illustration_card_media macro out of blog_index_page.html into cms/includes/, so the upcoming BlogTopicPage renders the same header without a second copy. The partial takes featured_articles from context instead of reading page.featured_articles directly.

Claude-Session: https://claude.ai/code/session_01KCFWwomEFf6br8y2cB84qy
List a topic's articles most-recent-first at /blog/topics/{slug}/, paginated 10 per page. get_topic_context() is the single definition of that listing so the upcoming BlogTopicPage can reuse it; an unknown or unpublished topic slug 404s.

Claude-Session: https://claude.ai/code/session_01KCFWwomEFf6br8y2cB84qy
An optional per-topic page whose curated heading and featured articles replace the plain topic name at topics/<slug>/, with the automatic list still rendering below minus whatever is featured. get_url_parts() reports the route URL and route() 404s, so the route URL is the page's only URL; clean() rejects a second page for a topic already covered.

Claude-Session: https://claude.ai/code/session_01KCFWwomEFf6br8y2cB84qy
The index header topics, the all-articles topic chips and the all-topics grid now link to /blog/topics/{slug}/ instead of /blog/all/?topic={slug}. The all route keeps accepting ?topic= unchanged, including BlogCardsListBlock.link_filter and the clear-filter link.

Claude-Session: https://claude.ai/code/session_01KCFWwomEFf6br8y2cB84qy
The fixture blog now has a BlogTopicPage for Privacy featuring its 4 most recent articles, so loading fixtures exercises both the curated and the plain topic variant, and the fixture translation test covers the new page type.

Claude-Session: https://claude.ai/code/session_01KCFWwomEFf6br8y2cB84qy
@lucianoratamero lucianoratamero self-assigned this Aug 19, 2026
Base automatically changed from WT-1543-blog-article-base-styles to main August 20, 2026 20:56
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.

3 participants