diff --git a/layouts/shortcodes/github-pages.html b/layouts/shortcodes/github-pages.html index d5d1887..d32560c 100644 --- a/layouts/shortcodes/github-pages.html +++ b/layouts/shortcodes/github-pages.html @@ -43,7 +43,12 @@ const urlCell = row.insertCell(2); const repoUrl = repo.html_url; - const pagesUrl = repo.homepage; + let pagesUrl; + if (repo.homepage !== null) { + pagesUrl = repo.homepage; + } else { + pagesUrl = `https://${username}.github.io/${repo.name}` + } nameCell.innerHTML = `${repo.name}`; descriptionCell.textContent = repo.description;