Replies: 3 comments
-
you can override the default index page by creating <!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0; url=/docs/">
<title>Redirecting...</title>
</head>
<body>
<p>Redirecting to <a href="/docs/">/docs/</a></p>
</body>
</html> this should make the browser redirect to the docs page automatically |
Beta Was this translation helpful? Give feedback.
-
@imfing It works as a workaround, but it's not ideal since it triggers a redirect. It would be great if there was a way to make your root page land directly in one of the layouts offered, like /docs or /blog. Having both is great for a product, but some people need only one or the other, so the landing page feels like an extra unneeded page. This would allow people to choose/focus on the type of static site they need. That's why I originally made a feature request, but I don't know how feasible this is. |
Beta Was this translation helpful? Give feedback.
-
I achieved this by cascading the docs type in the root _index. All the directories in content show up in the sidebar. cascade:
type: docs I think that's all I did, but there might be something I forgot. You can see here: https://web.archive.org/web/*/https://docs.rhize.com (Archive in case I change it) This way has its own issues though: I'd like to make two "subsites" with separate docs-type sidebars but I'll need to split all the directories two subfolders and add redirects. If using github actions, that's a pain. I tried overwriting the URLs with permalinks in the config but it was confusing and it didn't work. An easier solution would definitely be nice. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there an easy way to make the landing/root page lands directly on /docs? The landing page feels like an extra useless page since I use it solely for documentation.
I tried playing with aliases and layouts, but I'm not super familiar with Hugo. Wondering if this is supported? If not, what would be the easiest way to achieve this?
Beta Was this translation helpful? Give feedback.
All reactions