Home page not displaying content

I’m building a website. I want to put intro content on the home page, but for some reason it just shows a list of posts. Here’s what I’ve tried:

  • layout: single or no layout in the YAML
  • type: homepage or type: page or no type in the YAML
  • naming the file index.md or _index.md
  • putting the file in content/index.md or content/home/index.md

One clue: the title from the YAML only shows up sometimes, and when it does it’s sometimes from several versions of the file ago. I’ve been using the title to indicate the filename and where it is as I try to figure this out.

Sometimes, deleting a file from somewhere else seems to change things. For example,I put index.md in content and it looks like it works (title shows that it’s using that file because my YAML says “/content/index”). So I delete the index and _index files from the home directory and then my homepage goes back to being a list page again.

And sometimes I don’t change any of the YAML, filenames, or file locations, just add a space or delete a word in the index.md file, and it works! Then reload and it doesn’t work!

What am I doing wrong?

UPDATE: it seems to be working at the moment with layout:single and type:homepage in _index.md in content. I will try removing the home directory since maybe I don’t need it.

Hi there,

It is easier to help you if your code is somewhere we can replicate like in a repo. Otherwise we are only guessing. Please have a read about Requesting Help

Fair enough. Thanks. It’s in a repo, but at the moment it’s also working, so no action right now I guess :slight_smile: