diff --git a/frontend/src/components/examples/ExamplesGallery.tsx b/frontend/src/components/examples/ExamplesGallery.tsx index 8de4e064..c5f36d25 100644 --- a/frontend/src/components/examples/ExamplesGallery.tsx +++ b/frontend/src/components/examples/ExamplesGallery.tsx @@ -33,6 +33,8 @@ const BOARD_TABS: BoardTab[] = [ { id: 'esp32', label: 'ESP32 (Xtensa)', color: '#ffffff', bg: '#e77d11' }, { id: 'esp32-cam', label: 'ESP32-CAM', color: '#ffffff', bg: '#d35400' }, { id: 'esp32-c3', label: 'ESP32-C3 (RISC-V)', color: '#ffffff', bg: '#27ae60' }, + { id: 'stm32-bluepill', label: 'STM32 Blue Pill', color: '#ffffff', bg: '#0a7ea4' }, + { id: 'stm32-blackpill', label: 'STM32 Black Pill', color: '#ffffff', bg: '#2d3436' }, { id: 'attiny85', label: 'ATtiny85', color: '#ffffff', bg: '#5d4037' }, { id: 'multi', label: 'Multi-Board', color: '#ffffff', bg: '#7b2d8b' }, { id: 'analog', label: 'Analog', color: '#ffffff', bg: '#0ea5a5' }, @@ -40,8 +42,12 @@ const BOARD_TABS: BoardTab[] = [ ]; function getBoardFilter(example: ExampleProject): string { - if (example.boards) return 'multi'; + // An explicit boardFilter is the author's intent and wins — even for + // examples authored with the multi-board `boards[]` format (e.g. the STM32 + // single-board examples). Genuinely multi-board examples with no boardFilter + // still fall through to 'multi'. if ((example as any).boardFilter) return (example as any).boardFilter; + if (example.boards) return 'multi'; return example.boardType ?? 'arduino-uno'; }