nkanaev / yarr

yet another rss reader
MIT License
3.02k stars 225 forks source link

Use item.content if title isn't available. #203

Open asimpson opened 6 months ago

asimpson commented 6 months ago

The current implementation uses item.title in the list of feeds and if item.title is empty it will display Untitled.

https://github.com/nkanaev/yarr/blob/b13cd85f0bf2c77a9e78dff6792a99b9f27d063c/src/assets/index.html#L285

This can lead to a lot of visual noise if you're following a "micro blog" or activity pub type feed that don't have titles.

image

I'm happy to provide a PR or keep this in a fork but my idea would be to use item.content. This would of course look terrible for most feeds, therefore I think this should be a setting like Auto Refresh, e.g. Use content as title.

nkanaev commented 5 months ago

I'm happy with showing the content, but it must be sanitized/cleaned and truncated. Feel free to provide a PR and I'll have a look.

nkanaev commented 5 months ago

One thing to note is that the /api/items endpoint doesn't return content field of the articles. The reasoning is because some feeds' content is large, and was omitted from the results to make API loads faster.

With that in mind, title either needs to be populated during writing (storing to the db) or during read (fetching via API) in the backend.

asimpson commented 2 months ago

Still thinking about this. A few interesting display rules from micro.blog.