--- import Base from '../layouts/Base.astro'; import { SITE_TITLE, SITE_DESCRIPTION } from '../consts'; import { getCollection } from 'astro:content'; const SECTIONS = [ { slug: 'bincio-tech', label: 'BincioTech', desc: 'Tecnologia, gadget e componenti' }, { slug: 'bincio-officina', label: 'BincioOfficina', desc: 'Manutenzione e riparazioni' }, { slug: 'bincio-tour', label: 'BincioTour', desc: 'Tour, bike packing e rotte' }, { slug: 'bincio-corsa', label: 'BincioCorsa', desc: 'Allenamento e gare' }, { slug: 'bincio-abbigliamento', label: 'BincioAbbigliamento', desc: 'Abbigliamento tecnico' }, ]; const allEntries = await getCollection('entries'); const bySection: Record = Object.fromEntries(SECTIONS.map(s => [s.slug, []])); const docEntries = allEntries .filter(e => e.id.startsWith('_docs/')) .sort((a, b) => a.data.title.localeCompare(b.data.title)); for (const entry of allEntries) { if (entry.id.startsWith('_')) continue; const sec = SECTIONS.find(s => entry.id.startsWith(s.slug + '/')); if (sec) bySection[sec.slug].push(entry); } for (const key of Object.keys(bySection)) { bySection[key].sort((a, b) => (b.data.updatedDate ?? b.data.pubDate ?? new Date(0)).valueOf() - (a.data.updatedDate ?? a.data.pubDate ?? new Date(0)).valueOf() ); } ---

BincioWiki

La memoria collettiva del gruppo Bincio.

{SECTIONS.map(sec => bySection[sec.slug].length > 0 && (

{sec.label}

{sec.desc}

))} {docEntries.length > 0 && (

Documentazione

Come funziona questo wiki

)}