Skip to content

A self-hosted dashboard that puts all your feeds in one place

Merge branch 'main' into lobsters-widget

Svilen Markove3c17e03475f
diff --cc docs/configuration.md
index 41da31b,18e23b2..6767e69
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@@ -492,49 -522,14 +523,57 @@@ 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.
+
+### Lobsters
+Display a list of posts from [Lobsters](https://lobste.rs).
+
+Example:
+
+```yaml
+- type: lobsters
+ sort-by: hot
+ tags:
+ - go
+ - security
+ - linux
+ limit: 15
+ collapse-after: 5
+```
+
+<!--
+TODO: add preview
+
+Preview:
+![](images/lobsters-widget-preview.png)
+ -->
+
+#### Properties
+| Name | Type | Required | Default |
+| ---- | ---- | -------- | ------- |
+| limit | integer | no | 15 |
+| collapse-after | integer | no | 5 |
+| sort-by | string | no | hot |
+| tags | array | no | |
+
+##### `limit`
+The maximum number of posts to show.
+
+##### `collapse-after`
+How many posts are visible before the "SHOW MORE" button appears. Set to `-1` to never collapse.
+
+##### `sort-by`
+The sort order in which posts are returned. Possible options are `hot` and `new`.
+
+##### `tags`
+Limit to posts containing one of the given tags. **You cannot specify a sort order when filtering by tags, it will default to `hot`.**
+
### Reddit
Display a list of posts from a specific subreddit.
diff --cc internal/widget/widget.go
index debda3c,3707b7e..e4d01ef
--- a/internal/widget/widget.go
+++ b/internal/widget/widget.go
@@@ -43,8 -43,8 +43,10 @@@ func New(widgetType string) (Widget, er
return &TwitchGames{}, nil
case "twitch-channels":
return &TwitchChannels{}, nil
+ case "lobsters":
+ return &Lobsters{}, nil
+ case "repository":
+ return &Repository{}, nil
default:
return nil, fmt.Errorf("unknown widget type: %s", widgetType)
}