Remove content list from home - Solved

Hi,

I’m trying to make a website with a static homepage without a content list. I’ve set the homepage to the about tab, however, the posts created in the news folder, to appear in the news tab, will also appear at the bottom of the about tab.

I’m using the Midnight theme, and a repository of my site is here.

Thanks for any help.

your home page template is layouts/index.html
Locate the not wanted part and comment it out
PS make a backup copy first!

I don’t have an index.html file in my layouts folder. I moved mine from the contents to there to test if that was the issue, but then the theme doesn’t continue over to the home page. It uses only the html in that file. I also tried checking the layouts folder in the theme, but there was no html file there.

There was multiple index files with various extensions, but I couldn’t find anything to remove the news posts from appearing.

It’s now late, i check your repo tomorrow!

Try to add

layout = "single"

to your front matter in /content/_index.md.

I use it frequently with my own themes.

3 Likes

hi

your front page is generated by

themes/Midnight/layouts/_default/list.html

Copy this file to layout/index.html
you can delete lines 107 to 114

1 Like

Thank you to everyone who helped solve this issue.

Tysm. This helped me a lot.

I actually created

/layouts/_default/home.html

and added my preferred variables.

Then adding

layout = "home"

in the front matter of _index.md

worked like a charm!