Allow showing thumbnails for reddit posts

This commit is contained in:
Svilen Markov
2024-05-02 00:34:25 +01:00
parent 25d45b309d
commit eb85a7656f
6 changed files with 60 additions and 8 deletions

View File

@@ -511,6 +511,7 @@ Example:
| ---- | ---- | -------- | ------- |
| subreddit | string | yes | |
| style | string | no | vertical-list |
| thumbnails | boolean | no | false |
| limit | integer | no | 15 |
| collapse-after | integer | no | 5 |
| comments-url-template | string | no | https://www.reddit.com/{POST-PATH} |
@@ -533,6 +534,15 @@ Used to change the appearance of the widget. Possible values are `vertical-list`
![](images/reddit-widget-vertical-cards-preview.png)
##### `thumbnails`
Shows or hides thumbnails next to the post. This only works if the `style` is `vertical-list`. Preview:
![](images/reddit-widget-vertical-list-thumbnails.png)
> [!NOTE]
>
> Thumbnails don't work for some subreddits due to Reddit's API not returning the thumbnail URL. No workaround for this yet.
##### `limit`
The maximum number of posts to show.

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB