Skip to content

Running hugo without config file should throw error #11019

@jmooring

Description

@jmooring

Change into an empty directory...

v0.111.3

$ hugo

Error: Unable to locate config file or config directory. Perhaps you need to create a new site.
       Run `hugo help new` for details.

It also creates a .hugo_build.lock file.

v0.112.3

$ hugo

hugo v0.112.3-ba6f74e40420d76f15fc8c2358be90f7aca98e0e+extended linux/amd64 BuildDate=2023-05-24T14:42:50Z VendorInfo=gohugoio
WARN 2023/05/24 17:37:09 found no layout file for "html" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/05/24 17:37:09 found no layout file for "html" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/05/24 17:37:09 found no layout file for "html" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

It also generates the following:

./
├── public/
│   ├── categories/
│   │   └── index.xml
│   ├── tags/
│   │   └── index.xml
│   ├── index.xml
│   └── sitemap.xml
├── resources/
│   └── _gen/
│       ├── assets/
│       └── images/
└── .hugo_build.lock

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions