-
-
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
multiple instances? #feature_request #219
Comments
Hello @alexvoss , Not sure to get exactly what "multiple instances" mean. You would like to have a feed per subfolder for example? Can you give an example or a hyperlink please? Is your use case for production or demonstration (material examples repo) purpose? FYI I'm actively working on better integrations support. You can have a look to the first step with Social Cards of Material theme on this PR #217. If you start to work on your own, I would recommend you to start from this branch. |
Sorry, should have included a link or description. If a plugin supports multiple instances, this means that they can be used multiple times in the same configuration file, allowing to fine-tune behavior for separate sections of your project. The blog plugin is one of those in Material that supports multiple instances. You might have a blog for news and one for tips, for example. These would have different configurations such as different Ideally, I would like to have readers be able to subscribe to one or the other as well as to a combined RSS feed that contains the entries from both combined. |
Thanks for the quick completion. It sounds like an interesting feature and fits the RSS expected behavior. Is that an addition on the plugin's side or the template side? |
Just found out the PR in Mkdocs that added this possibility: mkdocs/mkdocs#3027 And here in the blog plugin: https://github.com/squidfunk/mkdocs-material/blob/master/src/plugins/blog/plugin.py#L57 Maybe it's just about this line? |
I am not entirely sure what is required from a technical side, apart from declaring that the plugin supports multiple instances. As far as I can see (from this search), It could be that nothing more needs to be done - except there would need to be a way to specify the paths where the different RSS feeds should be mounted. Without that the two instances overwrite each other's output. Here is a minimal example: multiblogrss.zip |
Allowing to set the feeds output in options is on the path. You should also consider this ongoing work #185 |
The two cases are different, I think, because with the categories you would want to be able to just create a new one and have another feed. You would not want to have to configure multiple instances for this. If you wanted to have feeds for different blogs this way you would need to ask people to turn on category feeds and assign categories to the blog entries. With the meta plugin in Insiders that would be doable but perhaps people do not want to turn on category feeds because that might multiply the number of feeds generated - by the number of categories, which may be significantly bigger than the number of blogs. The multiple instances also allow settings that are specific to the different blogs, which makes sense. I still think that the multiple instances are the solution here. The combination with the category channels means that the paths for multiple instances would need to act as base paths for the category feeds. I would suggest letting the existing PR run its course and then looking at the impact of defining base paths for the feed of an instance. There is no particular urgency here as long as we are not talking months. Hope this helps. |
I note that you have assigned this to me. Is that a way of saying that you would like a PR on this when the time is ripe? |
Not at all! It's to say that this issue is waiting an action from this person. For now, it's mostly meaning: "I've answered, It's up to you to talk" |
hello, I have the same issue. I hope to construct multiple RSS subscription links on my mkdocs website (that is, I hope this plug-in can support generating multiple sets of RSS subscription XML files, and each file can be configured with different regular expression rules to filter different articles) , to realize that articles of different categories on the website can be subscribed separately. I think this can be achieved through different regular expressions, but currently the plug-in only supports a unique configuration, which is a pity. |
It's now possible to have a mkdocs.yml like this: ```yaml plugins: - rss - rss: feeds_filenames: json_created: blog.json json_updated: blog-updated.json rss_created: blog.xml rss_updated: blog-updated.xml match_path: "blog/.*" ``` Closes #219
Hi @alexvoss Finally I took the time to achieve this feature after a bit of refactoring and another feature allowing to customize the output feed file names: #249 It's now part of the https://github.com/Guts/mkdocs-rss-plugin/releases/tag/1.13.0 version. Enjoy and please keep me informed if it does the trick or not. |
Hi,
I am working on a template for creating blogs using Material for MkDocs and as part of this would like to use the fact that the blog plugin can be instantiated multiple times. This is both to show off the fact that it can and to be able to show different blog configurations.
Now, in the template, I am integrating the RSS plugin as well. Correct me if I am wrong but it does not support multiple instances itself, right? So, for the moment, only one of the blogs on the site will be included in the RSS.
It would seem sensible to me to add multi-instance support and I am willing to create a PR for this, though I realize that it might be a more complex one. I am also not entirely sure just how big a commitment this will turn out to be and when I might have enough clear road ahead to take it on but let's hope it is measured in weeks, not months.
Cheers, Alex
The text was updated successfully, but these errors were encountered: