News Plugin šŸ“°

Follow the steps here and pull from this link GitHub - paviliondev/discourse-news: Adds a news stream to your Discourse instance

2 Likes

Is it possible to add multiple feeds from different sources. It seems like we can add only one XML from only one source.

2 Likes

Hey @Pravi, thanks for using the plugin.

No, it is not currently possible to add multiple feeds.

1 Like

Any future update on multiple feeds?

2 Likes

Hi,

Iā€™ve got the Pavilion News plugin in my new discourse install - and Iā€™m testing it out with posts and users and have run into a number of issues that Iā€™m wondering if other News plugin users might have found a work around for?

Load times for home page?
Is there any way to control the number of news posts that are initially downloaded when a person, anonymous user comes to the site? It seems that it downloads the entire news section (every single post) at once - which seems crazy. As Iā€™ve added News items to fill up the site a bit, load times for the home page have dramatically increased. When I just had a post or two load times were in the 200 ms range - but now with 10 or 15 posts the load time is up to 1500ms.

Stripped out images from the news posts?
Other than the top most image, any images that are in the post seem to be stripped out of the post so that when people read the /news feed the canā€™t see any of the images that the text in the body refers to. Very strangeā€¦

Embedded Videos - Donā€™t play, replaced by static image, with link to YouTube - thus side-stepping the embedded video ability. Takes the people off the site - which basically remove a feature from discourse.

Any suggestions appreciated!

2 Likes

Sorry, this isnā€™t a solution, but those should just lazy load and show a static image before playing.

2 Likes

The basic concept here is that the News Plugin sits at and enhances a Topic List view of either a list of topics or RSS feed.

Thus the ā€œper-Topicā€ view is simpler than a single Topic view would be expected to be, but richer than the default, image-less ā€œvenetian blindā€ format of a regular Discourse Topic List.

This is expected and a practical compromise.

  • the pluginā€™s primary focus is RSS feeds and supports one featured image per ā€œpostā€, however, it can also show an image from a Discourse Topic.

  • If you want to see the other images you can navigate to the full Topic.

  • this is partly to ensure performance is reasonable. To show all images from all Topics would be a large download.

  • This also keeps the layout more compact.

  • Same goes for embedded videos on Topics, these are just presented as a thumbnail on the news feed, just like they would be on all equivalent plugins and theme components that display on the Topic List.

Is this for RSS or Discourse Category based feeds? If the latter there may be some performance enhancement potential by sourcing a low resolution thumbnail instead of the full sized image and applying lazy loading ā€¦ however given the size of the laid out image a low resolution image might not cut the mustard.

If your interest is not in RSS feeds then you might also want to check out Topic List Previews TC which is a bit more optimised for that task, but has a different flavour of layout.

1 Like

Hi Rober - thanks for the explanation. This is not for an rss type application - this is for more of a blog + forum application. I wanted to avoid the hassles and overhead of having both a Wordpress site and the discourse forum since its a small side project for me.

How do you apply ā€œlazy loadingā€ - Iā€™m not a coder, and not familiar with that setting.

Thanks for your info.

2 Likes

Thatā€™s a feature request.

1 Like

You canā€™t. But it is a feature that should be in use nowadays anyway. So, hopefully devs of Discourse come to modern time :wink:

(No, I donā€™t know how difficult it would be, but nearly every other platforms use it, and for reason)

2 Likes

Actually, itā€™s a fairly trivial change that doesnā€™t need to involve the Discourse team, which Iā€™ve gone ahead and made:

IMPROVE: rename raw templates and add lazy loading for thumbnail Ā· paviliondev/discourse-news@6150851 (github.com)

Iā€™ve also deployed a set of fixes for breaking changes and modernised the template suffixes:

COMPATIBILITY: settings references Ā· paviliondev/discourse-news@dcda6a7 (github.com)

@angus

5 Likes

Hi, I just installed the plugin and its a new site is running default theme. The images are all off the screen on both mobile and desktop. Is there a fix for this?

1 Like

Hey, could you share what your ā€œdiscourse news sourceā€ is? If itā€™s a category, then images are working as expected (see here).

If itā€™s an RSS feed, image support will depend on what the version of the feed is. If itā€™s RSS 1.x, there is no official image support in the RSS 1.x specification(s), so the plugin does not support images in those feeds.

If itā€™s RSS 2.0, then image support is provided via the enclosure tag. The feed items will need an attribute like this:

<enclosure url="http://feed.com/image.jpg" length="12345" type="image/jpeg"/>

See further:
https://www.rssboard.org/rss-specification#ltenclosuregtSubelementOfLtitemgt

2 Likes

Hi. Yes it was this feed link

https://cointelegraph.com/rss/tag/altcoin

1 Like

The good news is that that Feed is RSS 2.0 and does in fact have images in an enclosure tag. As such, they show up as expected.

Iā€™ve loaded the feed on try.thepavilion.io/news as an example. Please make sure you have the following site settings:

  • discourse news enabled: true
  • discourse news source: RSS
  • discourse news rss: https://cointelegraph.com/rss/tag/altcoin

1 Like

Is it possible to tag a post as News so the news is from this certain post in a topic ?

Better explaination: In our forum, members regularily posts news and Iā€™d like to apply a news tag to this post to make a news.

1 Like

The plugin currently supports using a category for the news source, but not tags.

2 Likes

Just to point out that Tags are not Post concepts, they are Topic level, so what you are asking for is challenging in any case.

2 Likes

Thatā€™s what I was thinking as I was typingā€¦

Is there a way to identify a post, apart from the post id, to extract these posts ?

1 Like

I have those settings on. And on default theme with topic previews plugin as well. This is what I see.

1 Like