Add a sceond baseurl?

I tried to search, but probably used the wrong term.

My deployment is working and i can push the site live.

But sometimes, if i do bigger changes, i also like to deploy to a subdomain (which is .htaccess protected) so that me and other can check the changes before i push them to live.

Right no i always adapt for that the baseURL in my config.toml.

Is there an easy way (which i problably did not found till now) to run the hugo command with another config.toml - or to use in a special command an “backupbaseurl” command?

I think i found the solution

I need to create a second toml and then use the following command:

hugo --config config_dev.toml --destination devsite

I changed the baseURL in the config_dev.toml and use as dir for the published content now “devsite” instead of public.

Easy peasy :wink:

That definitely works. Also take a look at Configure Hugo | Hugo

1 Like

Thank you, this will make it even easier, as i just need to adapt minimal parts. Perfect.

And another tipp: I had so far the .htaccess in my “static”-folder. Due do redirects and now using a subdomain in test-environment I removed it from static folder. By now the .htaccess is also not changing so often anymore.

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