Hugo not creating index.html and 404.html files

I seem to be having an issue with Hugo.

I am following their get started guide: https://gohugo.io/tutorials/creating-a-new-theme/

I have followed this steps:

  1. Created new site:

    $ hugo new site my-site

  2. In that folder I then typed the command for the new theme:

    $ hugo new theme mysite-theme

Every worked fine, the files are there. The problem is them when I try to render the site. I type in the command:

$ hugo

Which creates the /public folder and two files:

  • index.xml
  • sitemap.xml

However, according to the guide it is supposed to create 4 files:

  • index.html
  • index.xml
  • sitemap.xml
  • 404.html

Now, even though there is nothing to put in these files, it should still create the index.html and 404.html files.

Has anyone else encountered this problem? Have I done something wrong or missed a step?

Thanks in advance for the help

What have you created in your templates?

That is, what is in your themes/mysite-theme/layouts/index.html file?

Are you trying to create your own theme or install and use an existing theme?

Im trying to create my own theme.

I have not created anything in those files, I am following the tutorial that I linked to and it has not yet got to any of those files.

However, the output in the tutorial shows that those files should be there. Not in mine :frowning: