~xdavidwu/xdavidwu.link

07f192eae16b5b610c649f37ffa902d4aa03702b — Darren Hart 6 years ago 7c6bfff
v2: Introduce show_overlay_excerpt and document  (#1436)

Make excerpts optional in header overlay

Some posts and some header images don't lend themselves well to
displaying the excerpt in the overlay. Make this optional by
introducting a new boolean variable:

`page.header.show_overlay_excerpt`

Set it to implicitly default to `true` so existing users are unaffected by
testing explicitly for "!= false".

This can be enabled globally for a site by changing the default to `false`
in the local _config.yml, or per page by specifying the value in front
matter.

Document show_overlay_excerpt variable

* Add show_overlay_excerpt variable to the Header Overlay field documentation table.

Close #1429 
1 files changed, 1 insertions(+), 1 deletions(-)

M _includes/page__hero.html
M _includes/page__hero.html => _includes/page__hero.html +1 -1
@@ 42,7 42,7 @@
          {{ page.title | default: site.title | markdownify | remove: "<p>" | remove: "</p>" }}
        {% endif %}
      </h1>
      {% if page.excerpt %}
      {% if page.header.show_overlay_excerpt != false and page.excerpt %}
        <p class="page__lead">{{ page.excerpt | markdownify | remove: "<p>" | remove: "</p>" }}</p>
      {% endif %}
      {% if site.read_time and page.read_time %}