Documentation (#6438)

This commit is contained in:
Xiang ZHU 2023-12-05 09:48:21 +01:00 committed by GitHub
parent 0b38323a31
commit d363f903b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 `/<post_slug>`
instead of `/blog/<post_slug>`.
## Usage
### Writing your first post