What does the command hugo check do?

Hi :wave:

I’m currently in the process of migrating various websites from another static website generator to Hugo.

While making adjustments in my CI workflow (GitHub Actions) and reading the Hugo docs, I found the command hugo check that states it does “various verification checks” however it doesn’t mention what it does exactly.

What I want to do is check if my website is properly configured (and lint my assets) properly before deploying.

I currently run the following to know if there are issues with my websites, but I wonder if hugo check does the same before generating the final HTML files.

hugo --cleanDestinationDir --i18n-warnings --path-warnings --verbose

I’ve tried looking in the source code, however I’m new to Hugo and Go, and the cobra library seems to be only a library to parse command line arguments.

From typing hugo check in my console, it seems that for the moment only one check command exists: hugo check ulimit, enabling to “Check system ulimit settings”.

→ hugo check
Contains some verification checks

Usage:
  hugo check [command]

Available Commands:
  ulimit      Check system ulimit settings

Flags:
  -h, --help   help for check

…<snip>
2 Likes

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