Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

Commit 613e76b

Browse files
alexvosssquidfunk
andauthored
+blog examples
added examples for the use of the blog plugin, on its own and with the mkdocs-rss-plugin. --------- Co-authored-by: Martin Donath <[email protected]>
2 parents 0c3f04b + 8d9be97 commit 613e76b

File tree

17 files changed

+330
-6
lines changed

17 files changed

+330
-6
lines changed

examples/blog-basic/.example.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
example:
2+
tags:
3+
- public # works without Insiders
4+
- blog # functionality demonstrated
5+
- simple # requires no extra plugins or other magic
6+
authors:
7+
alexvoss:
8+
name: Alex Voss
9+
description: Collaborator
10+
avatar: https://github.com/alexvoss.png

examples/blog-basic/docs/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Adding a blog to your site
2+
3+
This example shows how to add a [blog] to your site.
4+
5+
It shows how to:
6+
7+
- configure the `mkdocs.yml` to activate and configure the plugin
8+
- set up a directory structure in your `docs/` folder
9+
- add an `.authors.yml` file with author information
10+
11+
The naming of the files containing the blog posts is just a
12+
suggestion, you can name them any way you like. What matters is the
13+
meta data at in the header.
14+
15+
[blog]: https://squidfunk.github.io/mkdocs-material/plugins/blog/
16+
17+
18+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
authors:
2+
squidfunk:
3+
name: Martin Donath
4+
description: Creator
5+
avatar: https://github.com/squidfunk.png
6+
alexvoss:
7+
name: Alex Voss
8+
description: Weltenwanderer
9+
avatar: https://github.com/alexvoss.png
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Blog
2+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
authors:
3+
- alexvoss
4+
date: 2023-10-11
5+
categories:
6+
- meta
7+
---
8+
9+
# My first blog post
10+
11+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque nec
12+
maximus ex. Sed consequat, nulla quis malesuada dapibus, elit metus vehicula
13+
erat, ut egestas tellus eros at risus. In hac habitasse platea dictumst.
14+
Phasellus id lacus pulvinar erat consequat pretium. Morbi malesuada arcu mauris
15+
Nam vel justo sem. Nam placerat purus non varius luctus. Integer pretium leo in
16+
sem rhoncus, quis gravida orci mollis. Proin id aliquam est. Vivamus in nunc ac
17+
metus tristique pellentesque. Suspendisse viverra urna in accumsan aliquet.
18+
19+
<!-- more -->
20+
21+
Donec volutpat, elit ac volutpat laoreet, turpis dolor semper nibh, et dictum
22+
massa ex pulvinar elit. Curabitur commodo sit amet dolor sed mattis. Etiam
23+
tempor odio eu nisi gravida cursus. Maecenas ante enim, fermentum sit amet
24+
molestie nec, mollis ac libero. Vivamus sagittis suscipit eros ut luctus.
25+
26+
Nunc vehicula sagittis condimentum. Cras facilisis bibendum lorem et feugiat.
27+
In auctor accumsan ligula, at consectetur erat commodo quis. Morbi ac nunc
28+
pharetra, pellentesque risus in, consectetur urna. Nulla id enim facilisis
29+
arcu tincidunt pulvinar. Vestibulum laoreet risus scelerisque porta congue.
30+
In velit purus, dictum quis neque nec, molestie viverra risus. Nam pellentesque
31+
tellus id elit ultricies, vel finibus erat cursus.
32+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
authors:
3+
- squidfunk
4+
date: 2023-10-12
5+
categories:
6+
- hello
7+
---
8+
9+
# A second post
10+
11+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque nec
12+
maximus ex. Sed consequat, nulla quis malesuada dapibus, elit metus vehicula
13+
erat, ut egestas tellus eros at risus. In hac habitasse platea dictumst.
14+
Phasellus id lacus pulvinar erat consequat pretium. Morbi malesuada arcu mauris
15+
Nam vel justo sem. Nam placerat purus non varius luctus. Integer pretium leo in
16+
sem rhoncus, quis gravida orci mollis. Proin id aliquam est. Vivamus in nunc ac
17+
metus tristique pellentesque. Suspendisse viverra urna in accumsan aliquet.
18+
19+
<!-- more -->
20+
21+
Donec volutpat, elit ac volutpat laoreet, turpis dolor semper nibh, et dictum
22+
massa ex pulvinar elit. Curabitur commodo sit amet dolor sed mattis. Etiam
23+
tempor odio eu nisi gravida cursus. Maecenas ante enim, fermentum sit amet
24+
molestie nec, mollis ac libero. Vivamus sagittis suscipit eros ut luctus.
25+
26+
Nunc vehicula sagittis condimentum. Cras facilisis bibendum lorem et feugiat.
27+
In auctor accumsan ligula, at consectetur erat commodo quis. Morbi ac nunc
28+
pharetra, pellentesque risus in, consectetur urna. Nulla id enim facilisis
29+
arcu tincidunt pulvinar. Vestibulum laoreet risus scelerisque porta congue.
30+
In velit purus, dictum quis neque nec, molestie viverra risus. Nam pellentesque
31+
tellus id elit ultricies, vel finibus erat cursus.
32+

examples/blog-basic/mkdocs.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright (c) 2016-2023 Martin Donath <[email protected]>
2+
# Alex Voss <[email protected]>
3+
4+
# Permission is hereby granted, free of charge, to any person obtaining a copy
5+
# of this software and associated documentation files (the "Software"), to
6+
# deal in the Software without restriction, including without limitation the
7+
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8+
# sell copies of the Software, and to permit persons to whom the Software is
9+
# furnished to do so, subject to the following conditions:
10+
11+
# The above copyright notice and this permission notice shall be included in
12+
# all copies or substantial portions of the Software.
13+
14+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
17+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20+
# IN THE SOFTWARE.
21+
22+
# -----------------------------------------------------------------------------
23+
# Recommended: set up configuration validation, see https://t.ly/xpZXU
24+
# -----------------------------------------------------------------------------
25+
26+
# Project information
27+
site_name: Basic blog setup example
28+
29+
# Theme
30+
theme:
31+
name: material
32+
33+
# Plugins
34+
plugins:
35+
- search
36+
- blog
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright (c) 2016-2023 Martin Donath <[email protected]>
2+
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to
5+
# deal in the Software without restriction, including without limitation the
6+
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7+
# sell copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
10+
# The above copyright notice and this permission notice shall be included in
11+
# all copies or substantial portions of the Software.
12+
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19+
# IN THE SOFTWARE.
20+
21+
mkdocs-material

examples/blog-rss/.example.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
example:
2+
tags:
3+
- public # works without Insiders
4+
- blog # functionality demonstrated
5+
- integration # demonstrates integration, use of other plugins
6+
authors:
7+
alexvoss:
8+
name: Alex Voss
9+
description: Collaborator
10+
avatar: https://github.com/alexvoss.png

examples/blog-rss/docs/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Adding an RSS feed to a blog
2+
3+
This example shows how to [add an RSS feed to a blog]. You should be
4+
able to point any RSS reader at the site and it will pick up the RSS
5+
feed from a declaration in the HTML header.
6+
7+
[add an RSS feed to a blog]: https://squidfunk.github.io/mkdocs-material/setup/setting-up-a-blog/?h=#rss
8+

0 commit comments

Comments
 (0)