let div = document.getElementById('main'); let divText = div.innerHTML; console.log(divText); let newPageHTML = `${pageTop}${divText}${pageBottom}` document.body.innerHTML = newPageHTML function goToLink(link) { window.location.href = link } // Write latest commits to page let commitsDiv = document.getElementById("commits") commitsDiv.innerHTML = commits // Write latest blog to home page let latestBlogDiv = document.getElementById("latestBlog"); let blogText = `
${blogs[blogs.length - 1][0]}
${blogs[blogs.length - 1][1]} ${blogs[blogs.length - 1][3] ? `
${blogs[blogs.length - 1][3].map(image => `${image}`).join('')}
` : ''}` let blogHTML = `${blogText}` latestBlogDiv.innerHTML = blogHTML