const workflowsList = document.getElementById('workflows') fetch('./workflows.json') .then((response) => response.json()) .then((workflowsJson) => { workflowsJson.workflows.forEach((site) => { let li = document.createElement('li') li.className = "list-group-item" let img = document.createElement('img') let a = document.createElement('a') img.src = site.logo img.alt = site.name a.href = site.script let name = document.createTextNode(site.name) let span = document.createElement('span') span.className = "p-1" a.appendChild(img) span.appendChild(name) a.appendChild(span) li.appendChild(a) workflowsList.appendChild(li) }) });