浏览代码

Document lobsters widget

Svilen Markov 1 年之前
父节点
当前提交
038c43bc09
共有 1 个文件被更改,包括 44 次插入0 次删除
  1. 44 0
      docs/configuration.md

+ 44 - 0
docs/configuration.md

@@ -10,6 +10,7 @@
   - [RSS](#rss)
   - [Videos](#videos)
   - [Hacker News](#hacker-news)
+  - [Lobsters](#lobsters)
   - [Reddit](#reddit)
   - [Weather](#weather)
   - [Monitor](#monitor)
@@ -491,6 +492,49 @@ Placeholders:
 
 `{POST-ID}` - the ID of the post
 
+### 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.