You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
featureThis is not a bug or issue with Docusausus, per se. It is a feature request for the future.good first issueIf you are just getting started with Docusaurus, this issue should be a good place to begin.
When working with the blog feed, in testing-library's, we would like a way to contain the full article and not just a truncated version of it within the feed since we don't really care about retention or something like that.
Motivation
Following this PR in testing-library, we think that having a way to send a non truncated version of an article can be helpful for people that just want to spread the word and don't care about traffic to their site rather than just spread updates.
Pitch
I believe we can add this by adding another config to the blog feed options, I'd be glad to help and create a PR for this one if you find it suitable.
Adding to the rationale here, I would expect most Docusaurus sites to be for community projects that don't need users to visit blog posts for monetization via advertisements or conversions. I think leaving blog posts non-truncated by default and adding an option for the old behavior (if encouraging site traffic or reducing feed size is necessary) would be even better.
I don't know much about RSS feeds and best practices regarding monetization/conversions, but if you can back up your claims by some authority link that explains why it's better to have non-truncated articles in feeds, we can make this the default.
I don't know much about RSS feeds and best practices regarding monetization/conversions, but if you can back up your claims by some authority link that explains why it's better to have non-truncated articles in feeds, we can make this the default.
A channel may contain any number of <item>s. An item may represent a "story" -- much like a story in a newspaper or magazine; if so its description is a synopsis of the story, and the link points to the full story. An item may also be complete in itself, if so, the description contains the text (entity-encoded HTML is allowed), and the link and title may be omitted. All elements of an item are optional, however at least one of title or description must be present.
I think we should keep the title and URL even if the description contains the whole item.
Any thoughts? I've already started working on this btw.
@slorber I've implemented this and I did get the full post in the description but it was plain markdown and nothing rendered it.. I saw that in the classic-theme you use MDXProvider to render the MDX.. Any ideas what we can do here for the feeds?
Thanks!
The thing is, a user might be able to add mdx interactive components in the blog post. In such case, what should be the behavior of such feed? The feed reader won't be able to render the React component, but we can still render such component and get it as a static HTML string (it's just it won't be interactive anymore).
You should likely call ReactDOM.renderToString to generate the feed as HTML
MDXProvider only permits to replace default HTML elements with custom implementations, that does not seem 100% mandatory, but may be helpful to improve the default renderToString if not good enough. Unfortunately due to the modular architecture, the blog plugin does not know anything about the classic theme, and can't reuse this MDX provider. Maybe we need it for proper code block highlighting?
The question is: how do we transform markdown to a JSX tree on the server, so that we can feed renderToString with it?
The MDX apis I know compile markdown to React component source code, not a JSX directly.
We generally write this source code to disk, and require it like regular source code. Wonder if we can avoid this step that seems a bit useless in such case.
Let me know if the implementation looks good to you, but to me it does not because it assume the blog post content is a regular string
Hi @slorber!
Sorry, I didn't get a chance to solve this one and I have a WIP draft on my local machine..
Regarding what you wrote, I strongly agree. I'll try to add that functionality soon if this won't be solved in that PR already.
In my pr #4330, I already change render from plain text to Full Markdown support, but without customize component.
and i dont think its a good idea for add config to choose whether show full content for blog. Its not a content website, you know.
For feed of docusaurus, I wanna know is any other suggest about that? I am glad with someone still use rss, and hope to improve user experience in docusaurus
and i dont think its a good idea for add config to choose whether show full content for blog. Its not a content website, you know.
@moonrailgun
Actually, I do think it should be a config, one of the purposes of RSS feeds is to attract people to your site and gain visitors, not all use cases should show all content.
If you're working on that, I'll delete my draft, but for further work you do on OSS, it's generally a good idea to ask in the issue if someone is still working on a feature :)
and i dont think its a good idea for add config to choose whether show full content for blog. Its not a content website, you know.
@moonrailgun
Actually, I do think it should be a config, one of the purposes of RSS feeds is to attract people to your site and gain visitors, not all use cases should show all content.
If you're working on that, I'll delete my draft, but for further work you do on OSS, it's generally a good idea to ask in the issue if someone is still working on a feature :)
I am soooo sorry for that because i have not found your issue before.
and for config, maybe your can add a config above my work? Also i dont think its right, but more customize way is not a bad work, right?
I'm sorry, I didn't have time to review this PR because I have more important features to work on and this feature is not a top priority in my todo list, and I think the current PR is not totally ready (I find it strange to need to use remove-imports).
Unfortunately reviewing this PR is time-consuming because I have to conduct some additional tests locally to be sure it's working fine, and it's not time I'm willing to invest atm, but will come back to this when possible.
I'm sorry, I didn't have time to review this PR because I have more important features to work on and this feature is not a top priority in my todo list, and I think the current PR is not totally ready (I find it strange to need to use remove-imports).
Unfortunately reviewing this PR is time-consuming because I have to conduct some additional tests locally to be sure it's working fine, and it's not time I'm willing to invest atm, but will come back to this when possible.
Well, thanks for your reply. Feel free to take time for other things, i will waiting for your review. If have any suggestion for my pr, I am grad to change it or modify it
featureThis is not a bug or issue with Docusausus, per se. It is a feature request for the future.good first issueIf you are just getting started with Docusaurus, this issue should be a good place to begin.
Activity
[-]Non truncated blog feeds[/-][+]Non truncated blog article in feeds[/+][-]Non truncated blog article in feeds[/-][+]V2: Non truncated blog article in feeds[/+]nickserv commentedon Nov 10, 2020
Adding to the rationale here, I would expect most Docusaurus sites to be for community projects that don't need users to visit blog posts for monetization via advertisements or conversions. I think leaving blog posts non-truncated by default and adding an option for the old behavior (if encouraging site traffic or reducing feed size is necessary) would be even better.
nickserv commentedon Nov 10, 2020
Also, this should be relevant to both V1 and V2. If approved, perhaps it should be backported from 2 to 1 or merged into 2 after 1.
slorber commentedon Nov 12, 2020
Ok for an option to have non-truncated feeds.
I don't know much about RSS feeds and best practices regarding monetization/conversions, but if you can back up your claims by some authority link that explains why it's better to have non-truncated articles in feeds, we can make this the default.
slorber commentedon Nov 12, 2020
v1 is in low maintenance mode, it's not very important to backport this feature now, we'll encourage people to adopt v2 instead.
MatanBobi commentedon Nov 12, 2020
I can take this one if it's ok :)
MatanBobi commentedon Nov 15, 2020
Taken from the RSS 2.0 Spec:
I think we should keep the title and URL even if the description contains the whole item.
Any thoughts? I've already started working on this btw.
nickserv commentedon Nov 16, 2020
If I remember correctly the generated description didn't seem to include the title and URL
MatanBobi commentedon Nov 25, 2020
@slorber I've implemented this and I did get the full post in the description but it was plain markdown and nothing rendered it.. I saw that in the classic-theme you use
MDXProviderto render the MDX.. Any ideas what we can do here for the feeds?Thanks!
slorber commentedon Nov 25, 2020
I see
The thing is, a user might be able to add mdx interactive components in the blog post. In such case, what should be the behavior of such feed? The feed reader won't be able to render the React component, but we can still render such component and get it as a static HTML string (it's just it won't be interactive anymore).
You should likely call ReactDOM.renderToString to generate the feed as HTML
MDXProvider only permits to replace default HTML elements with custom implementations, that does not seem 100% mandatory, but may be helpful to improve the default renderToString if not good enough. Unfortunately due to the modular architecture, the blog plugin does not know anything about the classic theme, and can't reuse this MDX provider. Maybe we need it for proper code block highlighting?
The question is: how do we transform markdown to a JSX tree on the server, so that we can feed renderToString with it?
The MDX apis I know compile markdown to React component source code, not a JSX directly.
We generally write this source code to disk, and require it like regular source code. Wonder if we can avoid this step that seems a bit useless in such case.
slorber commentedon Nov 25, 2020
Looks like mdx/runtime is what we are looking for: https://mdxjs.com/advanced/runtime
Something like this may work
slorber commentedon Mar 3, 2021
There's a pending PR here: #4330
Let me know if the implementation looks good to you, but to me it does not because it assume the blog post content is a regular string
MatanBobi commentedon Mar 4, 2021
Hi @slorber!
Sorry, I didn't get a chance to solve this one and I have a WIP draft on my local machine..
Regarding what you wrote, I strongly agree. I'll try to add that functionality soon if this won't be solved in that PR already.
moonrailgun commentedon Mar 6, 2021
In my pr #4330, I already change render from plain text to Full Markdown support, but without customize component.
and i dont think its a good idea for add config to choose whether show full content for blog. Its not a content website, you know.
For feed of docusaurus, I wanna know is any other suggest about that? I am glad with someone still use rss, and hope to improve user experience in docusaurus
MatanBobi commentedon Mar 7, 2021
@moonrailgun
Actually, I do think it should be a config, one of the purposes of RSS feeds is to attract people to your site and gain visitors, not all use cases should show all content.
If you're working on that, I'll delete my draft, but for further work you do on OSS, it's generally a good idea to ask in the issue if someone is still working on a feature :)
moonrailgun commentedon Mar 7, 2021
I am soooo sorry for that because i have not found your issue before.
and for config, maybe your can add a config above my work? Also i dont think its right, but more customize way is not a bad work, right?
stnor commentedon Aug 11, 2021
What's remaining for this feature to be fixed/merged @MatanBobi?
MatanBobi commentedon Aug 12, 2021
This actually isn't my PR anymore as @moonrailgun did the work.
If the current implementation isn't enough, I'll try to work on one next week :)
moonrailgun commentedon Aug 12, 2021
sorry, but my pr #4330 is still pending and no reply. I have no idea how to continue.
@stnor @MatanBobi
slorber commentedon Aug 12, 2021
I'm sorry, I didn't have time to review this PR because I have more important features to work on and this feature is not a top priority in my todo list, and I think the current PR is not totally ready (I find it strange to need to use
remove-imports).Unfortunately reviewing this PR is time-consuming because I have to conduct some additional tests locally to be sure it's working fine, and it's not time I'm willing to invest atm, but will come back to this when possible.
moonrailgun commentedon Aug 12, 2021
Well, thanks for your reply. Feel free to take time for other things, i will waiting for your review. If have any suggestion for my pr, I am grad to change it or modify it