Adding diff link

This commit is contained in:
Shan Carter
2017-02-08 11:45:20 -08:00
parent 97acdc60d6
commit 8162b8ea2d
4 changed files with 9 additions and 3 deletions
+4
View File
@@ -70,6 +70,10 @@ export default function(dom, data) {
div.innerHTML = oldHtml + div.innerHTML;
if (data.githubCompareUpdatesUrl) {
div.innerHTML = `<h3>Updates</h3><p><a href="${data.githubCompareUpdatesUrl}">View changes</a> since article was first published.</p>` + div.innerHTML;
}
el.querySelector("a.github").setAttribute("href", data.githubUrl);
el.querySelector("a.github-issue").setAttribute("href", data.githubUrl + "/issues/new");
el.querySelector(".citation.short").textContent = data.concatenatedAuthors + ", " + '"' + data.title + '", Distill, ' + data.publishedYear + ".";