Show blog post publish date in search results#20077
Conversation
Adds the publish date to blog results in the search dialog. Threads the date through all four layers of the search pipeline, scoped to blog hits: - layouts/index.json: emit a formatted date for blog pages - scripts/search/page.js: carry date onto the Algolia record - autocomplete.ts: render the date under the description for dated hits - _algolia.scss: style it as small muted text (dark-mode safe) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Your site preview for commit cc9f9d5 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-20077-cc9f9d56.s3-website.us-west-2.amazonaws.com |
Lighthouse Performance ReportCommit: cc9f9d5 | Metric definitions
|
Moves the search-result publish date directly beneath the title (above the description), shrinks it slightly (11px), and pulls it snug to the title with a negative top margin so it reads as part of the title rather than the summary. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pre-merge Review — Last updated 2026-07-02T23:37:35ZTip Summary: This is an infrastructure change (Hugo template + JS + SCSS + TypeScript) that surfaces a blog post's publish date on its Algolia search-result card. The four edits form one consistent chain: Review confidence:
Investigation log
🔍 Verification trailNo verifiable claims extracted from this diff. 🚨 Outstanding in this PRNo outstanding findings in this PR.
|
What
Adds the blog post publish date to blog results in the search dialog, as requested by folks searching the blog who wanted a date on each result.
Fixes #13801.
Flying a little bit blind here until the
datefield gets added to Algolia (which'll happen on release), but this should look like this once deployed:How
Threads the date through all four layers of the search pipeline, scoped to blog hits only (docs/registry/etc. records are unchanged):
layouts/index.json— Hugo's search-index JSON now emits a formatteddate(Jan 2, 2006, matching the blog UI) for blog pages that have a non-zero date.scripts/search/page.js— carriesdateonto each Algolia record (undefinedfor non-blog records, keeping them clean).theme/src/ts/algolia/autocomplete.ts— renders the date under the description when a hit has one.theme/src/scss/_algolia.scss— styles it as small muted text. Uses literal Tailwind gray classes that the docs dark-mode block auto-remaps, so it reads correctly in both themes.Notes
public/index.json, then records are re-uploaded). Existing records won't have the field until then.dateis a display-only attribute — deliberately not added to searchable attributes.🤖 Generated with Claude Code