Add more refinement options for HN widget

This commit is contained in:
Svilen Markov
2024-05-10 14:08:01 +01:00
parent 840ba0f240
commit 82f51293df
3 changed files with 25 additions and 7 deletions

View File

@@ -508,6 +508,8 @@ Preview:
| limit | integer | no | 15 |
| collapse-after | integer | no | 5 |
| comments-url-template | string | no | https://news.ycombinator.com/item?id={POST-ID} |
| sort-by | string | no | top |
| extra-sort-by | string | no | |
##### `comments-url-template`
Used to replace the default link for post comments. Useful if you want to use an alternative front-end. Example:
@@ -520,6 +522,14 @@ Placeholders:
`{POST-ID}` - the ID of the post
##### `sort-by`
Used to specify the order in which the posts should get returned. Possible values are `top`, `new`, and `best`.
##### `extra-sort-by`
Can be used to specify an additional sort which will be applied on top of the already sorted posts. By default does not apply any extra sorting and the only available option is `engagement`.
The `engagement` sort tries to place the posts with the most points and comments on top, also prioritizing recent over old posts.
### Reddit
Display a list of posts from a specific subreddit.