feat: generate product comparison pages for curated products - #205
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Adds auto-generated 1-to-1 comparison pages (
/compare/{a}-vs-{b}/) for a curated set of notable products, built entirely at Hugo build time from existing product data.content/compare/_content.gotmpl) emits one page per unordered pair of products that appear in the allowlist AND share a category. Comparisons never cross categories (no CMS vs Content provider).data/compare.yaml(53 products), so the set is explicit and easy to curate. Current output: 1,378 pages./compare/landing page is rendered (build.render: neveron the section).Why a curated allowlist
Full pairwise across all ~600 products is ~171,000 pages / ~9 GB, which exceeds the GitHub Pages 1 GB serving limit and would overflow a single sitemap. The allowlist keeps the set to recognizable products buyers actually shortlist: ~50 products is the sweet spot (page count grows as n(n-1)/2 within a category). The list is trivial to extend by editing
data/compare.yaml.SEO
<title>, meta description, canonical, and OG/Twitter tags per page via the existinghead.html.Files
content/compare/_content.gotmpl- pair generator (allowlist + same-category)content/compare/_index.md- section set to never renderlayouts/compare/single.html- comparison layout with generated SEO textdata/compare.yaml- curated product allowlistlayouts/products/single.html- "Compare with" links on allowlisted pagescontent/updates/2026-07-27.md- changelog entryNotes
public/.