Add BADGES settings and mixin for pip and conda badges

This commit is contained in:
ines 2017-03-26 14:11:22 +02:00
parent 9a481c9f42
commit 45d03ea05b
2 changed files with 21 additions and 1 deletions

View File

@ -63,7 +63,16 @@
"user": "spacy.us12",
"id": "83b0498b1e7fa3c91ce68c3f1",
"list": "89ad33e698"
}
},
"BADGES": {
"pipy": {
"badge": "https://img.shields.io/pypi/v/spacy.svg?style=flat-square",
"link": "https://pypi.python.org/pypi/spacy"
},
"conda": {
"badge": "https://anaconda.org/conda-forge/spacy/badges/version.svg",
"link": "https://anaconda.org/conda-forge/spacy"
}
}
}
}

View File

@ -110,6 +110,17 @@ mixin gitter(button, label)
!=button
//- Badge
name - [string] "pipy" or "conda"
mixin badge(name)
- site = BADGES[name]
if site
+a(site.link).u-padding-small
img(src=site.badge alt="{name} version" height="20")
//- Logo
mixin logo()