|
| 1 | +const WEEKDAYS = [ |
| 2 | + "https://schema.org/Monday", |
| 3 | + "https://schema.org/Tuesday", |
| 4 | + "https://schema.org/Wednesday", |
| 5 | + "https://schema.org/Thursday", |
| 6 | + "https://schema.org/Friday", |
| 7 | +] as const |
| 8 | + |
| 9 | +export type CommunityHubSchemaData = { |
| 10 | + /** Override for Place name. Default: "Ethereum Community Hub ({location})" */ |
| 11 | + hubName?: string |
| 12 | + /** Override for EventSeries name. Default: "Open Ethereum Coworking Hours" */ |
| 13 | + eventSeriesName?: string |
| 14 | + eventDescription: string |
| 15 | + address?: { |
| 16 | + streetAddress: string |
| 17 | + addressLocality: string |
| 18 | + postalCode?: string |
| 19 | + addressCountry: string |
| 20 | + } |
| 21 | + containedInPlace?: { |
| 22 | + name: string |
| 23 | + url?: string |
| 24 | + } |
| 25 | + schedule: { |
| 26 | + startDate?: string |
| 27 | + startTime?: string |
| 28 | + endTime?: string |
| 29 | + repeatFrequency: string |
| 30 | + byDay: string | readonly string[] |
| 31 | + scheduleTimezone: string |
| 32 | + } |
| 33 | +} |
| 34 | + |
| 35 | +/** |
| 36 | + * Structured data metadata for community hubs. |
| 37 | + * Used to generate JSON-LD Service + Place + EventSeries schemas |
| 38 | + * for regional search discovery. |
| 39 | + * |
| 40 | + * Keys must match hub IDs in community-hubs.ts. |
| 41 | + * hub.location is used as areaServed city name (no need to duplicate here). |
| 42 | + * hubName defaults to "Ethereum Community Hub ({location})" if omitted. |
| 43 | + * eventSeriesName defaults to "Open Ethereum Coworking Hours" if omitted. |
| 44 | + */ |
| 45 | +export const communityHubSchemas: Record<string, CommunityHubSchemaData> = { |
| 46 | + london: { |
| 47 | + eventDescription: |
| 48 | + "Open community coworking for Ethereum builders at Encode Hub in London.", |
| 49 | + address: { |
| 50 | + streetAddress: "41 Pitfield St", |
| 51 | + addressLocality: "London", |
| 52 | + postalCode: "N1 6DA", |
| 53 | + addressCountry: "GB", |
| 54 | + }, |
| 55 | + containedInPlace: { |
| 56 | + name: "Encode Hub", |
| 57 | + url: "https://hub.encode.club/", |
| 58 | + }, |
| 59 | + schedule: { |
| 60 | + repeatFrequency: "P1D", |
| 61 | + byDay: WEEKDAYS, |
| 62 | + scheduleTimezone: "Europe/London", |
| 63 | + }, |
| 64 | + }, |
| 65 | + |
| 66 | + berlin: { |
| 67 | + hubName: "Ethereum Foundation Office (Berlin)", |
| 68 | + eventSeriesName: "Ethereum Community Hub Berlin -- Co-working Wednesdays", |
| 69 | + eventDescription: |
| 70 | + "Every Wednesday the Ethereum Foundation office opens for builders, researchers, creators, students, and explorers to co-work, connect, and collaborate.", |
| 71 | + schedule: { |
| 72 | + startTime: "10:00", |
| 73 | + endTime: "20:00", |
| 74 | + repeatFrequency: "P1W", |
| 75 | + byDay: "https://schema.org/Wednesday", |
| 76 | + scheduleTimezone: "Europe/Berlin", |
| 77 | + }, |
| 78 | + }, |
| 79 | + |
| 80 | + "hong-kong": { |
| 81 | + eventDescription: |
| 82 | + "Open community coworking for Ethereum builders at DoBe Hub in Hong Kong.", |
| 83 | + address: { |
| 84 | + streetAddress: "83 King Lam St", |
| 85 | + addressLocality: "Cheung Sha Wan", |
| 86 | + addressCountry: "HK", |
| 87 | + }, |
| 88 | + containedInPlace: { |
| 89 | + name: "DoBe Hub", |
| 90 | + }, |
| 91 | + schedule: { |
| 92 | + repeatFrequency: "P1D", |
| 93 | + byDay: WEEKDAYS, |
| 94 | + scheduleTimezone: "Asia/Hong_Kong", |
| 95 | + }, |
| 96 | + }, |
| 97 | + |
| 98 | + rome: { |
| 99 | + eventDescription: "Open community coworking for Ethereum builders in Rome.", |
| 100 | + address: { |
| 101 | + streetAddress: "Largo Dino Frisullo", |
| 102 | + addressLocality: "Rome", |
| 103 | + addressCountry: "IT", |
| 104 | + }, |
| 105 | + schedule: { |
| 106 | + repeatFrequency: "P1D", |
| 107 | + byDay: WEEKDAYS, |
| 108 | + scheduleTimezone: "Europe/Rome", |
| 109 | + }, |
| 110 | + }, |
| 111 | + |
| 112 | + dubai: { |
| 113 | + eventDescription: |
| 114 | + "Open community coworking for Ethereum builders at Hadron Founders Club in Dubai.", |
| 115 | + address: { |
| 116 | + streetAddress: "Warehouse 21-22, Al Qouz Industrial Third, Al Quoz", |
| 117 | + addressLocality: "Dubai", |
| 118 | + addressCountry: "AE", |
| 119 | + }, |
| 120 | + containedInPlace: { |
| 121 | + name: "Hadron Founders Club", |
| 122 | + url: "https://luma.com/HadronFC", |
| 123 | + }, |
| 124 | + schedule: { |
| 125 | + repeatFrequency: "P1D", |
| 126 | + byDay: WEEKDAYS, |
| 127 | + scheduleTimezone: "Asia/Dubai", |
| 128 | + }, |
| 129 | + }, |
| 130 | + |
| 131 | + lagos: { |
| 132 | + eventDescription: |
| 133 | + "Open community coworking for Ethereum builders at Web3Bridge in Lagos.", |
| 134 | + address: { |
| 135 | + streetAddress: "25 Talabi Ademola Street, Abadek Avenue, Ogunlewe St", |
| 136 | + addressLocality: "Igbogbo Ikorodu", |
| 137 | + postalCode: "104102", |
| 138 | + addressCountry: "NG", |
| 139 | + }, |
| 140 | + containedInPlace: { |
| 141 | + name: "Web3Bridge", |
| 142 | + url: "https://www.web3bridge.com/", |
| 143 | + }, |
| 144 | + schedule: { |
| 145 | + repeatFrequency: "P1D", |
| 146 | + byDay: WEEKDAYS, |
| 147 | + scheduleTimezone: "Africa/Lagos", |
| 148 | + }, |
| 149 | + }, |
| 150 | + |
| 151 | + sf: { |
| 152 | + eventDescription: |
| 153 | + "Open community coworking for Ethereum builders at Frontier Tower in San Francisco.", |
| 154 | + address: { |
| 155 | + streetAddress: "995 Market St", |
| 156 | + addressLocality: "San Francisco", |
| 157 | + postalCode: "94103", |
| 158 | + addressCountry: "US", |
| 159 | + }, |
| 160 | + containedInPlace: { |
| 161 | + name: "Frontier Tower", |
| 162 | + url: "https://frontiertower.io/", |
| 163 | + }, |
| 164 | + schedule: { |
| 165 | + repeatFrequency: "P1D", |
| 166 | + byDay: WEEKDAYS, |
| 167 | + scheduleTimezone: "America/Los_Angeles", |
| 168 | + }, |
| 169 | + }, |
| 170 | +} |
0 commit comments