Title derived from heading appears twice on top of page

I think maybe you haven’t setup the plugin correctly. I just tried it and had no problems getting it to strip the title in front matter and replace with the heading in the body.

Here’s what I did.

  1. Add gem 'jekyll-titles-from-headings' to my Gemfile
  2. Run bundle update to install it
  3. Add jekyll-titles-from-headings to the plugins array in _config.yml
  4. Add the following settings to _config.yml:
    titles_from_headings:
      enabled:     true
      strip_title: true
      collections: true 
    
  5. Added a test post eg. _posts/2018-04-10-title-strip.md
---
title: "Title Strip Test Post"
---

# Title Override

This should have some content.

And, as expected “Title Strip Test Post” title was overrided with what is in the body content. Works on the post page and anywhere else it shows up (like indexes).

2 Likes