badges-backend: refactoring and support returning json as well as svg image.
Signed-off-by: Andreas Stenius <git@astekk.se>
This commit is contained in:
committed by
Fredrik Adelöw
parent
1cf23e05cb
commit
323ec6f7ca
@@ -1,10 +1,30 @@
|
||||
# Badges Backend
|
||||
|
||||
Simple plugin for serving badges.
|
||||
Backend plugin for serving badges. Default implementation uses
|
||||
[badge-maker](https://www.npmjs.com/package/badge-maker) for creating
|
||||
the badges, in svg.
|
||||
|
||||
## Setup
|
||||
|
||||
N/A
|
||||
Define which badges to offer in the backend api by declaring them in
|
||||
the app-config, under a `badges` key. Example:
|
||||
|
||||
```yaml
|
||||
badges:
|
||||
docs:
|
||||
kind: 'entity'
|
||||
target: '_{entity_url}/docs'
|
||||
label: 'Documentation'
|
||||
message: '_{entity.metadata.name}'
|
||||
color: 'navyblue'
|
||||
|
||||
lifecycle:
|
||||
kind: 'entity'
|
||||
description: 'Entity lifecycle badge'
|
||||
target: '_{entity_url}'
|
||||
label: 'Lifecycle'
|
||||
message: '_{entity.spec.lifecycle}'
|
||||
```
|
||||
|
||||
## Links
|
||||
|
||||
|
||||
Reference in New Issue
Block a user