Refactor AI section headers and unify report layouts #1262
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change simplifies the header logic across the AI section by removing "magic" front matter variables (top_header, hide_title) in favor of standard Hugo variables (.Title, .Parent.Title) and explicit layouts.
The previous implementation relied on complex conditional logic and custom front matter to manage header visibility and hierarchy. This was fragile and hard to maintain. By standardizing on core Hugo features, we make the templates more readable and predictable.
Preview URLs
Key Changes
Layouts
layouts/ai/single.html: Refactored to standard H1 titles. Added logic to display .Parent.Title as an "eyebrow" for context (e.g., "AI Research Insights").layouts/ai/report.html: Created a new layout specifically for Report and Errata pages. This enforces an H2 styling for the page title, distinguishing reports from standard articles.layouts/ai/overview.html: Updated to use .Title instead of top_header.Content
top_headerandhide_titlefrom all AI content files.reportlayout to the Capabilities Model and Gen AI Report pages.report/index.md) to support the new hierarchy.Redirects
Added redirects to support the gen-ai-report restructuring.
Tests
Updated playwright tests to reflect the new structure and headings
Documentation
Updated
styleguide.mdto discourage the use of magic front matter variables.Fixes #1223