From 45d03ea05bf2ee4bdfb81d8329f966e9d3774187 Mon Sep 17 00:00:00 2001 From: ines Date: Sun, 26 Mar 2017 14:11:22 +0200 Subject: [PATCH] Add BADGES settings and mixin for pip and conda badges --- website/_harp.json | 11 ++++++++++- website/_includes/_mixins-base.jade | 11 +++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/website/_harp.json b/website/_harp.json index 2cbfe538b..82e82093e 100644 --- a/website/_harp.json +++ b/website/_harp.json @@ -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" + } } - } } diff --git a/website/_includes/_mixins-base.jade b/website/_includes/_mixins-base.jade index ea4d2964d..80aa98a00 100644 --- a/website/_includes/_mixins-base.jade +++ b/website/_includes/_mixins-base.jade @@ -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()