Skip to content

Fix {Description} placeholder not replaced in non-content-item page templates - #27

Draft
bsstahl with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-description-field-search-pages
Draft

Fix {Description} placeholder not replaced in non-content-item page templates#27
bsstahl with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-description-field-search-pages

Conversation

Copilot AI commented May 6, 2026

Copy link
Copy Markdown

Non-content-item templates (Search Pages, Contact, Archive, etc.) that use {Description} would emit the literal placeholder rather than a meaningful value — e.g., <meta name="description" content="{Description}">.

Changes

  • TemplateProcessor.cs — Added {Description}pageTitle replacement in ProcessNonContentItemTemplate. For Search Pages, pageTitle is "Tag: {tag}", consistent with how {Title} is already populated from the same value.
  • TemplateProcessor_ProcessNonContentItemTemplate_Should.cs — Added ReplaceTheDescriptionPlaceHolderWithThePageTitle test asserting both presence of the resolved value and absence of the raw {Description} token.
// Before
return template.Content
    .Replace("{Title}", pageTitle)
    .Replace("{ByLine}", String.Empty)
    .ReplaceNonContentItemSpecificVariables(...);

// After
return template.Content
    .Replace("{Title}", pageTitle)
    .Replace("{Description}", pageTitle)   // ← added
    .Replace("{ByLine}", String.Empty)
    .ReplaceNonContentItemSpecificVariables(...);

…ncluding Search Pages)

Agent-Logs-Url: https://github.com/bsstahl/PPTail/sessions/2a49ced6-7a87-4b18-a33c-7e59b65392be

Co-authored-by: bsstahl <8053235+bsstahl@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix description form-field population for search pages Fix {Description} placeholder not replaced in non-content-item page templates May 6, 2026
Copilot finished work on behalf of bsstahl May 6, 2026 17:52
Copilot AI requested a review from bsstahl May 6, 2026 17:52
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.

Description form-field of Search Pages is not populated correctly

2 participants