GFDRR / opencities

Jekyll template pages for Open Cities project
https://opencitiesproject.org
GNU General Public License v3.0
2 stars 6 forks source link

Add news feed from OpenDRI.org #8

Closed cgiovando closed 5 years ago

cgiovando commented 6 years ago

We should explore how to include a feed of news from each city, pulling articles (syndicated) from OpenDRI.org.

For example on the Kampala page, we could show a live feed of news published on https://opendri.org/open-cities-kampala or with a specific hashtag on their Twitter account.

gracedoherty commented 6 years ago

Hi @ppasq , can we start this by creating a news section on the homepage? It would go between A Collaborative Approach and Contact Us. The news feed would include any blog post (category/news) that has the "Open Cities" tag.

gracedoherty commented 6 years ago

Actually for now we'll do the specific "Open Cities Africa" tag, here: https://opendri.org/tag/open-cities-africa/

ppasq commented 6 years ago

I'm experimenting with parsing external RSS feeds with Jekyll. That seems to work although it could potentially slow down the website homepage. As soon as I have something ready I'll make a PR.

ppasq commented 6 years ago

I've added a feed parser implemented with a javascript. It was configured to display the latest 6 posts tagged "open-cities-africa" from OpenDRI.org This solution has some limitations (only feed item title and description are available) and based on an external service. For future documentation: I've tried feedjira, a Jekyll's plugin, but only a few gems are supported by github pages so it cannot be installed and equivalent solutions are not available. More on this here.

vdeparday commented 6 years ago

Thank you Paolo, I think that is a very good start. Could we add an heading to that section? It would definitely be great to have a picture for each too.

Thank you

On Tue, Oct 30, 2018, 12:12 PM Paolo Pasquali notifications@github.com wrote:

I've added a feed parser implemented with a javascript https://rss.bloople.net. It was configured to display the latest 6 posts tagged "open-cities-africa" from OpenDRI.org This solution has some limitations (only feed item title and description are available) and based on an external service. For future documentation: I've tried feedjira, https://github.com/feedjira/feedjira a Jekyll's plugin, but only a few gems are supported by github pages so it cannot be installed and equivalent solutions are not available. More on this here https://help.github.com/articles/configuring-jekyll-plugins/#default-plugins .

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GFDRR/opencities/issues/8#issuecomment-434363786, or mute the thread https://github.com/notifications/unsubscribe-auth/AA_PnUsiEb5Nczn1zcYvD6dYlX7sCFi_ks5uqHp-gaJpZM4VXqL2 .

ppasq commented 6 years ago

No problem for the heading. But the item image is not available in the feed itself .

gracedoherty commented 6 years ago

This is a good temporary addition. We will still want the feature photo from the blogs eventually.

Could you make Powered by rss2html less noticeable?

vdeparday commented 6 years ago

Would it be possible to add on the city page but filtered only for the content related to the city? Also could we change the Title to "Blog Posts on Open Cities Africa" Although feel the layout is a bit heavy to read, I am not sure if we could do something with the colors, the layours, or else to help a little bit ?

ppasq commented 6 years ago

It is possible to filter feeds using tags. So every post must have a tag with (at least) a city name. For instance, the post on Zanzibar is missing that tag so you just need to add it. However, the city pages are loading a lot of statistics from OSMA and adding a feed will slow down the page even more (especially connecting from areas where there is no good bandwidth). What about moving some OSMA stats in another page?

I agree on the feed layout. I'll try to improve the layout.

gracedoherty commented 6 years ago

The slow loading for low bandwidth countries is a concern I've been having too. Is there a way to sequence the loading of these features? Such as: 1) Loading each feature of the page only as you scroll down to see it, or 2) Providing a "load" button for each stat feature. Ideally anyone with high bandwidth would see the feature load automatically the way we currently have it, and anyone in a slower area would have the load option.

gracedoherty commented 6 years ago

Regardless of whether we add feeds to each city page, I'll go through the News on OpenDRI to double check for location tags.

vdeparday commented 6 years ago

In the short term, we can just have quick refresh at the layout?

cgiovando commented 5 years ago

I noticed some slow loading of the whole homepage because of calls to bloople.net which I think it's the service for RSS2HTML. If you have the same issue we can re-open and think of a different solution.