How to make the front page a normal piece of content?

Hi

I’m having a heck of a time figuring this out - and I feel like it should be easy, and that I’m missing something so simple…

I am able to make an “about” page simple enough - hugo new about.md - populate it, undraft it, and it shows up basically right away in it’s internal server. Same for any number of 1st level menu pages.

I cannot wrap my brain around how to get basic content to show up on the home page / . I have tried:

  • Read the docs at https://gohugo.io/templates/homepage/ - this seems to suggest that I need to make a custom template for the home page. I’m OK with that - the home page won’t have any content other than a single blurb of text - but I still don’t know where to put the content.
  • Content/index.md - This generates an “index” in the menu bar (in addition to Home and About). Both Home and index are empty.
  • content/_index.md - No menu entry here, but the content doesn’t appear either. It’s as if it doesn’t exist.
  • content/index/_index.md - I forget where I had seen this referenced, but this doesn’t generate content either.

I recongnize the power in any tool like this is that it can be made into anything and fit a wide range of needs… but I’m lost on how to put a simple piece of content as my front page.

I am using v0.19-DEV from the git repo.

Thanks in advance for any help!

I’m really green to Hugo … just started with it today, with the intent of making a simple website for a club my kids are in. 6 pages, no active content, thinking that this is a great opportunity to learn a tool like this (versus Jekyll or whatnot).

What do you have in layouts/index.html?

Yes, the critical question is posed by @rdwatters. How this is used depends on your layout’s index.html.

layouts/index.html doesn’t exist.

After posting last night, I switched themes (to hugo-bootstrap) and found that content/index.md now created content on the front page. I also note that hugo-bootstrap has a layout/index.html within its theme, whereas the first theme I was experimenting with did not.

So, maybe the theme that I was working with is incomplete?

This is likely the case. The content in index.md and _index.md just define the content. They need to be incorporated in the templates to show up on the page.

True, but if you don’t have a template at layouts/index.html, it should default to layouts/_default/list.html. See the way the list cascade works out here for the homepage:

In terms of index.md vs _index.md, I would recommend using only the latter. Since v18, _index.md is the preferred way to add content to what was previously considerd a “list page” and index.md may was a previous hack that had unpredictable results w/r/t the order in which the pages were rendered. If you can point to a GH repo, I might be able to provide more insight if you have any other questions…

HTH.