diff --git a/src/content/articles/helical-resonator-filters-field-day.md b/src/content/articles/helical-resonator-filters-field-day.md index de3f42b..1486a2f 100644 --- a/src/content/articles/helical-resonator-filters-field-day.md +++ b/src/content/articles/helical-resonator-filters-field-day.md @@ -5,7 +5,7 @@ author: 'MicroHAMS' date: 2025-10-21 heroImage: '/images/articles/helical-resonator-filter.jpg' tags: ['Field Day', 'HF'] -featured: true +featured: false --- ## Introduction diff --git a/src/content/articles/microhams-field-day-history.md b/src/content/articles/microhams-field-day-history.md index e4d4ea7..d6e499d 100644 --- a/src/content/articles/microhams-field-day-history.md +++ b/src/content/articles/microhams-field-day-history.md @@ -4,7 +4,7 @@ description: 'A look back at MicroHAMS Field Day — the rooftop-garage and park author: 'MicroHAMS' date: 2026-06-14 draft: false -featured: false +featured: true tags: ['Field Day', 'HF'] --- diff --git a/src/content/articles/spring-2026-dxpeditions.md b/src/content/articles/spring-2026-dxpeditions.md index d109357..c6b1228 100644 --- a/src/content/articles/spring-2026-dxpeditions.md +++ b/src/content/articles/spring-2026-dxpeditions.md @@ -3,7 +3,7 @@ title: 'Spring 2026 DXpeditions: April & May on the Air' description: 'A roundup of notable DXpeditions active in April and May 2026, including TX9W to the Marquesas, C5B from the Gambia, and more—right in the peak of Cycle 25 propagation.' author: 'MicroHAMS' date: 2026-04-14 -featured: true +featured: false tags: ['DX', 'propagation', 'HF'] --- diff --git a/src/pages/index.astro b/src/pages/index.astro index aa15dff..43d3027 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -70,16 +70,23 @@ const railEvents = currentAndUpcoming .filter((e: Event) => e !== heroEvent && e !== nextMeeting) .slice(0, 2); -// Don't surface an article about the very event we're already featuring as -// the hero (e.g. the Field Day write-up while Field Day is the hero tile). +// Homepage "Latest": featured articles pin to the top, and a featured +// article is always kept even if it shares the hero event's topic tag. +// Otherwise we drop articles that merely echo the hero (e.g. the Field Day +// write-up while the Field Day event is the hero tile). const heroPrimaryTag = heroEvent?.data.tags?.[0]?.toLowerCase(); -const homeArticles = ( - heroPrimaryTag - ? articles.filter( - (a: Article) => !(a.data.tags ?? []).some((t: string) => t.toLowerCase() === heroPrimaryTag) - ) - : articles -).slice(0, 4); +const homeArticles = articles + .filter( + (a: Article) => + a.data.featured || + !heroPrimaryTag || + !(a.data.tags ?? []).some((t: string) => t.toLowerCase() === heroPrimaryTag) + ) + .sort((a: Article, b: Article) => { + if (a.data.featured !== b.data.featured) return a.data.featured ? -1 : 1; + return (b.data.date?.getTime() ?? 0) - (a.data.date?.getTime() ?? 0); + }) + .slice(0, 4); // Calendar dates render in UTC so a midnight date doesn't shift a day in Pacific const fmtDate = (d: Date) =>