dktue
1
I want to use a leaf bundle (containing an index.md
-file, single-page-layout) as my root-page.
I herefore created a new directory my-root-page
where I placed the index.md
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.
dktue
3
@alexandros: I do not want a single-page application. If I do what you suggest, all menus are gone. 
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.
2 Likes
dktue
5
I went with .GetPage and headless: true
, thanks!