Skip to content

Filter WikiGDrive redirect/conflict pages from listings and search#152

Merged
pierzchala-m merged 3 commits intomasterfrom
copilot/filter-redirect-conflict-search
May 1, 2026
Merged

Filter WikiGDrive redirect/conflict pages from listings and search#152
pierzchala-m merged 3 commits intomasterfrom
copilot/filter-redirect-conflict-search

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 1, 2026

WikiGDrive-generated pages with titles prefixed Redirect to: or Conflict: were leaking into section listing pages and the search index, cluttering navigation and exposing internal content structure to end users.

Changes

  • New partial layouts/partials/is-hidden-page.html — single source of truth for the filter predicate:
    {{- return (or (hasPrefix .Title "Redirect to:") (hasPrefix .Title "Conflict:")) -}}
  • layouts/shortcodes/children.html — skip hidden pages in the {{% children %}} shortcode grid
  • layouts/shortcodes/children-inner.html — same filter for the inline children shortcode
  • layouts/_default/list.html — skip hidden pages in auto-generated section child listings
  • layouts/_default/search.json — exclude hidden pages from the search index entirely

Agent-Logs-Url: https://github.com/mieweb/docs/sessions/99f6a7fa-9a57-41c5-9ae0-c04201ee92b4

Co-authored-by: pierzchala-m <162727606+pierzchala-m@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 1, 2026

Deploying wc-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: d35879a
Status: ✅  Deploy successful!
Preview URL: https://cb0bdea7.wc-docs.pages.dev
Branch Preview URL: https://copilot-filter-redirect-conf.wc-docs.pages.dev

View logs

Copilot AI changed the title [WIP] Filter 'redirect' and 'conflict' from search and page view Filter WikiGDrive redirect/conflict pages from listings and search May 1, 2026
Copilot AI requested a review from pierzchala-m May 1, 2026 15:16
@pierzchala-m pierzchala-m requested a review from ggodlewski May 1, 2026 15:17
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 1, 2026

Deploying eh-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: d35879a
Status: ✅  Deploy successful!
Preview URL: https://060146c7.eh-docs.pages.dev
Branch Preview URL: https://copilot-filter-redirect-conf.eh-docs.pages.dev

View logs

@pierzchala-m pierzchala-m marked this pull request as ready for review May 1, 2026 15:22
@pierzchala-m pierzchala-m requested a review from Copilot May 1, 2026 15:22
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR prevents WikiGDrive-generated redirect/conflict placeholder pages (titles prefixed with Redirect to: / Conflict:) from appearing in user-facing child-page listings and from being indexed into the site search JSON.

Changes:

  • Added a shared Hugo partial predicate (is-hidden-page.html) to identify redirect/conflict pages.
  • Applied the predicate to filter page listings in the children / children-inner shortcodes and in the default section list template.
  • Excluded hidden pages from the generated search.json index.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
themes/mieweb-docs/layouts/shortcodes/children.html Filters hidden pages out of the children card grid listing.
themes/mieweb-docs/layouts/shortcodes/children-inner.html Filters hidden pages out of the inline children list.
themes/mieweb-docs/layouts/partials/is-hidden-page.html New shared predicate partial for redirect/conflict detection.
themes/mieweb-docs/layouts/_default/search.json Excludes hidden pages from the search index output.
themes/mieweb-docs/layouts/_default/list.html Filters hidden pages out of section child page listings.

Comment thread themes/mieweb-docs/layouts/shortcodes/children.html Outdated
Comment thread themes/mieweb-docs/layouts/_default/list.html Outdated
…en are hidden

Agent-Logs-Url: https://github.com/mieweb/docs/sessions/c2b78edf-85b2-40ff-b9eb-6363703f5290

Co-authored-by: pierzchala-m <162727606+pierzchala-m@users.noreply.github.com>
@pierzchala-m pierzchala-m merged commit 2878fc9 into master May 1, 2026
3 checks passed
@pierzchala-m pierzchala-m deleted the copilot/filter-redirect-conflict-search branch May 1, 2026 15: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.

Filter "redirect" and "conflict" from search and page view

4 participants