HUGO
Menu
GitHub 90437 stars Mastodon

hugo.WorkingDir

Returns the project working directory.
Syntax
hugo.WorkingDir
Returns
string

Usage

The hugo.WorkingDir function returns the absolute path to the project working directory. By default, this is the directory in which you run the hugo command. Use the --source command-line flag to change it.

Examples

{{ hugo.WorkingDir }} → /home/user/projects/my-hugo-site