all repos — archive/homestead @ 6fd0c4b95eb82e5c60b3740dabcfe4590fe78d82

My future indieweb platform

fix(Responders): fix incorrect post URLs

Alan Pearce
commit

6fd0c4b95eb82e5c60b3740dabcfe4590fe78d82

parent

ab3c5ffb57980359a186936aa6fc2894f58eb625

2 files changed, 3 insertions(+), 1 deletion(-)

changed files
M src/responders.jssrc/responders.js
@@ -38,7 +38,7 @@ }
const renderPostListItem = ctx => post => ({ a: { - href: ctx.getURL(post, post.basename), + href: ctx.getURL("post", post.basename), _text: post.data.get("title") } });
M test/app.test.jstest/app.test.js
@@ -33,6 +33,7 @@ t.is($("head > title").text(), "John Doe");
t.is($("h1").text(), "John Doe"); t.is($("main").length, 1); t.is($("main .posts").length, 1); + t.is($(".post:first-of-type a").attr("href"), "/post/testfile"); return $; }) .then(toMicroformatsOptions)
@@ -94,6 +95,7 @@ .then(parseResponse)
.then($ => { t.is($("head > title").text(), "A · John Doe"); t.is($(".post a").text(), "This is a test"); + t.is($(".post:first-of-type a").attr("href"), "/post/testfile"); }); });