Skip to content

Could Book-template have not homepage, directly into docs? #1957

Answered by chrede88
halfrost asked this question in Q&A
Discussion options

You must be logged in to vote

Yes that's possible.
Generally, a file on this path: ./content/_index.md, will be rendered as the homepage.
Take a look at this: https://gohugo.io/templates/homepage/

If you remove ./content/home/ and place the content of ./content/<docs> on ./content/, Hugo should render your docs on the landing page. I've tested this using the starter-book template, it should work.

Your ./content/ file tree should look something like this now:

./content/
├──  _index.md
├──  chapter1
└──  chapter2

Now, you'll also have to change the menu links etc. And I can't promise you that something else won't break. I've only done a minimal test.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@halfrost
Comment options

Answer selected by gcushen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants