Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
asimpson opened this issue May 20, 2024 · 3 comments
Open

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

asimpson opened this issue May 20, 2024 · 3 comments

Comments

@asimpson
Copy link

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

<div>{{ item.title || 'untitled' }}</div>

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
Copy link
Owner

nkanaev commented Jun 6, 2024

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
Copy link
Owner

nkanaev commented Jun 7, 2024

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants