There is no file in the public folder

yesterday I started with HUGO and greated some easy files in the folder content ( and to get a feeling how HUGO works.
I make index.html in the layouts folder
the and stay simple: title, date and draft

no themes
I started the hugo server in the root

localhost:1313 displays the content of the index.html
localhost:1313/kontakt/ or localhost:1313/about/ shows the 404 page not found

AND I can not see any file in the public folder!

Would be great if anyone can help.

Thank you

This is why it is advised to use Quick Start | Hugo guide. You don’t have a single.html layout file, so your pages won’t work! If you don’t want to use a theme, just copy the files inside the theme after completing the guide and paste them in the base layout folder.

Anyway, create the single.html file in layouts/_default and your pages will show up. Sample code (with the baseof.html available in layouts/_default) as below

{{- define "main" }}
{{ .Content }}
{{- end }}

Hello tut, thank you for your advice.
I still had the single.html
Now I added your code

{{- define "main" }}
{{ .Content }}
{{- end }}

and cleared my html-code (nothing special) > now there is a blanc page but there is still nothing in the folder public

Did you run the hugo command?

No, I didnt :thinking:
I understand… this was the reason, why there is no file in the public-folder! Thank you.

(there is an issue I cant figure out at the moment.
in the meantime I saw there is no go installed and I can not find a way to install it. I tried everything on the go-website. everything is fine, till I check the go version. no such command

It’s a bit frustating… but this is possible a Linux-issue and not suitable for this forum)
But I found that it is necessary to have a go on the computer to install Ananke
Also if this is not true, I can not install the theme.

git submodule add themes/ananke

fatal: no Git-Repository

Go is necessary if you want to use a theme as a submodule to pull updated theme changes. So, just search instructions on how to install it.

OK, thank you.
I have to work more on Linux to understand the background of all this.

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