Hugo site is not rendering

I do not use any of already existing themes but I am trying to make my own.

I have installed Hugo with command:

#brew install hugo

Version of Hugo is

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

This is how my folder structure looks like:

enter image description here

I have generated it with command:

# hugo new site nameofsite

I have added some content in layouts folder and I am trying to display it but I am getting this error:

INFO 2020/03/19 22:30:32 No translation bundle found for default language "en"
INFO 2020/03/19 22:30:32 Translation func for language en not found, use default.
INFO 2020/03/19 22:30:32 i18n not initialized; if you need string translations, check that you have a bundle in /i18n that matches the site language or the default language.
DEBUG 2020/03/19 22:30:32 Add template file: name "_default/list.html", baseTemplatePath "", path "_default/list.html"
DEBUG 2020/03/19 22:30:32 Add template file: name "_default/single.html", baseTemplatePath "", path "_default/single.html"
DEBUG 2020/03/19 22:30:32 Add template file: name "partials/about.html", baseTemplatePath "", path "partials/about.html"
DEBUG 2020/03/19 22:30:32 Add template file: name "partials/banner1.html", baseTemplatePath "", path "partials/banner1.html"
DEBUG 2020/03/19 22:30:32 Add template file: name "partials/banner2.html", baseTemplatePath "", path "partials/banner2.html"
DEBUG 2020/03/19 22:30:32 Add template file: name "partials/contact.html", baseTemplatePath "", path "partials/contact.html"
DEBUG 2020/03/19 22:30:32 Add template file: name "partials/employee.html", baseTemplatePath "", path "partials/employee.html"
DEBUG 2020/03/19 22:30:32 Add template file: name "partials/footer.html", baseTemplatePath "", path "partials/footer.html"
DEBUG 2020/03/19 22:30:32 Add template file: name "partials/gallery.html", baseTemplatePath "", path "partials/gallery.html"
DEBUG 2020/03/19 22:30:32 Add template file: name "partials/header.html", baseTemplatePath "", path "partials/header.html"
DEBUG 2020/03/19 22:30:32 Add template file: name "partials/hero.html", baseTemplatePath "", path "partials/hero.html"
DEBUG 2020/03/19 22:30:32 Add template file: name "partials/js_scripts.html", baseTemplatePath "", path "partials/js_scripts.html"
DEBUG 2020/03/19 22:30:32 Add template file: name "partials/map.html", baseTemplatePath "", path "partials/map.html"
DEBUG 2020/03/19 22:30:32 Add template file: name "partials/services.html", baseTemplatePath "", path "partials/services.html"
DEBUG 2020/03/19 22:30:32 Add template file: name "partials/top-nav.html", baseTemplatePath "", path "partials/top-nav.html"
DEBUG 2020/03/19 22:30:32 Add template file: name "partials/tours.html", baseTemplatePath "", path "partials/tours.html"
INFO 2020/03/19 22:30:32 Using config file: 
Building sites … INFO 2020/03/19 22:30:32 syncing static files to /Users/teabuzov/Desktop/cvitmodif/cvit_mod/public/
DEBUG 2020/03/19 22:30:33 Render XML for "sitemap" to "/sitemap.xml"
INFO 2020/03/19 22:30:33 found no layout file for "HTML" for "404": You should create a template file which matches Hugo Layouts Lookup Rules for this combination. 

Like it can’t recognize .html pages that I added.

Layouts folder looks like this

enter image description here

And baseof.html

<!DOCTYPE html>
<html lang="en">
{{ partial "header" . }}
<body data-spy="scroll" data-target=".site-navbar-target" data-offset="300">
{{ partial "top-nav" . }}
{{ partial "hero" . }}
{{ partial "services" . }}
{{ partial "about" . }}
{{ partial "banner1" . }}
{{ partial "tours" . }}
{{ partial "banner2" . }}
{{ partial "employee" . }}
{{ partial "contact" . }}
{{ partial "map" . }}
{{ partial "gallery" . }}
{{ partial "footer" . }}
{{ partial "js_scripts" . }}
</body>
</html>

I don’t know why is this happening so any help would be highly appreciated

Hi there,

Please read Requesting Help to see what information we need to be able to help. Screenshots of your folder structure do not help.

1 Like

Thanks for answer :slight_smile: What do you don’t understand in my question?

From the Requesting Help guidelines:

I found what I was missing for it was defining main in baseof.html file like

    {{ block "main" .}}
    {{end}}

and defining it as well in index.html file like

{{define "main" }}

<main>
{{ partial "homepage/employee.html" . }}
</main>
{{end}}

Hope this helps others who encounter same issue! :slight_smile:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.