How to mark the blog as home page, when I have a documentation website too #6721
-
I want my blog to be the main entry point to my website. In the mkdocs.yml file, I structured the navigation section as follows:
This successfully moves the Blog to the first position in the menu. However, upon opening the site, the About page is displayed by default, which is expected since it is the index page. To address this, I renamed it to about.md. But this change caused an issue as the website then lacked an index page. The only solution I can think of is to create an index page that redirects to the blog, like this:
Is this the proper approach, or am I overlooking a setting that I can add to the mkdocs.yml file? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hello @janvanveldhuizen, Apart of that there is the solution like you described, which is - after the As a side note, perhaps this is a valid change request for the Blog plugin to support creating the blog index page as the root of the website, but keep the posts under the |
Beta Was this translation helpful? Give feedback.
-
You can follow the standalone guide as outlined in this blog post, and then just change the plugins:
- blog:
post_url_format: "blog/{date}/{slug}" If you wish to host the archive and categories under |
Beta Was this translation helpful? Give feedback.
You can follow the standalone guide as outlined in this blog post, and then just change the
post_url_format
to:If you wish to host the archive and categories under
blog
as well, adjustarchive_url_format
andcategories_url_format
. The blog plugin is extremely flexible and allows for a lot of freedom when it comes to URL generation. If something is missing in terms of freedom, we can consider adding it.