From d363f903b863df0990b49627804debc4e730e589 Mon Sep 17 00:00:00 2001 From: Xiang ZHU Date: Tue, 5 Dec 2023 09:48:21 +0100 Subject: [PATCH] Documentation (#6438) --- docs/setup/setting-up-a-blog.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/setup/setting-up-a-blog.md b/docs/setup/setting-up-a-blog.md index cab01d7ca..cece1c2bb 100644 --- a/docs/setup/setting-up-a-blog.md +++ b/docs/setup/setting-up-a-blog.md @@ -181,6 +181,36 @@ For further information, see the [documentation]. [theme extension]: ../customization.md [documentation]: https://guts.github.io/mkdocs-rss-plugin/configuration/ +### Blog only + +You might need to build a pure blog without any documentation. +In this case, you can create a folder tree like this: + +``` { .sh .no-copy } +. +├─ docs/ +│ ├─ posts/ # (1)! +│ ├─ .authors.yml +│ └─ index.md +└─ mkdocs.yml +``` + +1. Notice that the `posts` directory is in the root of `docs` without + intermediate `blog` directory. + +And add the following lines to `mkdocs.yml`: + +``` yaml +plugins: + - blog: + blog_dir: . # (1)! +``` + +1. More info about [blog_dir](../plugins/blog.md#config.blog_dir) + +With this configuration, the url of the blog post will be `/` +instead of `/blog/`. + ## Usage ### Writing your first post