-C "run as if hugo was started in given path" (equivalent to git -C)

What do you think about adding a new flag for hugo to simplify building the site from command line? It’s an equivalent of git -C. It would allow you to run hugo irrespective of your current location.

Instead of writing this cd /home/user/example.org/ && hugo && popd you could just use this hugo -C /home/user/example.org/.

-C isn’t used for anything right now (hugo v0.118.2+extended).

By the way I’m new to hugo, so if anyone knows if this can be done already in some other way, please let me know.

you can use -s

-s, --source string              filesystem path to read files relative from

Oh thanks, I’ve been searching only for “directory” or “folder” :slight_smile: Could have thought that it may be called “path” as well

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