-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information
Showing
17 changed files
with
330 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
example: | ||
tags: | ||
- public # works without Insiders | ||
- blog # functionality demonstrated | ||
- simple # requires no extra plugins or other magic | ||
authors: | ||
alexvoss: | ||
name: Alex Voss | ||
description: Collaborator | ||
avatar: https://github.com/alexvoss.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Adding a blog to your site | ||
|
||
This example shows how to add a [blog] to your site. | ||
|
||
It shows how to: | ||
|
||
- configure the `mkdocs.yml` to activate and configure the plugin | ||
- set up a directory structure in your `docs/` folder | ||
- add an `.authors.yml` file with author information | ||
|
||
The naming of the files containing the blog posts is just a | ||
suggestion, you can name them any way you like. What matters is the | ||
meta data at in the header. | ||
|
||
[blog]: https://squidfunk.github.io/mkdocs-material/plugins/blog/ | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
authors: | ||
squidfunk: | ||
name: Martin Donath | ||
description: Creator | ||
avatar: https://github.com/squidfunk.png | ||
alexvoss: | ||
name: Alex Voss | ||
description: Weltenwanderer | ||
avatar: https://github.com/alexvoss.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Blog | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
authors: | ||
- alexvoss | ||
date: 2023-10-11 | ||
categories: | ||
- meta | ||
--- | ||
|
||
# My first blog post | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque nec | ||
maximus ex. Sed consequat, nulla quis malesuada dapibus, elit metus vehicula | ||
erat, ut egestas tellus eros at risus. In hac habitasse platea dictumst. | ||
Phasellus id lacus pulvinar erat consequat pretium. Morbi malesuada arcu mauris | ||
Nam vel justo sem. Nam placerat purus non varius luctus. Integer pretium leo in | ||
sem rhoncus, quis gravida orci mollis. Proin id aliquam est. Vivamus in nunc ac | ||
metus tristique pellentesque. Suspendisse viverra urna in accumsan aliquet. | ||
|
||
<!-- more --> | ||
|
||
Donec volutpat, elit ac volutpat laoreet, turpis dolor semper nibh, et dictum | ||
massa ex pulvinar elit. Curabitur commodo sit amet dolor sed mattis. Etiam | ||
tempor odio eu nisi gravida cursus. Maecenas ante enim, fermentum sit amet | ||
molestie nec, mollis ac libero. Vivamus sagittis suscipit eros ut luctus. | ||
|
||
Nunc vehicula sagittis condimentum. Cras facilisis bibendum lorem et feugiat. | ||
In auctor accumsan ligula, at consectetur erat commodo quis. Morbi ac nunc | ||
pharetra, pellentesque risus in, consectetur urna. Nulla id enim facilisis | ||
arcu tincidunt pulvinar. Vestibulum laoreet risus scelerisque porta congue. | ||
In velit purus, dictum quis neque nec, molestie viverra risus. Nam pellentesque | ||
tellus id elit ultricies, vel finibus erat cursus. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
authors: | ||
- squidfunk | ||
date: 2023-10-12 | ||
categories: | ||
- hello | ||
--- | ||
|
||
# A second post | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque nec | ||
maximus ex. Sed consequat, nulla quis malesuada dapibus, elit metus vehicula | ||
erat, ut egestas tellus eros at risus. In hac habitasse platea dictumst. | ||
Phasellus id lacus pulvinar erat consequat pretium. Morbi malesuada arcu mauris | ||
Nam vel justo sem. Nam placerat purus non varius luctus. Integer pretium leo in | ||
sem rhoncus, quis gravida orci mollis. Proin id aliquam est. Vivamus in nunc ac | ||
metus tristique pellentesque. Suspendisse viverra urna in accumsan aliquet. | ||
|
||
<!-- more --> | ||
|
||
Donec volutpat, elit ac volutpat laoreet, turpis dolor semper nibh, et dictum | ||
massa ex pulvinar elit. Curabitur commodo sit amet dolor sed mattis. Etiam | ||
tempor odio eu nisi gravida cursus. Maecenas ante enim, fermentum sit amet | ||
molestie nec, mollis ac libero. Vivamus sagittis suscipit eros ut luctus. | ||
|
||
Nunc vehicula sagittis condimentum. Cras facilisis bibendum lorem et feugiat. | ||
In auctor accumsan ligula, at consectetur erat commodo quis. Morbi ac nunc | ||
pharetra, pellentesque risus in, consectetur urna. Nulla id enim facilisis | ||
arcu tincidunt pulvinar. Vestibulum laoreet risus scelerisque porta congue. | ||
In velit purus, dictum quis neque nec, molestie viverra risus. Nam pellentesque | ||
tellus id elit ultricies, vel finibus erat cursus. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Copyright (c) 2016-2023 Martin Donath <[email protected]> | ||
# Alex Voss <[email protected]> | ||
|
||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to | ||
# deal in the Software without restriction, including without limitation the | ||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | ||
# sell copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
|
||
# The above copyright notice and this permission notice shall be included in | ||
# all copies or substantial portions of the Software. | ||
|
||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
# IN THE SOFTWARE. | ||
|
||
# ----------------------------------------------------------------------------- | ||
# Recommended: set up configuration validation, see https://t.ly/xpZXU | ||
# ----------------------------------------------------------------------------- | ||
|
||
# Project information | ||
site_name: Basic blog setup example | ||
|
||
# Theme | ||
theme: | ||
name: material | ||
|
||
# Plugins | ||
plugins: | ||
- search | ||
- blog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright (c) 2016-2023 Martin Donath <[email protected]> | ||
|
||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to | ||
# deal in the Software without restriction, including without limitation the | ||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | ||
# sell copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
|
||
# The above copyright notice and this permission notice shall be included in | ||
# all copies or substantial portions of the Software. | ||
|
||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
# IN THE SOFTWARE. | ||
|
||
mkdocs-material |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
example: | ||
tags: | ||
- public # works without Insiders | ||
- blog # functionality demonstrated | ||
- integration # demonstrates integration, use of other plugins | ||
authors: | ||
alexvoss: | ||
name: Alex Voss | ||
description: Collaborator | ||
avatar: https://github.com/alexvoss.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Adding an RSS feed to a blog | ||
|
||
This example shows how to [add an RSS feed to a blog]. You should be | ||
able to point any RSS reader at the site and it will pick up the RSS | ||
feed from a declaration in the HTML header. | ||
|
||
[add an RSS feed to a blog]: https://squidfunk.github.io/mkdocs-material/setup/setting-up-a-blog/?h=#rss | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
authors: | ||
squidfunk: | ||
name: Martin Donath | ||
description: Creator | ||
avatar: https://github.com/squidfunk.png | ||
alexvoss: | ||
name: Alex Voss | ||
description: Weltenwanderer | ||
avatar: https://github.com/alexvoss.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Blog | ||
|
||
|
||
[Subscribe to this feed](http://localhost:8000/feed_rss_created.xml) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
authors: | ||
- alexvoss | ||
date: 2023-10-11 | ||
categories: | ||
- meta | ||
--- | ||
|
||
# My first blog post | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque nec | ||
maximus ex. Sed consequat, nulla quis malesuada dapibus, elit metus vehicula | ||
erat, ut egestas tellus eros at risus. In hac habitasse platea dictumst. | ||
Phasellus id lacus pulvinar erat consequat pretium. Morbi malesuada arcu mauris | ||
Nam vel justo sem. Nam placerat purus non varius luctus. Integer pretium leo in | ||
sem rhoncus, quis gravida orci mollis. Proin id aliquam est. Vivamus in nunc ac | ||
metus tristique pellentesque. Suspendisse viverra urna in accumsan aliquet. | ||
|
||
<!-- more --> | ||
|
||
Donec volutpat, elit ac volutpat laoreet, turpis dolor semper nibh, et dictum | ||
massa ex pulvinar elit. Curabitur commodo sit amet dolor sed mattis. Etiam | ||
tempor odio eu nisi gravida cursus. Maecenas ante enim, fermentum sit amet | ||
molestie nec, mollis ac libero. Vivamus sagittis suscipit eros ut luctus. | ||
|
||
Nunc vehicula sagittis condimentum. Cras facilisis bibendum lorem et feugiat. | ||
In auctor accumsan ligula, at consectetur erat commodo quis. Morbi ac nunc | ||
pharetra, pellentesque risus in, consectetur urna. Nulla id enim facilisis | ||
arcu tincidunt pulvinar. Vestibulum laoreet risus scelerisque porta congue. | ||
In velit purus, dictum quis neque nec, molestie viverra risus. Nam pellentesque | ||
tellus id elit ultricies, vel finibus erat cursus. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
authors: | ||
- squidfunk | ||
date: 2023-10-12 | ||
categories: | ||
- hello | ||
--- | ||
|
||
# A second post | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque nec | ||
maximus ex. Sed consequat, nulla quis malesuada dapibus, elit metus vehicula | ||
erat, ut egestas tellus eros at risus. In hac habitasse platea dictumst. | ||
Phasellus id lacus pulvinar erat consequat pretium. Morbi malesuada arcu mauris | ||
Nam vel justo sem. Nam placerat purus non varius luctus. Integer pretium leo in | ||
sem rhoncus, quis gravida orci mollis. Proin id aliquam est. Vivamus in nunc ac | ||
metus tristique pellentesque. Suspendisse viverra urna in accumsan aliquet. | ||
|
||
<!-- more --> | ||
|
||
Donec volutpat, elit ac volutpat laoreet, turpis dolor semper nibh, et dictum | ||
massa ex pulvinar elit. Curabitur commodo sit amet dolor sed mattis. Etiam | ||
tempor odio eu nisi gravida cursus. Maecenas ante enim, fermentum sit amet | ||
molestie nec, mollis ac libero. Vivamus sagittis suscipit eros ut luctus. | ||
|
||
Nunc vehicula sagittis condimentum. Cras facilisis bibendum lorem et feugiat. | ||
In auctor accumsan ligula, at consectetur erat commodo quis. Morbi ac nunc | ||
pharetra, pellentesque risus in, consectetur urna. Nulla id enim facilisis | ||
arcu tincidunt pulvinar. Vestibulum laoreet risus scelerisque porta congue. | ||
In velit purus, dictum quis neque nec, molestie viverra risus. Nam pellentesque | ||
tellus id elit ultricies, vel finibus erat cursus. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Copyright (c) 2016-2023 Martin Donath <[email protected]> | ||
# Alex Voss <[email protected]> | ||
|
||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to | ||
# deal in the Software without restriction, including without limitation the | ||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | ||
# sell copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
|
||
# The above copyright notice and this permission notice shall be included in | ||
# all copies or substantial portions of the Software. | ||
|
||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
# IN THE SOFTWARE. | ||
|
||
# ----------------------------------------------------------------------------- | ||
# Recommended: set up configuration validation, see https://t.ly/xpZXU | ||
# ----------------------------------------------------------------------------- | ||
|
||
# Project information | ||
site_name: Blog with RSS example # required by RSS plugin | ||
site_description: one of many fine examples # required by RSS plugin | ||
site_url: http://localhost:8080 # required by RSS plugin | ||
|
||
# Theme | ||
theme: | ||
name: material | ||
|
||
# Plugins | ||
plugins: | ||
- search | ||
- blog # https://squidfunk.github.io/mkdocs-material/plugins/blog/ | ||
- rss: # https://pypi.org/project/mkdocs-rss-plugin/ | ||
match_path: blog/posts/.* | ||
date_from_meta: | ||
as_creation: date | ||
as_update: false | ||
date_format: "%Y-%m-%d" # specify if the RSS plugin does | ||
# not understand the format you use | ||
categories: | ||
- categories | ||
- tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright (c) 2016-2023 Martin Donath <[email protected]> | ||
# Alex Voss <[email protected]> | ||
|
||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to | ||
# deal in the Software without restriction, including without limitation the | ||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | ||
# sell copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
|
||
# The above copyright notice and this permission notice shall be included in | ||
# all copies or substantial portions of the Software. | ||
|
||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
# IN THE SOFTWARE. | ||
|
||
mkdocs-material | ||
mkdocs-rss-plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
/* | ||
* Copyright (c) 2016-2023 the authors: | ||
* Copyright (c) 2016-2023 Martin Donath <[email protected]> | ||
* Alex Voss <[email protected]> | ||
* | ||
* Martin Donath <[email protected]> | ||
* Alex Voss <[email protected]> | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to | ||
* deal in the Software without restriction, including without limitation the | ||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | ||
* sell copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE | ||
|