Use leaf bundle as root

I want to use a leaf bundle (containing an, single-page-layout) as my root-page.

I herefore created a new directory my-root-page where I placed the inside. I can now access it via localhost:1313/de/my-root-page/.

How can I make my page-bundle be accessible as root directly, e.g. under localhost:1313/de/?

Place the bundle contents directly under /de/. This will turn the /de/ version of your project into a single page application.

@alexandros: I do not want a single-page application. If I do what you suggest, all menus are gone. :frowning:

If you have control of the server that will host your project then you can create a 301 redirect so that /de/ points to /de/my-root-page/.

If you do not have control of the server then you can use Hugo Aliases to redirect /de/ to /de/my-root-page/ on the front end.

Or if you do not want to use redirects then you can render the contents of my-root-page in the index.html template for /de/ with .GetPage

It’s up to you what you prefer to do.


I went with .GetPage and headless: true, thanks!