-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow per-page description customization (#310)
Hello @Guts Thanks for the awesome project. I use this plugin heavily in my [SRE blog](https://developer-friendly.blog). I figured it would be nice to allow per page customization of the `description` field, cause at the moment, there's not a lot one can do when the description before `<!-- more -->` is short and extra detail is desired. With this change, you can have separate contents for RSS description and your typical content. An example taken from the [Material for Mkdocs Social Cards](https://squidfunk.github.io/mkdocs-material/plugins/social/#option.description): ```markdown --- date: 2024-06-24 description: >- This is the SEO description. social: cards_layout_options: description: >- This is the social cards description. rss: feed_description: >- And I want to have customized RSS description. --- ``` This idea, I reckon, can easily be extended for other similar use-cases: - #297 - #275 - #197
- Loading branch information
Showing
4 changed files
with
77 additions
and
1 deletion.
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
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
19 changes: 19 additions & 0 deletions
19
tests/fixtures/docs/page_with_meta_override_rss_description.md
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,19 @@ | ||
--- | ||
title: Page with overridden rss feed description | ||
authors: | ||
- Guts | ||
- Tim Vink | ||
- liang2kl | ||
date: 2020-03-20 10:20 | ||
update: 2022-03-30 10:20 | ||
description: First test page of mkdocs-rss-plugin test suite | ||
image: "https://svgsilh.com/png-512/97849.png" | ||
rss: | ||
feed_description: This is a custom override of the feed description | ||
tags: | ||
- test | ||
--- | ||
|
||
# Test page with meta | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
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