Use item.content if title isn't available.
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.
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.
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.
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.
Still thinking about this. A few interesting display rules from micro.blog.
- If the post has no title and is 300 characters or less, the text is shown directly in the Micro.blog timeline.
- If the post has no title and is over 300 characters, the text is truncated with a link back to the full post on your site.
- If there’s a title and it looks like a date or number, Micro.blog ignores it, as if there were no title. It then tries to show the text in the timeline.
implemented in https://github.com/nkanaev/yarr/commit/ad138c3017832f14ae452969816f9e4e7ce5237e
Wow, I honestly didn't expect you to do this work! Thank you so much! I've already tested this out and it looks great 🏆.