From 5932a61a78c84733744b0de6db65704f3d5e8fd6 Mon Sep 17 00:00:00 2001 From: Mark Crossfield Date: Thu, 9 Aug 2018 14:23:57 +0100 Subject: [PATCH] Add `{{ content }}` to `home` layout (#1775) * Add `{{ content }}` to `home` layout Allow the author to add content which will appear above the list of recent posts. This also allows the `home` layout to be extended. Add text to index.html in tests to indicate that the content appears in the correct spot. * Add paragraph markup Since this is a HTML file, proper paragraph markup is needed. --- _layouts/home.html | 2 ++ test/index.html | 2 ++ 2 files changed, 4 insertions(+) diff --git a/_layouts/home.html b/_layouts/home.html index bcce92aba457..d1428ebb0bb5 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -2,6 +2,8 @@ layout: archive --- +{{ content }} +

{{ site.data.ui-text[site.locale].recent_posts | default: "Recent Posts" }}

{% for post in paginator.posts %} diff --git a/test/index.html b/test/index.html index b95bb1f56f4c..98d8242ce999 100644 --- a/test/index.html +++ b/test/index.html @@ -2,3 +2,5 @@ layout: home author_profile: true --- + +

This text should appear above the recent posts.