Add 'photos' field to builded 'partners' dataset

This commit is contained in:
tree 2022-01-09 12:40:44 +01:00
rodič 2be3fbb0a1
revize 4f84069c35
2 změnil soubory, kde provedl 4 přidání a 1 odebrání

Zobrazit soubor

@ -51,12 +51,13 @@ export class UTXOEngine {
// post processing of sub-specs
switch (sp.type) {
case 'speakers':
case 'partners':
for (const s of entry.specs[sp.type]) {
if (!s.photos) {
s.photos = []
}
for (const [it, format] of this.imageTypes) {
if (await exists([this.srcDir, f.name, 'photos', 'speakers', `${s.id}-${it}.${format}`].join('/'))) {
if (await exists([this.srcDir, f.name, 'photos', sp.type, `${s.id}-${it}.${format}`].join('/'))) {
s.photos.push(`${it}:${format}`)
}
}

Zobrazit soubor

@ -22,3 +22,5 @@ items:
twitter:
type: string
pattern: '^[a-zA-Z0-9_]+$'
photos:
type: array