From d3dfbb13b7037c9382bd8418e475ac4208216f39 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 30 Jun 2017 21:34:30 +0200 Subject: feat: add basic h-card to homepage header --- config/default.toml | 2 +- src/responders.js | 8 ++++---- src/templates/layout.html | 4 ++-- test/app.test.js | 37 +++++++++++++++++++++++++++++++++---- 4 files changed, 40 insertions(+), 11 deletions(-) diff --git a/config/default.toml b/config/default.toml index acda778..9db7540 100644 --- a/config/default.toml +++ b/config/default.toml @@ -2,7 +2,7 @@ port = 3000 [site] -title = "Test Site" +author = "John Doe" [posts] folder = "./posts" diff --git a/src/responders.js b/src/responders.js index acfcaf1..7671141 100644 --- a/src/responders.js +++ b/src/responders.js @@ -80,7 +80,7 @@ module.exports = { .inner(".posts", function(postsTemplate) { return postsStream.pipe(postsTemplate.map(renderPostListItem(ctx))); }) - .pipe(setTitle(config.site.title)) + .pipe(setTitle(config.site.author)) .render() ); }, @@ -94,7 +94,7 @@ module.exports = { .outer("main", showPage("post")) .inner("article h1", rheo(post.data.get("title"))) .outer("article main", rheo(post.body)) - .pipe(setTitle(config.site.title, post.data.get("title"))) + .pipe(setTitle(config.site.author, post.data.get("title"))) .render() ); }, @@ -106,11 +106,11 @@ module.exports = { .layout() .pipe(rheo()) .outer("main", showPage("taxon")) - .inner("h1", rheo(config.site.title)) + .inner("h1", rheo(config.site.author)) .inner(".posts", function(postsTemplate) { return taxonItems.pipe(postsTemplate.map(renderPostListItem(ctx))); }) - .pipe(setTitle(config.site.title)) + .pipe(setTitle(config.site.author)) .render() ); } diff --git a/src/templates/layout.html b/src/templates/layout.html index 994ce02..7856917 100644 --- a/src/templates/layout.html +++ b/src/templates/layout.html @@ -5,8 +5,8 @@