From ce095fdcde65447ec63ce60acb5cf3d88edc75cd Mon Sep 17 00:00:00 2001 From: ines Date: Fri, 19 May 2017 20:24:17 +0200 Subject: [PATCH] Add +tag-model mixin to label functionality that requires model Usage: +tag-model("vectors") --- website/_includes/_mixins.jade | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/website/_includes/_mixins.jade b/website/_includes/_mixins.jade index 9975700f7..3c0565e15 100644 --- a/website/_includes/_mixins.jade +++ b/website/_includes/_mixins.jade @@ -164,6 +164,16 @@ mixin tag() block +//- "Requires model" tag with tooltip and list of capabilities + ...capabs - [string] Required model capabilities, e.g. "vectors". + +mixin tag-model(...capabs) + - var intro = "To use this functionality, spaCy needs a model to be installed" + - var ext = capabs ? " that supports the following capabilities: " + capabs.join(', ') : "" + +tag Requires model + +help(intro + ext + ".").u-color-theme + + //- List type - [string] "numbers", "letters", "roman" (bulleted list if none set) start - [integer] start number