diff --git a/README.md b/README.md index a534337..047bd02 100644 --- a/README.md +++ b/README.md @@ -33,10 +33,13 @@ The generated site will be in the `dist/` folder. Create a Markdown file in the appropriate `content/` subfolder: -- `content/products/` - Swedish products -- `content/services/` - Swedish services -- `content/experiences/` - Swedish experiences -- `content/manufacturers/` - Swedish manufacturers +| Folder | Category | Description | +|--------|----------|-------------| +| `content/products/` | Produkter | Physical Swedish products (e.g., Dalahäst, Orrefors glass) | +| `content/manufacturers/` | Tillverkare | Companies that design/manufacture products (e.g., Fjällräven, Hasselblad) | +| `content/shops/` | Butiker | Retail stores selling products (e.g., Göteborg Manufaktur) | +| `content/services/` | Tjänster | Service providers, both physical and digital (e.g., SJ, Mediaflow) | +| `content/experiences/` | Upplevelser | Experiences, events, and cultural activities (e.g., Icehotel, Midsommar) | ### Content Format diff --git a/build.js b/build.js index 9c1766d..feb36d0 100644 --- a/build.js +++ b/build.js @@ -14,7 +14,8 @@ const CATEGORY_LABELS = { manufacturers: 'Tillverkare', products: 'Produkter', services: 'Tjänster', - experiences: 'Upplevelser' + experiences: 'Upplevelser', + shops: 'Butiker' }; // Badge tiers (highest to lowest) @@ -207,8 +208,14 @@ function extractFilters(entries) { const categories = [...new Set(entries.map(e => e.category).filter(Boolean))].sort(); const regions = [...new Set(entries.map(e => e.region).filter(Boolean))].sort(); const tags = [...new Set(entries.flatMap(e => e.tags || []))].sort(); + const badges = [...new Set(entries.map(e => e.badge).filter(Boolean))].sort((a, b) => { + // Sort by tier (highest first) + const tierA = BADGE_TIERS[a]?.tier || 99; + const tierB = BADGE_TIERS[b]?.tier || 99; + return tierA - tierB; + }); - return { categories, regions, tags }; + return { categories, regions, tags, badges }; } // Generate filter HTML @@ -224,6 +231,10 @@ function generateFilterHTML(filters) { const tagOptions = filters.tags.map(t => `` ).join(''); + + const badgeOptions = filters.badges.map(b => + `` + ).join(''); return `
@@ -241,6 +252,13 @@ function generateFilterHTML(filters) { ${regionOptions}
+
+ + +