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-siteLast updated:
November 8, 2026
:
content: Apply style guide to hugo functions (ed4f37ecc)
Improve this page