Skip to content

feat: generate product comparison pages for curated products - #205

Merged
514sid merged 1 commit into
mainfrom
experiment/compare-pages
Jul 27, 2026
Merged

feat: generate product comparison pages for curated products#205
514sid merged 1 commit into
mainfrom
experiment/compare-pages

Conversation

@514sid

@514sid 514sid commented Jul 27, 2026

Copy link
Copy Markdown
Member

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.

  • A Hugo content adapter (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).
  • The allowlist lives in data/compare.yaml (53 products), so the set is explicit and easy to curate. Current output: 1,378 pages.
  • Each page has a generated SEO intro, side-by-side logo cards, and a spec table (category, HQ, founded, platforms, open source, self-signup, API, docs) pulled live from each product's data, so pages are differentiated rather than thin.
  • Product pages for allowlisted products gain a "Compare {name} with" section linking to every same-category peer, so the comparison pages are internally linked and crawlable.
  • No /compare/ landing page is rendered (build.render: never on 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

  • Unique <title>, meta description, canonical, and OG/Twitter tags per page via the existing head.html.
  • Comparison pages enter the sitemap; 1,378 URLs stays well under the 50k single-file limit.

Files

  • content/compare/_content.gotmpl - pair generator (allowlist + same-category)
  • content/compare/_index.md - section set to never render
  • layouts/compare/single.html - comparison layout with generated SEO text
  • data/compare.yaml - curated product allowlist
  • layouts/products/single.html - "Compare with" links on allowlisted pages
  • content/updates/2026-07-27.md - changelog entry

Notes

  • Impact is scoped: only the 53 allowlisted product pages change; the other ~570 render identically.
  • Full build with comparisons runs in ~1.6s and adds ~15 MB to public/.

@514sid
514sid merged commit eaa1372 into main Jul 27, 2026
3 checks passed
@514sid
514sid deleted the experiment/compare-pages branch July 27, 2026 15:12
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.

1 participant