Skip to content

Commit d363f90

Browse files
authored
Documentation (#6438)
1 parent 0b38323 commit d363f90

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

docs/setup/setting-up-a-blog.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,36 @@ For further information, see the [documentation].
181181
[theme extension]: ../customization.md
182182
[documentation]: https://guts.github.io/mkdocs-rss-plugin/configuration/
183183

184+
### Blog only
185+
186+
You might need to build a pure blog without any documentation.
187+
In this case, you can create a folder tree like this:
188+
189+
``` { .sh .no-copy }
190+
.
191+
├─ docs/
192+
│ ├─ posts/ # (1)!
193+
│ ├─ .authors.yml
194+
│ └─ index.md
195+
└─ mkdocs.yml
196+
```
197+
198+
1. Notice that the `posts` directory is in the root of `docs` without
199+
intermediate `blog` directory.
200+
201+
And add the following lines to `mkdocs.yml`:
202+
203+
``` yaml
204+
plugins:
205+
- blog:
206+
blog_dir: . # (1)!
207+
```
208+
209+
1. More info about [blog_dir](../plugins/blog.md#config.blog_dir)
210+
211+
With this configuration, the url of the blog post will be `/<post_slug>`
212+
instead of `/blog/<post_slug>`.
213+
184214
## Usage
185215

186216
### Writing your first post

0 commit comments

Comments
 (0)