all repos — archive/homestead @ 4df9074e0fc8db381d94fb4680a5d7dee3d096de

My future indieweb platform

fix: add page title to header

Alan Pearce
commit

4df9074e0fc8db381d94fb4680a5d7dee3d096de

parent

5eb982dc5b8c4853931bdfa3b216c35720dd8b98

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

changed files
M src/responders.jssrc/responders.js
@@ -42,7 +42,10 @@
function setTitle(siteTitle, pageTitle) { return rheo.template(function(s) { return s - .inner("title", rheo((pageTitle ? " · " : "") + siteTitle)) + .inner( + "title", + rheo(pageTitle ? `${pageTitle} · ${siteTitle}` : siteTitle) + ) .inner("body header h1", rheo(siteTitle)); }); }
M test/app.test.jstest/app.test.js
@@ -34,6 +34,7 @@ .expect(200)
.expect(/^<!DOCTYPE html>/) .then(parseResponse) .then($ => { + t.is($("head > title").text(), "This is a test · " + config.site.title); t.is($("article h1").text(), "This is a test"); t.is( $("article p").text(),