Skip to content

Commit

Permalink
Add {{ content }} to home layout (mmistakes#1775)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
mrmanc authored and mmistakes committed Aug 9, 2018
1 parent 68780c0 commit a3709cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
layout: archive
---

{{ content }}

<h3 class="archive__subtitle">{{ site.data.ui-text[site.locale].recent_posts | default: "Recent Posts" }}</h3>

{% for post in paginator.posts %}
Expand Down
2 changes: 2 additions & 0 deletions test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
layout: home
author_profile: true
---

<p>This text should appear above the recent posts.</p>

0 comments on commit a3709cd

Please # to comment.