Skip to content

fix: add conditional meta tag for noindex when no articles are present - #2876

Merged
petesfrench merged 1 commit into
mainfrom
WD-38391
Aug 20, 2026
Merged

fix: add conditional meta tag for noindex when no articles are present#2876
petesfrench merged 1 commit into
mainfrom
WD-38391

Conversation

@petesfrench

@petesfrench petesfrench commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Done

  • add conditional meta tag for noindex when no articles are present

QA

  • curl -s http://localhost:8002/knowledge/company | grep -i 'name="robots"' will return <meta name="robots" content="noindex" />
  • curl -s http://localhost:8002/knowledge/cloud-and-infrastructure | grep -i 'name="robots"' will return nothing

Issue / Card

Fixes https://warthogs.atlassian.net/browse/WD-38391

Copilot AI lite review requested due to automatic review settings August 20, 2026 08:25
@webteam-app

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an SEO safeguard to the Knowledge category index template so category pages with no available articles are marked as noindex, reducing the chance of empty/placeholder pages being indexed.

Changes:

  • Introduces an extra_metatags block in the Knowledge category base template.
  • Conditionally injects <meta name="robots" content="noindex" /> when the articles list is empty/falsy.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@petesfrench
petesfrench requested a review from britneywwc August 20, 2026 08:27
@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.65%. Comparing base (65596b5) to head (4afb8e5).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2876   +/-   ##
=======================================
  Coverage   74.65%   74.65%           
=======================================
  Files          19       19           
  Lines        2379     2379           
=======================================
  Hits         1776     1776           
  Misses        603      603           
Flag Coverage Δ
python 74.65% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@britneywwc britneywwc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, LGTM

@petesfrench
petesfrench merged commit 9487e75 into main Aug 20, 2026
33 of 37 checks passed
@petesfrench
petesfrench deleted the WD-38391 branch August 20, 2026 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants