Specify assetsDir and dataDir as flags for hugo command?

Hello,
We are generating lots of hugo sites on the fly, and would like to be able to supply parameters dynamically.
We can already specify many things including hugo --destination and hugo --source and hugo --baseURL but I haven’t found a way to indicate the location of the assets and data that way.
(The way I’ve found for assets is to use module.mounts in the config file. )

It would be so helpful if we could specify assetsDir and dataDir as flags for hugo command.

Has this been considered? Has anyone else found a more flexible workaround? Thank you!

You can try set config via OS environments:

1 Like

Thank you so much. That absolutely did the trick.

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