|
1 | 1 | <!--header--> |
| 2 | +<table> |
| 3 | + <tr><th colspan="2"><h3>📒 Markdown template</h3></th></tr> |
| 4 | + <tr><td colspan="2" align="center">A template capable of rendering markdown from a given template file.</td></tr> |
| 5 | + <tr> |
| 6 | + <th rowspan="3">Supported features<br><sub><a href="metadata.yml">→ Full specification</a></sub></th> |
| 7 | + <td><a href="/source/plugins/activity" title="📰 Recent activity">📰</a> <a href="/source/plugins/posts" title="✒️ Recent posts">✒️</a> <a href="/source/plugins/rss" title="🗼 Rss feed">🗼</a> <a href="/source/plugins/topics" title="📌 Starred topics">📌</a> <a href="/source/plugins/tweets" title="🐤 Latest tweets">🐤</a></td> |
| 8 | + </tr> |
| 9 | + <tr> |
| 10 | + <td>👤 Users, 👥 Organizations</td> |
| 11 | + </tr> |
| 12 | + <tr> |
| 13 | + <td>#️⃣ JSON, 🔠 Markdown, 🔠 Markdown (PDF)</td> |
| 14 | + </tr> |
| 15 | + <tr> |
| 16 | + <td colspan="2" align="center"> |
| 17 | + <img src="https://github.com/lowlighter/lowlighter/blob/master/metrics.markdown.png" alt=""></img> |
| 18 | + <img width="900" height="1" alt=""> |
| 19 | + </td> |
| 20 | + </tr> |
| 21 | +</table> |
2 | 22 | <!--/header--> |
3 | 23 |
|
4 | | -#### ℹ️ Examples workflows |
5 | | - |
6 | | -<!--examples--> |
7 | | -<!--/examples--> |
8 | | - |
9 | | -___ |
10 | | - |
11 | 24 | This template can be used to a *markdown template file* with data gathered by metrics. |
12 | 25 |
|
13 | 26 | Since the resulting output is a markdown file, it is possible to do additional formatting such as creating hyperlinks and adding custom texts. |
@@ -116,3 +129,70 @@ The `embed()` function takes two arguments: |
116 | 129 | > 💡 The `plugin_` prefix can be dropped for convenience |
117 | 130 |
|
118 | 131 | > 💡 The `embed()` function does not have `🗃️ base` plugin enabled by default. To use it, it is required to explicitely pass them through `base` option. |
| 132 | + |
| 133 | +## ℹ️ Examples workflows |
| 134 | + |
| 135 | +<!--examples--> |
| 136 | +```yaml |
| 137 | +name: Example |
| 138 | +uses: lowlighter/metrics@latest |
| 139 | +with: |
| 140 | + template: markdown |
| 141 | + filename: metrics.markdown.md |
| 142 | + markdown: metrics.markdown.template.md |
| 143 | + config_output: markdown |
| 144 | + token: ${{ secrets.METRICS_TOKEN }} |
| 145 | +
|
| 146 | +``` |
| 147 | +```yaml |
| 148 | +name: Example with plugins configuration for embed use |
| 149 | +uses: lowlighter/metrics@latest |
| 150 | +with: |
| 151 | + template: markdown |
| 152 | + filename: metrics.markdown.full.md |
| 153 | + markdown: >- |
| 154 | + https://raw.githubusercontent.com/lowlighter/metrics/master/source/templates/markdown/example.md |
| 155 | + config_output: markdown |
| 156 | + plugin_activity: 'yes' |
| 157 | + plugin_activity_limit: 7 |
| 158 | + plugin_activity_days: 0 |
| 159 | + plugin_activity_filter: issue, pr, release, fork, review, ref/create |
| 160 | + plugin_posts: 'yes' |
| 161 | + plugin_posts_source: dev.to |
| 162 | + plugin_posts_descriptions: 'yes' |
| 163 | + plugin_posts_covers: 'yes' |
| 164 | + plugin_posts_limit: 2 |
| 165 | + plugin_rss: 'yes' |
| 166 | + plugin_rss_source: https://news.ycombinator.com/rss |
| 167 | + plugin_rss_limit: 4 |
| 168 | + plugin_tweets: 'yes' |
| 169 | + plugin_tweets_token: ${{ secrets.TWITTER_TOKEN }} |
| 170 | + plugin_tweets_user: github |
| 171 | + plugin_tweets_attachments: 'yes' |
| 172 | + plugin_tweets_limit: 2 |
| 173 | + plugin_topics: 'yes' |
| 174 | + plugin_topics_limit: 24 |
| 175 | + plugin_isocalendar: 'yes' |
| 176 | + plugin_languages: 'yes' |
| 177 | + token: ${{ secrets.METRICS_TOKEN }} |
| 178 | +
|
| 179 | +``` |
| 180 | +```yaml |
| 181 | +name: Example (pdf output) |
| 182 | +uses: lowlighter/metrics@latest |
| 183 | +with: |
| 184 | + template: markdown |
| 185 | + filename: metrics.markdown.pdf |
| 186 | + markdown: >- |
| 187 | + https://raw.githubusercontent.com/lowlighter/metrics/master/source/templates/markdown/example.pdf.md |
| 188 | + config_output: markdown-pdf |
| 189 | + plugin_rss: 'yes' |
| 190 | + plugin_rss_source: https://news.ycombinator.com/rss |
| 191 | + plugin_rss_limit: 4 |
| 192 | + plugin_isocalendar: 'yes' |
| 193 | + config_twemoji: 'yes' |
| 194 | + config_padding: 5% |
| 195 | + token: ${{ secrets.METRICS_TOKEN }} |
| 196 | +
|
| 197 | +``` |
| 198 | +<!--/examples--> |
0 commit comments