_config.yml defaults for multiple layout types / Minimal Mistakes

Hi

I am using the Minimal Mistakes theme installed as a gem on a local server. I am configuring the _config.yml to try and get the author sidebar, and navigation in the sidebar on all pages on the entire site. This is the current code.

defaults:
  # _posts
  - scope:
      path: ""
      type: posts
    values:
      show_date: true
      author_profile: true
      sidebar:
        nav: "lenker"

Using this code in _config.yml I have been able to get the sidebars and navigation on all “posts” type pages, so it works. But I am unable to get it working on the first page (index). Where it lists the posts excerpt.

I have tried adding a home.html in the _layouts folder and adding it in the front matter but that didnt work.

I tried duplicating the above code in _config.yml but changing “type posts” to “type: home” instead but that didnt work.

I am probably not understanding something here.

Can someone give me pointers to how I can get this working? Thanks :slight_smile:

Have a look at Jekyll’s documentation for front matter defaults. I don’t think type: home is valid. You’ll probably want to target the home file using something like path: “index.html”

Or just add it directly to the front matter of the page since it’s only one file.

---
layout: home
show_date: true
author_profile: true
sidebar:
  nav: "lenker"
---

Thank you for the advice, but it does not work.

My home.html looks like this.

---
layout: archive
show_date: true
author_profile: true
sidebar:
  nav: "lenker"
---

I copied the default home.html from the template folder into the _layouts folder, and added the lines. But it wont show up on the front page. Only on the posts pages.

I have restarted the webserver, and built the site again.

Figured it out. I had to add the following to the front matter in index.html.

---
layout: home
author: TheAuthor
author_profile: true
sidebar:
  nav: "lenker"
---

I had forgot to add the actual author to the front matter. Only author_profile,thats why it wasnt displaying anything. Hope my stupidity helps someone else…