Publish Hugo in Site Subdirectory

Good Evening,
Am trying to publish hugo in /blog subdirectory of my domain. Have tried using baseurl as with build command as hugo -b and publish directory as public/blog which generated 404 error on the site.

I intend to use / /landing/index.html 200 redirect to make a landing page but currently stuck at deploying the site. I can deploy it in baseurl easily and its working.

I thought of something like
hugo && mv /* /blog/ && cd /blog/landing/ && mv /blog/landing/* /
but doesn’t seem like a legit way of doing it.

Any help is appreciated, but please don’t link me to Hugo’s documentation where they just say change baseURL.

Project Link:

Aw, why not?! :sweat_smile:

In all seriousness, you should be able to specify /blog as the publish directory, rather than specifying the URL in its entirety. Does this help at all?

1 Like

Actually mistyped the URL :3 Else it was working, but thanks.

D’oh! By any means, I’m happy that this was resolved :+1: