Not able to start with Hugo after installing it

I have installed Hugo.

I checked it with

$ hugo version

Hugo Static Site Generator v0.58.3/extended darwin/amd64 BuildDate: unknown

So it is installed.

I added index.html code to layouts

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" 
    href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" 
    integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" 
    crossorigin="anonymous">
    <title>{{ .Title }}</title>
  </head>  
  <body>
    <div class="container">
      <main id="main">
        <div id="home-jumbotron" class="jumbotron text-center">
          <h1>{{ .Title }}</h1>
          <p class="font-125">{{ .Site.Params.homeText | markdownify }}</p>
        </div>
      </main>
    </div>
  </body>
</html>

and added this code to config.toml

baseURL = "http://example.org/"
languageCode = "en-us"
title = "New site"
disableKinds = ["taxonomy", "taxonomyTerm"]

[params]
  homeText = "You just made a Hugo blog from scratch."

When I run hugo server I am getting this error:

found no layout file for “HTML” for “home”: You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

I don’t know why, I’m new to Hugo and I do need advice.
Thanks!

Check out this tutorial here: Hugo 101: Slowstart for beginners
That should solve your issue(s).

Hmm I saw it but didn’t I do the same. I have read some more explanations but it seems same as I did.

Do you have a home template? Such as:

layouts/index.html

Incorrect. You missed the step for adding a template to render the home page. Start over, and follow the directions.

1 Like

Yes I do have it.

For home if you mean content/_index.md I do have it.
Here is my folder structure:

30%20PM

Maybe I don’t have right structure.

Here are a couple things that might help:

  • Make sure that you are in the project root directory when you run hugo or hugo server.

  • The first file found in the following home page lookup order is the layout file that is used. These paths are relative to the project root directory.

  1. layouts/index.html.html
  2. themes/themename/index.html.html
  3. layouts/home.html.html
  4. themes/themename/home.html.html
  5. layouts/list.html.html
  6. themes/themename/list.html.html
  7. layouts/index.html
  8. themes/themename/index.html
  9. layouts/home.html
  10. themes/themename/home.html
  11. layouts/list.html
  12. themes/themename/list.html
  13. layouts/_default/index.html.html
  14. themes/themename/_default/index.html.html
  15. layouts/_default/home.html.html
  16. themes/themename/_default/home.html.html
  17. layouts/_default/list.html.html
  18. themes/themename/_default/list.html.html
  19. layouts/_default/index.html
  20. themes/themename/_default/index.html
  21. layouts/_default/home.html
  22. themes/themename/_default/home.html
  23. layouts/_default/list.html
  24. themes/themename/_default/list.html

I actually prefer to use 21 (layouts/_default/home.html) and that’s what I use in TGIH: Themeless & Gitless Introduction to Hugo ← maybe this tutorial will help you…