From 294285eb39648f2c3fc6813030a153b9dde1b73a Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Sat, 15 Jan 2022 21:20:42 -0500 Subject: [PATCH] doc(plugins/stackoverflow): update --- source/plugins/stackoverflow/README.md | 67 +++++++++++++---------- source/plugins/stackoverflow/metadata.yml | 43 ++++++++------- 2 files changed, 61 insertions(+), 49 deletions(-) diff --git a/source/plugins/stackoverflow/README.md b/source/plugins/stackoverflow/README.md index 45c2bc4b..5d35527d 100644 --- a/source/plugins/stackoverflow/README.md +++ b/source/plugins/stackoverflow/README.md @@ -1,26 +1,28 @@ -### đŸ—¨ī¸ Stackoverflow plugin - -The *stackoverflow* plugin lets you display your metrics, questions and answer from [stackoverflow](https://stackoverflow.com/). - + - + + + + + + + + + + + + + + +
- - -

đŸ—¨ī¸ StackOverflow plugin

This plugin displays stats, questions and answer from stackoverflow.

+
Supported features
→ Full specification
📗 Classic template
👤 Users đŸ‘Ĩ Organizations
No tokens are required for this plugin
+ + +
+ -
-đŸ’Ŧ Get your user id - -Go to [stackoverflow.com](https://stackoverflow.com/) and click on your account profile. - -Your user id will be in both url and search bar. - -![User id](/.github/readme/imgs/plugin_stackoverflow_user_id.png) - -
- -#### âžĄī¸ Available options +## âžĄī¸ Available options @@ -29,7 +31,7 @@ Your user id will be in both url and search bar. - @@ -49,7 +51,13 @@ Your user id will be in both url and search bar. - @@ -61,7 +69,7 @@ Your user id will be in both url and search bar. - @@ -74,7 +82,8 @@ Your user id will be in both url and search bar. - @@ -82,11 +91,12 @@ Your user id will be in both url and search bar. (0 ≤ đ‘Ĩ)
+zero behaviour: disable
default: 4
- @@ -94,14 +104,13 @@ Your user id will be in both url and search bar. (0 ≤ đ‘Ĩ)
+zero behaviour: disable
default: 2
plugin_stackoverflow

Stackoverflow metrics

+

Enable stackoverflow plugin

plugin_stackoverflow_sections

Sections to display

+

Displayed sections

+
    +
  • answers-top: display most popular answers
  • +
  • answers-recent: display recent answers
  • +
  • questions-top: display most popular questions
  • +
  • questions-recent: display recent questions
  • +
plugin_stackoverflow_limit

Maximum number of entries to display per section

+

Display limit (per section)

plugin_stackoverflow_lines

Maximum number of lines to display per question or answer

+

Display limit for questions and answers

+

Code snippets count as a single line and must be configured with plugin_stackoverflow_lines_snippet instead

plugin_stackoverflow_lines_snippet

Maximum number of lines to display per code snippet

+

Display limit for code snippets

-*[→ Full specification](metadata.yml)* - -#### â„šī¸ Examples workflows +## â„šī¸ Examples workflows ```yaml @@ -117,4 +126,4 @@ with: plugin_stackoverflow_limit: 2 ``` - \ No newline at end of file + diff --git a/source/plugins/stackoverflow/metadata.yml b/source/plugins/stackoverflow/metadata.yml index 1884eb45..73ce2ff6 100644 --- a/source/plugins/stackoverflow/metadata.yml +++ b/source/plugins/stackoverflow/metadata.yml @@ -1,5 +1,8 @@ -name: "đŸ—¨ī¸ Stackoverflow plugin" +name: "đŸ—¨ī¸ StackOverflow plugin" category: social +description: This plugin displays stats, questions and answer from [stackoverflow](https://stackoverflow.com/). +examples: + default: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.stackoverflow.svg index: 3 supports: - user @@ -7,52 +10,52 @@ supports: scopes: [] inputs: - # Enable or disable plugin plugin_stackoverflow: - description: Stackoverflow metrics + description: Enable stackoverflow plugin type: boolean default: no - # Stackoverflow user id - # To obtain it, extract the identifier on your account page url plugin_stackoverflow_user: description: Stackoverflow user id type: number default: 0 - # Sections to display plugin_stackoverflow_sections: - description: Sections to display + description: | + Displayed sections + - `answers-top`: display most popular answers + - `answers-recent`: display recent answers + - `questions-top`: display most popular questions + - `questions-recent`: display recent questions type: array format: comma-separated default: answers-top, questions-recent values: - - answers-top # Display top answers - - answers-recent # Display recent answers - - questions-top # Display top questions - - questions-recent # Display recent questions + - answers-top + - answers-recent + - questions-top + - questions-recent - # Number of entries to display per section plugin_stackoverflow_limit: - description: Maximum number of entries to display per section + description: Display limit (per section) type: number default: 2 min: 1 max: 30 - # Number of lines to display per question or answer - # Code snippets will take one line slot and should be configured with "plugin_stackoverflow_lines_snippet" instead - # Set to 0 to disable limitations plugin_stackoverflow_lines: - description: Maximum number of lines to display per question or answer + description: | + Display limit for questions and answers + + Code snippets count as a single line and must be configured with `plugin_stackoverflow_lines_snippet` instead type: number default: 4 min: 0 + zero: disable - # Number of lines to display per code snippet - # Set to 0 to disable limitations plugin_stackoverflow_lines_snippet: - description: Maximum number of lines to display per code snippet + description: Display limit for code snippets type: number default: 2 min: 0 + zero: disable