Open soph-sol opened 2 months ago
Can you post a screenshot of exactly where you are seeing the issue. As the description shows up in a few places.
sure thing, here you go:
Is this what you are looking for?
yes exactly!
Its a simple fix. I'll push a PR for it shortly.
wonderful, thanks so much!
The meta description scraped from websites may contain arbitrary line breaks, which are usually ignored when displaying the text. Here's an example: https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet/insertRule. Since most people probably just use the automatically generated description, changing the default is a no go. Maybe this could be an option, but I'd wait with adding something until there is a decent amount of interest in this.
At the moment, the notes field would be more appropriate for your use-case, as it is intended to support formatting. Since you imported your bookmarks that's not going to be a huge help. You'd need some automatism that would move your description into the notes field. It should be possible to write a script that does this with the REST API I think.
Thanks for the response, I do get it about the default way people use it. Unfortunately, moving my comments into the notes section won't help with my use case because it's important to me for my comments on my shared bookmarks to be visible, as this is a major way I make recommendations to people within my online community. Would you have another suggestion on how I could achieve what I'm looking for (publicly visible comments on bookmarks that can contain line breaks) without interfering with the defaults that other users prefer?
Making the description respect line breaks can be done by adding custom CSS via the settings:
ul.bookmark-list li .description.separate {
white-space: pre;
}
However that doesn't work properly at the moment due to how the HTML template is formatted - it adds leading and trailing whitespace. That would be an easy fix that could be done in the next patch release.
If you are comfortable with tinkering with files in the Docker container, you could fix it manually by making the following change to /etc/linkding/bookmarks/templates/bookmarks/bookmark_list.html
:
- <div class="description separate">
- {{ bookmark_item.description }}
- </div>
+ <div class="description separate">{{ bookmark_item.description }}</div>
But wait, if you want this to work on the shared bookmarks page for anonymous users then this doesn't help either. Those settings are stored in your user's profile, whereas anonymous users use a default profile. The default profile doesn't use a separate description, nor does it show the description over multiple lines. You can test this by logging out and then check the shared bookmarks page - it will look different from what you see when you are logged in.
I think what you want is being able to configure the default profile used for anon users. This is somewhat related: https://github.com/sissbruecker/linkding/issues/533
ahhh yes, configuring the default for anon users is definitely what I want, on top of changing my personal view! I'll add that custom css for myself, thanks for that. Should I open a new issue thread for the question of configuring the default profile?
Sure
I recently got a linkding instance set up for myself and an issue I've run into is that the description field formats all text as a single unbroken paragraph. I imported a large number of bookmarks where having hard returns in my descriptions is important in being able to easily read the information I put there. Having this field in the bookmarks list respect the returns that are in the input form would be very helpful.