-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: add per-feed custom titles and abstracts #295
Conversation
Adds new `title:` and `description` options to the plugin which will be used in the generated feeds. If these keys are not present, the default MkDocs site-wide `site_title:` and `site_description:` will be used.
for more information, see https://pre-commit.ci
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #295 +/- ##
==========================================
+ Coverage 80.49% 80.55% +0.06%
==========================================
Files 9 9
Lines 610 612 +2
Branches 127 127
==========================================
+ Hits 491 493 +2
Misses 82 82
Partials 37 37
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Correct the default `site_title:` to `site_name:`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your interest and your great contribution, especially since it does fit every contribution guideline. It's really appreciated.
2 suggestions:
- prefix new option with
feed_
:feed_description
,feed_title
- use None as default value
Addresses @Guts suggestions. Thanks!
Signed-off-by: Brian Madden <[email protected]>
…ybrians/mkdocs-rss-plugin into feature-custom-feed-title
Quality Gate passedIssues Measures |
Awesome, thanks for these suggestions! I have incorporated everything you suggested, confirmed all tests pass, and updated the PR. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking every review in account. I merge right now and will release a new version next week because I want to wait a bit for having feedback about the latest release (yesterday).
Release as part of 1.13.2 Thanks again @toomanybrians! |
I've made a bit of communication here https://mapstodon.space/@geojulien/112672843319595679. If you have a Mastodon account, I would like to credit your work. |
This pull request allows an RSS feed to override the MkDocs default
site_name:
and/orsite_description:
settings to allow feed-specific titles and descriptions. This is useful when multiple instances of the plugin are used (for example, one for blog posts and another for doc updates), as it will allow RSS feed subscribers to know which feed is which.It's also useful even with a single instance of the plugin, since sometimes the site title or description is SEO-optimized, while the RSS feed might want shorter or alternate versions.
To use this capability, add a
feed_title:
and/orfeed_description:
setting to the RSS feed plugin settings. If either of these keys is not included, the previous behavior of using the site-wide versions is used. This feature does not change any behavior of any existing configs.A minimal example:
I have updated the documentation, and also added tests.
(Comment updated to reflect latest changes to the PR)