-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: use author name and email from
.authors.yml
set up in Mate…
- Loading branch information
Showing
10 changed files
with
216 additions
and
23 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 |
---|---|---|
|
@@ -3,6 +3,66 @@ title: Integrations | |
icon: octicons/plug-16 | ||
--- | ||
|
||
## Blog plugin (from Material theme) | ||
|
||
Since version 1.17, the plugin integrates with the [Blog plugin (shipped with Material theme)](https://squidfunk.github.io/mkdocs-material/plugins/blog/) (see also [the tutorial about blog + RSS plugins](https://squidfunk.github.io/mkdocs-material/tutorials/blogs/engage/)). | ||
|
||
In some cases, the RSS plugin needs to work with the Material Blog: | ||
|
||
- for blog posts, the structure of the path to social cards is depending on blog configuration | ||
- retrieve the author's name from the `.authors.yml` file | ||
- optionnaly retrieve the author's email from the `.authors.yml` file | ||
|
||
If you don't want this integration, you can disable it with the option: `use_material_blog=false`. | ||
|
||
> See [related section in settings](./configuration.md#use_material_blog). | ||
### Example of blog authors with email | ||
|
||
```yaml title="docs/blog/.authors.yml" | ||
authors: | ||
alexvoss: | ||
name: Alex Voss | ||
description: Weltenwanderer | ||
avatar: https://github.com/alexvoss.png | ||
guts: | ||
avatar: https://cdn.geotribu.fr/img/internal/contributeurs/jmou.jfif | ||
description: GIS Watchman | ||
name: Julien Moura | ||
url: https://github.com/guts/ | ||
email: [email protected] | ||
``` | ||
This given Markdown post: | ||
```markdown title="blog/posts/demo.md" | ||
--- | ||
authors: | ||
- alexvoss | ||
- guts | ||
date: 2024-12-02 | ||
categories: | ||
- tutorial | ||
--- | ||
|
||
# Demonstration blog post | ||
|
||
[...] | ||
``` | ||
|
||
Will be rendered as: | ||
|
||
```xml title="/build/site/feed_rss_created.xml" | ||
[...] | ||
<item> | ||
<title>Demonstration blog post</title> | ||
<author>Alex Voss</author> | ||
<author>Julien Moura ([email protected])</author> | ||
[...] | ||
``` | ||
|
||
---- | ||
|
||
## Social Cards plugin (from Material theme) | ||
|
||
Since version 1.10, the plugin integrates with the [Social Cards plugin (shipped with Material theme)](https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/) (see also [the full plugin documentation here](https://squidfunk.github.io/mkdocs-material/plugins/social/)). | ||
|
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
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
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
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
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 |
---|---|---|
|
@@ -13,3 +13,4 @@ authors: | |
name: Julien Moura | ||
slug: julien-moura | ||
url: https://geotribu.fr/team/julien-moura/ | ||
email: [email protected] |
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
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
13 changes: 13 additions & 0 deletions
13
tests/fixtures/mkdocs_items_material_blog_enabled_but_integration_disabled.yml
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,13 @@ | ||
site_name: Test RSS Plugin | ||
site_description: Test RSS with blog plugin also enabled | ||
site_url: https://guts.github.io/mkdocs-rss-plugin | ||
|
||
plugins: | ||
- blog: | ||
blog_dir: blog | ||
authors_profiles: true | ||
- rss: | ||
use_material_blog: false | ||
|
||
theme: | ||
name: 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