From 1359cfe32ffe2ef1195fda76695edc627516bb9a Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Mon, 3 Oct 2016 12:33:22 +0200 Subject: [PATCH 1/9] Update README.rst --- README.rst | 374 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 326 insertions(+), 48 deletions(-) diff --git a/README.rst b/README.rst index bd4186fd1..d8513640b 100644 --- a/README.rst +++ b/README.rst @@ -1,77 +1,244 @@ +spaCy: Industrial-strength NLP +****************************** + +spaCy is a library for advanced natural language processing in Python and +Cython. `See here `_ for documentation and details. spaCy is built on +the very latest research, but it isn't researchware. It was designed from day 1 +to be used in real products. It's commercial open-source software, released under +the MIT license. + +.. image:: http://i.imgur.com/wFvLZyJ.png + :target: https://travis-ci.org/spacy-io/spaCy + .. image:: https://travis-ci.org/spacy-io/spaCy.svg?branch=master :target: https://travis-ci.org/spacy-io/spaCy -============================== -spaCy: Industrial-strength NLP -============================== - -spaCy is a library for advanced natural language processing in Python and Cython. - -Documentation and details: https://spacy.io/ - -spaCy is built on the very latest research, but it isn't researchware. It was -designed from day 1 to be used in real products. It's commercial open-source -software, released under the MIT license. - Features --------- +======== * Labelled dependency parsing (91.8% accuracy on OntoNotes 5) - * Named entity recognition (82.6% accuracy on OntoNotes 5) - * Part-of-speech tagging (97.1% accuracy on OntoNotes 5) - * Easy to use word vectors - * All strings mapped to integer IDs - * Export to numpy data arrays - * Alignment maintained to original string, ensuring easy mark up calculation - * Range of easy-to-use orthographic features. - * No pre-processing required. spaCy takes raw text as input, warts and newlines and all. Top Peformance --------------- +============== * Fastest in the world: <50ms per document. No faster system has ever been announced. - * Accuracy within 1% of the current state of the art on all tasks performed (parsing, named entity recognition, part-of-speech tagging). The only more accurate systems are an order of magnitude slower or more. Supports --------- +======== * CPython 2.6, 2.7, 3.3, 3.4, 3.5 (only 64 bit) * OSX * Linux * Windows (Cygwin, MinGW, Visual Studio) +Install spaCy +============= -2016-05-0 0.101.0: Fixed German model -------------------------------------- +spaCy is compatible with 64-bit CPython 2.6+/3.3+ and runs on Unix/Linux, OS X +and Windows. Source and binary packages are available via +`pip `_ and `conda `_. +If there are no binary packages for your platform available please make sure that +you have a working build enviroment set up. See notes on Ubuntu, OS X and Windows +for details. + +conda +----- + +.. code:: bash + + conda config --add channels spacy # only needed once + conda install spacy + +pip +--- + +When using pip it is generally recommended to install packages in a virtualenv to +avoid modifying system state: + +.. code:: bash + + # make sure you are using a recent pip/virtualenv version + python -m pip install -U pip virtualenv + + virtualenv .env + source .env/bin/activate + + pip install spacy + +Python packaging is awkward at the best of times, and it's particularly tricky with +C extensions, built via Cython, requiring large data files. So, please report issues +as you encounter them. + +Install model +============= + +After installation you need to download a language model. Currently only models for +English and German, named ``en`` and ``de``, are available. + +.. code:: bash + + python -m spacy.en.download + python -m spacy.de.download + sputnik --name spacy en_glove_cc_300_1m_vectors # For better word vectors + +Then check whether the model was successfully installed: + +.. code:: bash + + python -c "import spacy; spacy.load('en'); print('OK')" + +The download command fetches and installs about 500 MB of data which it installs +within the ``spacy`` package directory. + +Upgrading spaCy +=============== + +To upgrade spaCy to the latest release: + +conda +----- + +.. code:: bash + + conda update spacy + +pip +--- + +.. code:: bash + + pip install -U spacy + +Sometimes new releases require a new language model. Then you will have to upgrade to +a new model, too. You can also force re-downloading and installing a new language model: + +.. code:: bash + + python -m spacy.en.download --force + +Compile from source +=================== + +The other way to install spaCy is to clone its GitHub repository and build it from +source. That is the common way if you want to make changes to the code base. + +You'll need to make sure that you have a development enviroment consisting of a +Python distribution including header files, a compiler, pip, virtualenv and git +installed. The compiler part is the trickiest. How to do that depends on your +system. See notes on Ubuntu, OS X and Windows for details. + +.. code:: bash + + # make sure you are using recent pip/virtualenv versions + python -m pip install -U pip virtualenv + + # find git install instructions at https://git-scm.com/downloads + git clone https://github.com/spacy-io/spaCy.git + + cd spaCy + virtualenv .env && source .env/bin/activate + pip install -r requirements.txt + pip install -e . + +Compared to regular install via pip and conda `requirements.txt `_ +additionally installs developer dependencies such as cython. + +Ubuntu +------ + +Install system-level dependencies via ``apt-get``: + +.. code:: bash + + sudo apt-get install build-essential python-dev git + +OS X +---- + +Install a recent version of XCode, including the so-called "Command Line Tools". +OS X ships with Python and git preinstalled. + +Windows +------- + +Install a version of Visual Studio Express or higher that matches the version +that was used to compile your Python interpreter. For official distributions +these are VS 2008 (Python 2.7), VS 2010 (Python 3.4) and VS 2015 (Python 3.5). + +Workaround for obsolete system Python +===================================== + +If you're stuck using a system with an old version of Python, and you don't +have root access, we've prepared a bootstrap script to help you compile a local +Python install. Run: + +.. code:: bash + + curl https://raw.githubusercontent.com/spacy-io/gist/master/bootstrap_python_env.sh | bash && source .env/bin/activate + +Run tests +========= + +spaCy comes with an extensive test suite. First, find out where spaCy is +installed: + +.. code:: bash + + python -c "import os; import spacy; print(os.path.dirname(spacy.__file__))" + +Then run ``pytest`` on that directory. The flags ``--vectors``, ``--slow`` +and ``--model`` are optional and enable additional tests: + +.. code:: bash + + # make sure you are using recent pytest version + python -m pip install -U pytest + + python -m pytest --vectors --model --slow + +API Documentation and Usage Examples +==================================== + +For the detailed documentation, check out the `spaCy website `_. + +* `Usage Examples `_ +* `API `_ +* `Annotation Specification `_ +* `Tutorials `_ + + +Changelog +========= + +2016-05-10 `v0.101.0 <../../releases/tag/0.101.0>`_: *Fixed German model* +------------------------------------------------------------------------- * Fixed bug that prevented German parses from being deprojectivised. - * Bug fixes to sentence boundary detection. - * Add rich comparison methods to the Lexeme class. +* Add missing ``Doc.has_vector`` and ``Span.has_vector`` properties. +* Add missing ``Span.sent`` property. -* Add missing Doc.has_vector and Span.has_vector properties. +2016-05-05 `v0.100.7 <../../releases/tag/0.100.7>`_: *German!* +-------------------------------------------------------------- -* Add missing Span.sent property. - - -2016-05-05 v0.100.7: German! ----------------------------- - -spaCy finally supports another language, in addition to English. We're lucky to have Wolfgang Seeker on the team, and the new German model is just the beginning. -Now that there are multiple languages, you should consider loading spaCy via the load() function. This function also makes it easier to load extra word vector data for English: +spaCy finally supports another language, in addition to English. We're lucky +to have Wolfgang Seeker on the team, and the new German model is just the +beginning. Now that there are multiple languages, you should consider loading +spaCy via the ``load()`` function. This function also makes it easier to load extra +word vector data for English: .. code:: python @@ -79,8 +246,9 @@ Now that there are multiple languages, you should consider loading spaCy via the en_nlp = spacy.load('en', vectors='en_glove_cc_300_1m_vectors') de_nlp = spacy.load('de') -To support use of the load function, there are also two new helper functions: spacy.get_lang_class and spacy.set_lang_class. -Once the German model is loaded, you can use it just like the English model: +To support use of the load function, there are also two new helper functions: +``spacy.get_lang_class`` and ``spacy.set_lang_class``. Once the German model is +loaded, you can use it just like the English model: .. code:: python @@ -92,20 +260,130 @@ Once the German model is loaded, you can use it just like the English model: # (u'ist', 1, 2) # (u'sind', 1, 3) -The German model provides tokenization, POS tagging, sentence boundary detection, syntactic dependency parsing, recognition of organisation, location and person entities, and word vector representations trained on a mix of open subtitles and Wikipedia data. It doesn't yet provide lemmatisation or morphological analysis, and it doesn't yet recognise numeric entities such as numbers and dates. +The German model provides tokenization, POS tagging, sentence boundary detection, +syntactic dependency parsing, recognition of organisation, location and person +entities, and word vector representations trained on a mix of open subtitles and +Wikipedia data. It doesn't yet provide lemmatisation or morphological analysis, +and it doesn't yet recognise numeric entities such as numbers and dates. -Bugfixes --------- +**Bugfixes** -* spaCy < 0.100.7 had a bug in the semantics of the Token.__str__ and Token.__unicode__ built-ins: they included a trailing space. +* spaCy < 0.100.7 had a bug in the semantics of the ``Token.__str__`` and ``Token.__unicode__`` built-ins: they included a trailing space. * Improve handling of "infixed" hyphens. Previously the tokenizer struggled with multiple hyphens, such as "well-to-do". - * Improve handling of periods after mixed-case tokens - * Improve lemmatization for English special-case tokens - * Fix bug that allowed spaces to be treated as heads in the syntactic parse - * Fix bug that led to inconsistent sentence boundaries before and after serialisation. - * Fix bug from deserialising untagged documents. + +2016-03-08 `v0.100.6 <../../releases/tag/0.100.6>`_: *Add support for GloVe vectors* +------------------------------------------------------------------------------------ + +This release offers improved support for replacing the word vectors used by spaCy. +To install Stanford's GloVe vectors, trained on the Common Crawl, just run: + +.. code:: bash + sputnik --name spacy install en_glove_cc_300_1m_vectors + +To reduce memory usage and loading time, we've trimmed the vocabulary down to 1m entries. + +This release also integrates all the code necessary for German parsing. A German model +will be released shortly. To assist in multi-lingual processing, we've added a ``load()`` +function. To load the English model with the GloVe vectors: + +.. code:: python + spacy.load('en', vectors='en_glove_cc_300_1m_vectors') + +2016-02-07 `v0.100.5 <../../releases/tag/0.100.5>`_ +--------------------------------------------------- + +Fix incorrect use of header file, caused from problem with thinc + +2016-02-07 `v0.100.4 <../../releases/tag/0.100.4>`_: *Fix OSX problem introduced in 0.100.3* +-------------------------------------------------------------------------------------------- + +Small correction to right_edge calculation + +2016-02-06 `v0.100.3 <../../releases/tag/0.100.3>`_ +--------------------------------------------------- + +Support multi-threading, via the ``.pipe`` method. spaCy now releases the GIL around the +parser and entity recognizer, so systems that support OpenMP should be able to do +shared memory parallelism at close to full efficiency. + +We've also greatly reduced loading time, and fixed a number of bugs. + +2016-01-21 `v0.100.2 <../../releases/tag/0.100.2>`_ +--------------------------------------------------- + +Fix data version lock that affected v0.100.1 + +2016-01-21 `v0.100.1 <../../releases/tag/0.100.1>`_: *Fix install for OSX* +-------------------------------------------------------------------------- + +v0.100 included header files built on Linux that caused installation to fail on OSX. +This should now be corrected. We also update the default data distribution, to +include a small fix to the tokenizer. + +2016-01-19 `v0.100 <../../releases/tag/0.100>`_: *Revise setup.py, better model downloads, bug fixes* +----------------------------------------------------------------------------------------------------- + +* Redo setup.py, and remove ugly headers_workaround hack. Should result in fewer install problems. +* Update data downloading and installation functionality, by migrating to the Sputnik data-package manager. This will allow us to offer finer grained control of data installation in future. +* Fix bug when using custom entity types in ``Matcher``. This should work by default when using the + ``English.__call__`` method of running the pipeline. If invoking ``Parser.__call__`` directly to do NER, + you should call the ``Parser.add_label()`` method to register your entity type. +* Fix head-finding rules in ``Span``. +* Fix problem that caused ``doc.merge()`` to sometimes hang +* Fix problems in handling of whitespace + +2015-11-08 `v0.99 <../../releases/tag/0.99>`_: *Improve span merging, internal refactoring* +------------------------------------------------------------------------------------------- + +* Merging multi-word tokens into one, via the ``doc.merge()`` and ``span.merge()`` methods, no longer invalidates existing ``Span`` objects. This makes it much easier to merge multiple spans, e.g. to merge all named entities, or all base noun phrases. Thanks to @andreasgrv for help on this patch. +* Lots of internal refactoring, especially around the machine learning module, thinc. The thinc API has now been improved, and the spacy._ml wrapper module is no longer necessary. +* The lemmatizer now lower-cases non-noun, noun-verb and non-adjective words. +* A new attribute, ``.rank``, is added to Token and Lexeme objects, giving the frequency rank of the word. + +2015-11-03 `v0.98 <../../releases/tag/0.98>`_: *Smaller package, bug fixes* +--------------------------------------------------------------------------- + +* Remove binary data from PyPi package. +* Delete archive after downloading data +* Use updated cymem, preshed and thinc packages +* Fix information loss in deserialize +* Fix ``__str__`` methods for Python2 + +2015-10-23 `v0.97 <../../releases/tag/0.97>`_: *Load the StringStore from a json list, instead of a text file* +-------------------------------------------------------------------------------------------------------------- + +* Fix bugs in download.py +* Require ``--force`` to over-write the data directory in download.py +* Fix bugs in ``Matcher`` and ``doc.merge()`` + +2015-10-19 `v0.96 <../../releases/tag/0.96>`_: *Hotfix to .merge method* +------------------------------------------------------------------------ + +* Fix bug that caused text to be lost after ``.merge`` +* Fix bug in Matcher when matched entities overlapped + +2015-10-18 `v0.95 <../../releases/tag/0.95>`_: *Bugfixes* +--------------------------------------------------------- + +* Reform encoding of symbols +* Fix bugs in ``Matcher`` +* Fix bugs in ``Span`` +* Add tokenizer rule to fix numeric range tokenization +* Add specific string-length cap in Tokenizer +* Fix ``token.conjuncts``` + +2015-10-09 `v0.94 <../../releases/tag/0.94>`_ +--------------------------------------------- + +* Fix memory error that caused crashes on 32bit platforms +* Fix parse errors caused by smart quotes and em-dashes + +2015-09-22 `v0.93 <../../releases/tag/0.93>`_ +--------------------------------------------- + +Bug fixes to word vectors From eae2d723d19944cf7f6e9929f0d514c4953c92d3 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 3 Oct 2016 21:33:58 +1100 Subject: [PATCH 2/9] Update LICENSE --- LICENSE | 1 + 1 file changed, 1 insertion(+) diff --git a/LICENSE b/LICENSE index 2e28bdbd8..45fcde806 100644 --- a/LICENSE +++ b/LICENSE @@ -2,6 +2,7 @@ The MIT License (MIT) Copyright (C) 2015 Matthew Honnibal 2016 spaCy GmbH + 2016 ExplosionAI UG (haftungsbeschränkt) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 504b80b6da9024cf373ebba060f71b8eaf000d66 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Mon, 3 Oct 2016 20:19:05 +0200 Subject: [PATCH 3/9] Update gitignore --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 0311fe842..4d9f6efab 100644 --- a/.gitignore +++ b/.gitignore @@ -101,3 +101,7 @@ website/demos/sense2vec/ # Komodo project files *.komodoproject + +# Website +website/_deploy.sh +website/package.json From 9e8f333763f1514b9022f98d847f1801ef4530e5 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Mon, 3 Oct 2016 20:19:13 +0200 Subject: [PATCH 4/9] Update website --- website/.gitignore | 2 + website/404.jade | 13 +- website/README.md | 28 +- website/_data.json | 40 +- website/_fabfile.py | 94 - website/_harp.json | 90 +- website/_includes/_analytics.jade | 7 - website/_includes/_article.jade | 34 - website/_includes/_footer.jade | 21 +- website/_includes/_functions.jade | 104 +- website/_includes/_head.jade | 31 - website/_includes/_header.jade | 21 - website/_includes/_latest-posts.jade | 17 - website/_includes/_logo.jade | 9 +- website/_includes/_mixins.jade | 386 +-- website/_includes/_mixins/_base.jade | 42 + website/_includes/_mixins/_components.jade | 112 + website/_includes/_mixins/_headlines.jade | 49 + website/_includes/_nav.jade | 32 - website/_includes/_navigation.jade | 26 + website/_includes/_newsletter.jade | 29 +- website/_includes/_profile.jade | 21 - website/_includes/_scripts.jade | 14 + website/_includes/_sidebar.jade | 21 +- website/_includes/_teaser.jade | 22 - website/_layout.jade | 72 +- website/assets/css/_base/_animations.sass | 34 +- website/assets/css/_base/_fonts.sass | 113 +- website/assets/css/_base/_grid.sass | 146 +- website/assets/css/_base/_layout.sass | 41 + website/assets/css/_base/_objects.sass | 75 + website/assets/css/_base/_reset.sass | 129 +- website/assets/css/_base/_typography.sass | 174 - website/assets/css/_base/_utilities.sass | 134 + website/assets/css/_components/_alerts.sass | 33 - website/assets/css/_components/_asides.sass | 72 +- website/assets/css/_components/_boxes.sass | 39 - website/assets/css/_components/_buttons.sass | 91 +- website/assets/css/_components/_cards.sass | 44 - website/assets/css/_components/_code.sass | 148 +- website/assets/css/_components/_dividers.sass | 72 - website/assets/css/_components/_embeds.sass | 35 - website/assets/css/_components/_forms.sass | 28 - website/assets/css/_components/_icons.sass | 39 - website/assets/css/_components/_images.sass | 39 - website/assets/css/_components/_labels.sass | 46 - website/assets/css/_components/_links.sass | 60 - website/assets/css/_components/_lists.sass | 77 +- website/assets/css/_components/_logo.sass | 36 - website/assets/css/_components/_misc.sass | 104 +- .../assets/css/_components/_navigation.sass | 52 + website/assets/css/_components/_quotes.sass | 36 - website/assets/css/_components/_sidebar.sass | 40 + website/assets/css/_components/_tables.sass | 99 +- website/assets/css/_components/_tooltips.sass | 44 - website/assets/css/_layout/_article.sass | 25 - website/assets/css/_layout/_body.sass | 53 - website/assets/css/_layout/_footer.sass | 20 - website/assets/css/_layout/_header.sass | 50 - website/assets/css/_layout/_nav.sass | 108 - website/assets/css/_layout/_sidebar.sass | 65 - website/assets/css/{_utils => }/_mixins.sass | 52 +- website/assets/css/_utils/_functions.sass | 23 - website/assets/css/_variables.sass | 37 + website/assets/css/_variables.scss | 93 - website/assets/css/_vendors/_displacy.sass | 42 - website/assets/css/_vendors/_normalize.sass | 181 -- website/assets/css/_vendors/_prism.sass | 77 - website/assets/css/style.sass | 52 +- website/assets/css/style_blog.sass | 6 - website/assets/fonts/icomoon.eot | Bin 5148 -> 0 bytes website/assets/fonts/icomoon.svg | 27 - website/assets/fonts/icomoon.ttf | Bin 4984 -> 0 bytes website/assets/fonts/icomoon.woff | Bin 5060 -> 0 bytes website/assets/fonts/lato-bold.eot | Bin 35215 -> 0 bytes website/assets/fonts/lato-bold.svg | 2787 ---------------- website/assets/fonts/lato-bold.ttf | Bin 76172 -> 0 bytes website/assets/fonts/lato-bold.woff | Bin 38312 -> 0 bytes website/assets/fonts/lato-bold.woff2 | Bin 30576 -> 0 bytes website/assets/fonts/lato-bolditalic.eot | Bin 37995 -> 0 bytes website/assets/fonts/lato-bolditalic.svg | 2800 ---------------- website/assets/fonts/lato-bolditalic.ttf | Bin 81572 -> 0 bytes website/assets/fonts/lato-bolditalic.woff | Bin 41100 -> 0 bytes website/assets/fonts/lato-bolditalic.woff2 | Bin 32900 -> 0 bytes website/assets/fonts/lato-italic.eot | Bin 37885 -> 0 bytes website/assets/fonts/lato-italic.svg | 2805 ----------------- website/assets/fonts/lato-italic.ttf | Bin 82492 -> 0 bytes website/assets/fonts/lato-italic.woff | Bin 41084 -> 0 bytes website/assets/fonts/lato-italic.woff2 | Bin 32980 -> 0 bytes website/assets/fonts/lato-regular.eot | Bin 35026 -> 0 bytes website/assets/fonts/lato-regular.svg | 2788 ---------------- website/assets/fonts/lato-regular.ttf | Bin 76396 -> 0 bytes website/assets/fonts/lato-regular.woff | Bin 38240 -> 0 bytes website/assets/fonts/lato-regular.woff2 | Bin 30348 -> 0 bytes website/assets/fonts/sourcesanspro-bold.eot | Bin 0 -> 89026 bytes website/assets/fonts/sourcesanspro-bold.svg | 1031 ++++++ website/assets/fonts/sourcesanspro-bold.ttf | Bin 0 -> 88820 bytes website/assets/fonts/sourcesanspro-bold.woff | Bin 0 -> 33612 bytes website/assets/fonts/sourcesanspro-bold.woff2 | Bin 0 -> 26800 bytes .../assets/fonts/sourcesanspro-bolditalic.eot | Bin 0 -> 55994 bytes .../assets/fonts/sourcesanspro-bolditalic.svg | 840 +++++ .../assets/fonts/sourcesanspro-bolditalic.ttf | Bin 0 -> 55764 bytes .../fonts/sourcesanspro-bolditalic.woff | Bin 0 -> 28960 bytes .../fonts/sourcesanspro-bolditalic.woff2 | Bin 0 -> 22492 bytes website/assets/fonts/sourcesanspro-italic.eot | Bin 0 -> 56574 bytes website/assets/fonts/sourcesanspro-italic.svg | 852 +++++ website/assets/fonts/sourcesanspro-italic.ttf | Bin 0 -> 56360 bytes .../assets/fonts/sourcesanspro-italic.woff | Bin 0 -> 28844 bytes .../assets/fonts/sourcesanspro-italic.woff2 | Bin 0 -> 22488 bytes .../assets/fonts/sourcesanspro-regular.eot | Bin 0 -> 90326 bytes .../assets/fonts/sourcesanspro-regular.svg | 1039 ++++++ .../assets/fonts/sourcesanspro-regular.ttf | Bin 0 -> 90112 bytes .../assets/fonts/sourcesanspro-regular.woff | Bin 0 -> 34096 bytes .../assets/fonts/sourcesanspro-regular.woff2 | Bin 0 -> 27292 bytes website/assets/fonts/worksans-bold.eot | Bin 28428 -> 0 bytes website/assets/fonts/worksans-bold.svg | 1909 ----------- website/assets/fonts/worksans-bold.ttf | Bin 66460 -> 0 bytes website/assets/fonts/worksans-bold.woff | Bin 31812 -> 0 bytes website/assets/fonts/worksans-bold.woff2 | Bin 25116 -> 0 bytes website/assets/fonts/worksans-regular.eot | Bin 26774 -> 0 bytes website/assets/fonts/worksans-regular.svg | 1586 ---------- website/assets/fonts/worksans-regular.ttf | Bin 62940 -> 0 bytes website/assets/fonts/worksans-regular.woff | Bin 30088 -> 0 bytes website/assets/fonts/worksans-regular.woff2 | Bin 23644 -> 0 bytes website/assets/fonts/worksans-semibold.eot | Bin 29022 -> 0 bytes website/assets/fonts/worksans-semibold.svg | 1909 ----------- website/assets/fonts/worksans-semibold.ttf | Bin 67040 -> 0 bytes website/assets/fonts/worksans-semibold.woff | Bin 32208 -> 0 bytes website/assets/fonts/worksans-semibold.woff2 | Bin 25464 -> 0 bytes website/assets/img/icons.svg | 29 + website/assets/img/logos/chattermill.png | Bin 0 -> 2695 bytes website/assets/img/logos/dato.png | Bin 0 -> 3275 bytes website/assets/img/logos/duedil.png | Bin 0 -> 2713 bytes website/assets/img/logos/foxtype.png | Bin 0 -> 3269 bytes website/assets/img/logos/spyjack.png | Bin 0 -> 644 bytes website/assets/img/logos/stitchfix.png | Bin 0 -> 1772 bytes website/assets/img/logos/synapsify.png | Bin 0 -> 2054 bytes website/assets/img/logos/wayblazer.png | Bin 0 -> 1386 bytes website/assets/img/logos/wonderflow.png | Bin 0 -> 1217 bytes .../img/{pattern_blue.jpg => pattern.jpg} | Bin website/assets/img/pattern_red.jpg | Bin 143953 -> 0 bytes website/assets/img/profile_elmar.png | Bin 1313 -> 0 bytes website/assets/img/profile_henning.png | Bin 91071 -> 0 bytes website/assets/img/profile_ines.png | Bin 91860 -> 0 bytes website/assets/img/profile_ines_alt.png | Bin 118606 -> 0 bytes website/assets/img/profile_matt.png | Bin 102151 -> 0 bytes website/assets/img/profile_matt_alt.png | Bin 99721 -> 0 bytes website/assets/img/profile_placeholder.png | Bin 1313 -> 0 bytes website/assets/img/profile_wolfgang.png | Bin 98714 -> 0 bytes website/assets/js/main.js | 117 +- website/blog/_data.json | 181 +- website/blog/announcement.jade | 12 + website/blog/dead-code-should-be-buried.jade | 30 - website/blog/displacy.jade | 28 - .../displacy/pizza-with-anchovies-bad.html | 14 - .../displacy/pizza-with-anchovies-good.html | 14 - .../displacy/robots-in-popular-culture.html | 14 - .../blog/eli5-computers-learn-reading.jade | 31 - website/blog/how-spacy-works.jade | 143 - website/blog/img/agpl-not-free.jpg | Bin 345274 -> 0 bytes website/blog/img/agpl-not-free_large.jpg | Bin 600488 -> 0 bytes website/blog/img/agpl-not-free_small.jpg | Bin 100526 -> 0 bytes website/blog/img/anchovies.png | Bin 151225 -> 0 bytes website/blog/img/basic-english.jpg | Bin 323077 -> 0 bytes website/blog/img/basic-english_large.jpg | Bin 583016 -> 0 bytes website/blog/img/basic-english_small.jpg | Bin 88650 -> 0 bytes website/blog/img/cython.jpg | Bin 328880 -> 0 bytes website/blog/img/cython_large.jpg | Bin 639656 -> 0 bytes website/blog/img/cython_small.jpg | Bin 84288 -> 0 bytes website/blog/img/deadcode.jpg | Bin 333040 -> 0 bytes website/blog/img/deadcode_large.jpg | Bin 645418 -> 0 bytes website/blog/img/deadcode_small.jpg | Bin 83174 -> 0 bytes website/blog/img/displacy.jpg | Bin 38432 -> 0 bytes website/blog/img/displacy_large.jpg | Bin 42721 -> 0 bytes website/blog/img/displacy_small.jpg | Bin 21451 -> 0 bytes website/blog/img/how-spacy-works.jpg | Bin 364963 -> 0 bytes website/blog/img/how-spacy-works_large.jpg | Bin 741151 -> 0 bytes website/blog/img/how-spacy-works_small.jpg | Bin 77669 -> 0 bytes website/blog/img/introducing-spacy.jpg | Bin 248667 -> 0 bytes website/blog/img/introducing-spacy_large.jpg | Bin 373223 -> 0 bytes website/blog/img/introducing-spacy_small.jpg | Bin 84481 -> 0 bytes website/blog/img/linguistic-structure.jpg | Bin 87627 -> 0 bytes website/blog/img/markup.jpg | Bin 488608 -> 0 bytes website/blog/img/markup_basscss.jpg | Bin 21348 -> 0 bytes website/blog/img/markup_bootstrap.jpg | Bin 33933 -> 0 bytes website/blog/img/markup_docs.jpg | Bin 73732 -> 0 bytes website/blog/img/markup_large.jpg | Bin 812645 -> 0 bytes website/blog/img/markup_mixins.jpg | Bin 101381 -> 0 bytes website/blog/img/markup_sections.jpg | Bin 40888 -> 0 bytes website/blog/img/markup_small.jpg | Bin 147823 -> 0 bytes website/blog/img/markup_workflow.jpg | Bin 90331 -> 0 bytes website/blog/img/pizza.jpg | Bin 354385 -> 0 bytes website/blog/img/pizza_large.jpg | Bin 660178 -> 0 bytes website/blog/img/pizza_small.jpg | Bin 98574 -> 0 bytes website/blog/img/pos-tagger.jpg | Bin 344945 -> 0 bytes website/blog/img/pos-tagger_large.jpg | Bin 613014 -> 0 bytes website/blog/img/pos-tagger_small.jpg | Bin 91301 -> 0 bytes website/blog/img/sense2vec.jpg | Bin 289956 -> 0 bytes website/blog/img/sense2vec_large.jpg | Bin 536346 -> 0 bytes website/blog/img/sense2vec_small.jpg | Bin 76683 -> 0 bytes website/blog/index.jade | 34 +- website/blog/introducing-spacy.jade | 18 - website/blog/modular-markup.jade | 147 - website/blog/parsing-english-in-python.jade | 575 ---- .../part-of-speech-pos-tagger-in-python.jade | 257 -- website/blog/sense2vec-with-spacy.jade | 166 - website/blog/spacy-now-mit.jade | 50 - website/blog/writing-c-in-cython.jade | 96 - website/demos/_data.json | 6 - website/demos/img/displacy.jpg | Bin 125511 -> 0 bytes website/demos/img/sense2vec.jpg | Bin 158352 -> 0 bytes website/demos/index.jade | 15 - website/docs/_annotation-specs.jade | 99 +- website/docs/_api-doc.jade | 214 +- website/docs/_api-english.jade | 195 +- website/docs/_api-lexeme.jade | 130 +- website/docs/_api-matcher.jade | 61 +- website/docs/_api-span.jade | 168 +- website/docs/_api-stringstore.jade | 94 +- website/docs/_api-token.jade | 174 +- website/docs/_api-vocab.jade | 83 +- website/docs/_data.json | 2 +- website/docs/_quickstart-examples.jade | 51 +- website/docs/_quickstart-install.jade | 216 +- website/docs/_tutorials.jade | 14 +- website/docs/index.jade | 22 +- website/docs/legacy/index.html | 933 ------ website/docs/legacy/resources/css/style.css | 1 - .../resources/fonts/inconsolata-bold.eot | Bin 23547 -> 0 bytes .../resources/fonts/inconsolata-bold.svg | 230 -- .../resources/fonts/inconsolata-bold.ttf | Bin 49932 -> 0 bytes .../resources/fonts/inconsolata-bold.woff | Bin 26296 -> 0 bytes .../resources/fonts/inconsolata-bold.woff2 | Bin 21452 -> 0 bytes .../resources/fonts/inconsolata-regular.eot | Bin 37211 -> 0 bytes .../resources/fonts/inconsolata-regular.svg | 229 -- .../resources/fonts/inconsolata-regular.ttf | Bin 65668 -> 0 bytes .../resources/fonts/inconsolata-regular.woff | Bin 41320 -> 0 bytes .../resources/fonts/inconsolata-regular.woff2 | Bin 33932 -> 0 bytes .../legacy/resources/fonts/karla-bold.eot | Bin 8768 -> 0 bytes .../legacy/resources/fonts/karla-bold.svg | 346 -- .../legacy/resources/fonts/karla-bold.ttf | Bin 17024 -> 0 bytes .../legacy/resources/fonts/karla-bold.woff | Bin 10804 -> 0 bytes .../legacy/resources/fonts/karla-bold.woff2 | Bin 8032 -> 0 bytes .../resources/fonts/karla-bolditalic.eot | Bin 9856 -> 0 bytes .../resources/fonts/karla-bolditalic.svg | 351 --- .../resources/fonts/karla-bolditalic.ttf | Bin 17692 -> 0 bytes .../resources/fonts/karla-bolditalic.woff | Bin 11852 -> 0 bytes .../resources/fonts/karla-bolditalic.woff2 | Bin 9008 -> 0 bytes .../legacy/resources/fonts/karla-italic.eot | Bin 8970 -> 0 bytes .../legacy/resources/fonts/karla-italic.svg | 351 --- .../legacy/resources/fonts/karla-italic.ttf | Bin 17544 -> 0 bytes .../legacy/resources/fonts/karla-italic.woff | Bin 11004 -> 0 bytes .../legacy/resources/fonts/karla-italic.woff2 | Bin 8188 -> 0 bytes .../legacy/resources/fonts/karla-regular.eot | Bin 8392 -> 0 bytes .../legacy/resources/fonts/karla-regular.svg | 351 --- .../legacy/resources/fonts/karla-regular.ttf | Bin 16248 -> 0 bytes .../legacy/resources/fonts/karla-regular.woff | Bin 10396 -> 0 bytes .../resources/fonts/karla-regular.woff2 | Bin 7624 -> 0 bytes website/docs/legacy/resources/img/logo.png | Bin 1505 -> 0 bytes website/docs/legacy/resources/img/logo.svg | 46 - website/docs/legacy/resources/js/prism.js | 1692 ---------- website/docs/legacy/resources/js/prism.min.js | 2 - website/docs/tutorials/_data.json | 7 + website/docs/tutorials/byo-annotations.jade | 117 + .../docs/tutorials/load-new-word-vectors.jade | 6 +- website/docs/tutorials/mark-adverbs.jade | 8 +- website/docs/tutorials/syntax-search.jade | 40 +- website/docs/tutorials/twitter-filter.jade | 68 +- website/feed.xml.jade | 30 - website/index.jade | 285 +- website/legal.jade | 77 - website/robots.txt.jade | 7 + website/styleguide.jade | 391 --- website/team.jade | 19 - 274 files changed, 6101 insertions(+), 27660 deletions(-) create mode 100644 website/.gitignore delete mode 100644 website/_fabfile.py delete mode 100644 website/_includes/_analytics.jade delete mode 100644 website/_includes/_article.jade delete mode 100644 website/_includes/_head.jade delete mode 100644 website/_includes/_header.jade delete mode 100644 website/_includes/_latest-posts.jade create mode 100644 website/_includes/_mixins/_base.jade create mode 100644 website/_includes/_mixins/_components.jade create mode 100644 website/_includes/_mixins/_headlines.jade delete mode 100644 website/_includes/_nav.jade create mode 100644 website/_includes/_navigation.jade delete mode 100644 website/_includes/_profile.jade create mode 100644 website/_includes/_scripts.jade delete mode 100644 website/_includes/_teaser.jade create mode 100644 website/assets/css/_base/_layout.sass create mode 100644 website/assets/css/_base/_objects.sass delete mode 100644 website/assets/css/_base/_typography.sass create mode 100644 website/assets/css/_base/_utilities.sass delete mode 100644 website/assets/css/_components/_alerts.sass delete mode 100644 website/assets/css/_components/_boxes.sass delete mode 100644 website/assets/css/_components/_cards.sass delete mode 100644 website/assets/css/_components/_dividers.sass delete mode 100644 website/assets/css/_components/_embeds.sass delete mode 100644 website/assets/css/_components/_forms.sass delete mode 100644 website/assets/css/_components/_icons.sass delete mode 100644 website/assets/css/_components/_images.sass delete mode 100644 website/assets/css/_components/_labels.sass delete mode 100644 website/assets/css/_components/_links.sass delete mode 100644 website/assets/css/_components/_logo.sass create mode 100644 website/assets/css/_components/_navigation.sass delete mode 100644 website/assets/css/_components/_quotes.sass create mode 100644 website/assets/css/_components/_sidebar.sass delete mode 100644 website/assets/css/_components/_tooltips.sass delete mode 100644 website/assets/css/_layout/_article.sass delete mode 100644 website/assets/css/_layout/_body.sass delete mode 100644 website/assets/css/_layout/_footer.sass delete mode 100644 website/assets/css/_layout/_header.sass delete mode 100644 website/assets/css/_layout/_nav.sass delete mode 100644 website/assets/css/_layout/_sidebar.sass rename website/assets/css/{_utils => }/_mixins.sass (61%) delete mode 100644 website/assets/css/_utils/_functions.sass create mode 100644 website/assets/css/_variables.sass delete mode 100644 website/assets/css/_variables.scss delete mode 100644 website/assets/css/_vendors/_displacy.sass delete mode 100644 website/assets/css/_vendors/_normalize.sass delete mode 100644 website/assets/css/_vendors/_prism.sass delete mode 100644 website/assets/css/style_blog.sass delete mode 100644 website/assets/fonts/icomoon.eot delete mode 100644 website/assets/fonts/icomoon.svg delete mode 100644 website/assets/fonts/icomoon.ttf delete mode 100644 website/assets/fonts/icomoon.woff delete mode 100755 website/assets/fonts/lato-bold.eot delete mode 100755 website/assets/fonts/lato-bold.svg delete mode 100755 website/assets/fonts/lato-bold.ttf delete mode 100755 website/assets/fonts/lato-bold.woff delete mode 100755 website/assets/fonts/lato-bold.woff2 delete mode 100755 website/assets/fonts/lato-bolditalic.eot delete mode 100755 website/assets/fonts/lato-bolditalic.svg delete mode 100755 website/assets/fonts/lato-bolditalic.ttf delete mode 100755 website/assets/fonts/lato-bolditalic.woff delete mode 100755 website/assets/fonts/lato-bolditalic.woff2 delete mode 100755 website/assets/fonts/lato-italic.eot delete mode 100755 website/assets/fonts/lato-italic.svg delete mode 100755 website/assets/fonts/lato-italic.ttf delete mode 100755 website/assets/fonts/lato-italic.woff delete mode 100755 website/assets/fonts/lato-italic.woff2 delete mode 100755 website/assets/fonts/lato-regular.eot delete mode 100755 website/assets/fonts/lato-regular.svg delete mode 100755 website/assets/fonts/lato-regular.ttf delete mode 100755 website/assets/fonts/lato-regular.woff delete mode 100755 website/assets/fonts/lato-regular.woff2 create mode 100644 website/assets/fonts/sourcesanspro-bold.eot create mode 100644 website/assets/fonts/sourcesanspro-bold.svg create mode 100644 website/assets/fonts/sourcesanspro-bold.ttf create mode 100644 website/assets/fonts/sourcesanspro-bold.woff create mode 100644 website/assets/fonts/sourcesanspro-bold.woff2 create mode 100644 website/assets/fonts/sourcesanspro-bolditalic.eot create mode 100644 website/assets/fonts/sourcesanspro-bolditalic.svg create mode 100644 website/assets/fonts/sourcesanspro-bolditalic.ttf create mode 100644 website/assets/fonts/sourcesanspro-bolditalic.woff create mode 100644 website/assets/fonts/sourcesanspro-bolditalic.woff2 create mode 100644 website/assets/fonts/sourcesanspro-italic.eot create mode 100644 website/assets/fonts/sourcesanspro-italic.svg create mode 100644 website/assets/fonts/sourcesanspro-italic.ttf create mode 100644 website/assets/fonts/sourcesanspro-italic.woff create mode 100644 website/assets/fonts/sourcesanspro-italic.woff2 create mode 100644 website/assets/fonts/sourcesanspro-regular.eot create mode 100644 website/assets/fonts/sourcesanspro-regular.svg create mode 100644 website/assets/fonts/sourcesanspro-regular.ttf create mode 100644 website/assets/fonts/sourcesanspro-regular.woff create mode 100644 website/assets/fonts/sourcesanspro-regular.woff2 delete mode 100755 website/assets/fonts/worksans-bold.eot delete mode 100755 website/assets/fonts/worksans-bold.svg delete mode 100755 website/assets/fonts/worksans-bold.ttf delete mode 100755 website/assets/fonts/worksans-bold.woff delete mode 100755 website/assets/fonts/worksans-bold.woff2 delete mode 100755 website/assets/fonts/worksans-regular.eot delete mode 100755 website/assets/fonts/worksans-regular.svg delete mode 100755 website/assets/fonts/worksans-regular.ttf delete mode 100755 website/assets/fonts/worksans-regular.woff delete mode 100755 website/assets/fonts/worksans-regular.woff2 delete mode 100755 website/assets/fonts/worksans-semibold.eot delete mode 100755 website/assets/fonts/worksans-semibold.svg delete mode 100755 website/assets/fonts/worksans-semibold.ttf delete mode 100755 website/assets/fonts/worksans-semibold.woff delete mode 100755 website/assets/fonts/worksans-semibold.woff2 create mode 100644 website/assets/img/icons.svg create mode 100644 website/assets/img/logos/chattermill.png create mode 100644 website/assets/img/logos/dato.png create mode 100644 website/assets/img/logos/duedil.png create mode 100644 website/assets/img/logos/foxtype.png create mode 100644 website/assets/img/logos/spyjack.png create mode 100644 website/assets/img/logos/stitchfix.png create mode 100644 website/assets/img/logos/synapsify.png create mode 100644 website/assets/img/logos/wayblazer.png create mode 100644 website/assets/img/logos/wonderflow.png rename website/assets/img/{pattern_blue.jpg => pattern.jpg} (100%) delete mode 100644 website/assets/img/pattern_red.jpg delete mode 100644 website/assets/img/profile_elmar.png delete mode 100644 website/assets/img/profile_henning.png delete mode 100644 website/assets/img/profile_ines.png delete mode 100644 website/assets/img/profile_ines_alt.png delete mode 100644 website/assets/img/profile_matt.png delete mode 100644 website/assets/img/profile_matt_alt.png delete mode 100644 website/assets/img/profile_placeholder.png delete mode 100644 website/assets/img/profile_wolfgang.png create mode 100644 website/blog/announcement.jade delete mode 100644 website/blog/dead-code-should-be-buried.jade delete mode 100644 website/blog/displacy.jade delete mode 100644 website/blog/displacy/pizza-with-anchovies-bad.html delete mode 100644 website/blog/displacy/pizza-with-anchovies-good.html delete mode 100644 website/blog/displacy/robots-in-popular-culture.html delete mode 100644 website/blog/eli5-computers-learn-reading.jade delete mode 100644 website/blog/how-spacy-works.jade delete mode 100644 website/blog/img/agpl-not-free.jpg delete mode 100644 website/blog/img/agpl-not-free_large.jpg delete mode 100644 website/blog/img/agpl-not-free_small.jpg delete mode 100644 website/blog/img/anchovies.png delete mode 100644 website/blog/img/basic-english.jpg delete mode 100644 website/blog/img/basic-english_large.jpg delete mode 100644 website/blog/img/basic-english_small.jpg delete mode 100644 website/blog/img/cython.jpg delete mode 100644 website/blog/img/cython_large.jpg delete mode 100644 website/blog/img/cython_small.jpg delete mode 100644 website/blog/img/deadcode.jpg delete mode 100644 website/blog/img/deadcode_large.jpg delete mode 100644 website/blog/img/deadcode_small.jpg delete mode 100644 website/blog/img/displacy.jpg delete mode 100644 website/blog/img/displacy_large.jpg delete mode 100644 website/blog/img/displacy_small.jpg delete mode 100644 website/blog/img/how-spacy-works.jpg delete mode 100644 website/blog/img/how-spacy-works_large.jpg delete mode 100644 website/blog/img/how-spacy-works_small.jpg delete mode 100644 website/blog/img/introducing-spacy.jpg delete mode 100644 website/blog/img/introducing-spacy_large.jpg delete mode 100644 website/blog/img/introducing-spacy_small.jpg delete mode 100644 website/blog/img/linguistic-structure.jpg delete mode 100644 website/blog/img/markup.jpg delete mode 100644 website/blog/img/markup_basscss.jpg delete mode 100644 website/blog/img/markup_bootstrap.jpg delete mode 100644 website/blog/img/markup_docs.jpg delete mode 100644 website/blog/img/markup_large.jpg delete mode 100644 website/blog/img/markup_mixins.jpg delete mode 100644 website/blog/img/markup_sections.jpg delete mode 100644 website/blog/img/markup_small.jpg delete mode 100644 website/blog/img/markup_workflow.jpg delete mode 100644 website/blog/img/pizza.jpg delete mode 100644 website/blog/img/pizza_large.jpg delete mode 100644 website/blog/img/pizza_small.jpg delete mode 100644 website/blog/img/pos-tagger.jpg delete mode 100644 website/blog/img/pos-tagger_large.jpg delete mode 100644 website/blog/img/pos-tagger_small.jpg delete mode 100644 website/blog/img/sense2vec.jpg delete mode 100644 website/blog/img/sense2vec_large.jpg delete mode 100644 website/blog/img/sense2vec_small.jpg delete mode 100644 website/blog/introducing-spacy.jade delete mode 100644 website/blog/modular-markup.jade delete mode 100644 website/blog/parsing-english-in-python.jade delete mode 100644 website/blog/part-of-speech-pos-tagger-in-python.jade delete mode 100644 website/blog/sense2vec-with-spacy.jade delete mode 100644 website/blog/spacy-now-mit.jade delete mode 100644 website/blog/writing-c-in-cython.jade delete mode 100644 website/demos/_data.json delete mode 100644 website/demos/img/displacy.jpg delete mode 100644 website/demos/img/sense2vec.jpg delete mode 100644 website/demos/index.jade delete mode 100644 website/docs/legacy/index.html delete mode 100755 website/docs/legacy/resources/css/style.css delete mode 100644 website/docs/legacy/resources/fonts/inconsolata-bold.eot delete mode 100644 website/docs/legacy/resources/fonts/inconsolata-bold.svg delete mode 100644 website/docs/legacy/resources/fonts/inconsolata-bold.ttf delete mode 100644 website/docs/legacy/resources/fonts/inconsolata-bold.woff delete mode 100644 website/docs/legacy/resources/fonts/inconsolata-bold.woff2 delete mode 100644 website/docs/legacy/resources/fonts/inconsolata-regular.eot delete mode 100644 website/docs/legacy/resources/fonts/inconsolata-regular.svg delete mode 100644 website/docs/legacy/resources/fonts/inconsolata-regular.ttf delete mode 100644 website/docs/legacy/resources/fonts/inconsolata-regular.woff delete mode 100644 website/docs/legacy/resources/fonts/inconsolata-regular.woff2 delete mode 100644 website/docs/legacy/resources/fonts/karla-bold.eot delete mode 100644 website/docs/legacy/resources/fonts/karla-bold.svg delete mode 100644 website/docs/legacy/resources/fonts/karla-bold.ttf delete mode 100644 website/docs/legacy/resources/fonts/karla-bold.woff delete mode 100644 website/docs/legacy/resources/fonts/karla-bold.woff2 delete mode 100644 website/docs/legacy/resources/fonts/karla-bolditalic.eot delete mode 100644 website/docs/legacy/resources/fonts/karla-bolditalic.svg delete mode 100644 website/docs/legacy/resources/fonts/karla-bolditalic.ttf delete mode 100644 website/docs/legacy/resources/fonts/karla-bolditalic.woff delete mode 100644 website/docs/legacy/resources/fonts/karla-bolditalic.woff2 delete mode 100644 website/docs/legacy/resources/fonts/karla-italic.eot delete mode 100644 website/docs/legacy/resources/fonts/karla-italic.svg delete mode 100644 website/docs/legacy/resources/fonts/karla-italic.ttf delete mode 100644 website/docs/legacy/resources/fonts/karla-italic.woff delete mode 100644 website/docs/legacy/resources/fonts/karla-italic.woff2 delete mode 100644 website/docs/legacy/resources/fonts/karla-regular.eot delete mode 100644 website/docs/legacy/resources/fonts/karla-regular.svg delete mode 100644 website/docs/legacy/resources/fonts/karla-regular.ttf delete mode 100644 website/docs/legacy/resources/fonts/karla-regular.woff delete mode 100644 website/docs/legacy/resources/fonts/karla-regular.woff2 delete mode 100644 website/docs/legacy/resources/img/logo.png delete mode 100644 website/docs/legacy/resources/img/logo.svg delete mode 100644 website/docs/legacy/resources/js/prism.js delete mode 100644 website/docs/legacy/resources/js/prism.min.js create mode 100644 website/docs/tutorials/byo-annotations.jade delete mode 100644 website/feed.xml.jade delete mode 100644 website/legal.jade create mode 100644 website/robots.txt.jade delete mode 100644 website/styleguide.jade delete mode 100644 website/team.jade diff --git a/website/.gitignore b/website/.gitignore new file mode 100644 index 000000000..a04df6008 --- /dev/null +++ b/website/.gitignore @@ -0,0 +1,2 @@ +www +*.swp diff --git a/website/404.jade b/website/404.jade index 9ea96e237..e243a9ba6 100644 --- a/website/404.jade +++ b/website/404.jade @@ -1,10 +1,7 @@ +//- ---------------------------------- +//- 💫 404 ERROR +//- ---------------------------------- + include _includes/_mixins -//- 404 Error -//- ============================================================================ - -+lead.text-center Ooops, this page does not exist. Click #[a(href='javascript:history.go(-1)') here] to go back or check out one of the latest posts below. - -+divider('bottom') - -!=partial('_includes/_latest-posts', { max: 3 } ) +p.u-text-large.u-text-center Ooops, this page does not exist. Click #[a(href="javascript:history.go(-1)") here] to go back. diff --git a/website/README.md b/website/README.md index 12becb008..389721da0 100644 --- a/website/README.md +++ b/website/README.md @@ -1,22 +1,18 @@ + + # Source files for the spacy.io website and docs -The [spacy.io](https://spacy.io) website is implemented in [Jade (aka Pug)](https://www.jade-lang.org), and is built or served by [Harp](https://harpjs.com). +The [spacy.io](https://spacy.io) website is implemented in [Jade (aka Pug)](https://www.jade-lang.org), and is built or served by [Harp](https://harpjs.com). Jade is an extensible templating language with a readable syntax, that compiles to HTML. +The website source makes extensive use of Jade mixins, so that the design system is abstracted away from the content you're +writing. You can read more about our approach in our blog post, ["Rebuilding a Website with Modular Markup"](https://explosion.ai/blog/modular-markup). + ## Building the site -To build the site and start making changes: +```bash +sudo npm install --global harp +git clone https://github.com/explosion/spacy.io +harp server +``` - sudo npm install --global harp - git clone https://github.com/spacy-io/website - cd website - harp server - -This will serve the site on [http://localhost:9000](http://localhost:9000). You can then edit the jade source and refresh the page to see your changes. - -## Reading the source - -Jade is an extensible templating language with a readable syntax, that compiles to HTML. -The website source makes extensive use of Jade mixins, so that the design system is abstracted away from the content you're -writing. You can read more about our approach in our blog post, ["Rebuilding a Website with Modular Markup Components"](https://spacy.io/blog/modular-markup). - -If you want to write or edit the pages, the site's [styleguide](http://spacy.io/styleguide) serves as a useful reference of the available mixins. +This will serve the site on [http://localhost:9000](http://localhost:9000). diff --git a/website/_data.json b/website/_data.json index 5a7c17ff7..17b29dd20 100644 --- a/website/_data.json +++ b/website/_data.json @@ -1,10 +1,29 @@ { "index": { - "landing": true - }, - - "feed": { - "layout": false + "landing": true, + "logos": [ + [ + ["chartbeat", "https://chartbeat.com"], + ["socrata", "https://www.socrata.com"], + ["chattermill", "https://chattermill.io"], + ["cytora", "http://www.cytora.com"], + ["signaln", "http://signaln.com"], + ["duedil", "https://www.duedil.com/"], + ["spyjack", "https://spyjack.io"] + ], + [ + ["keyreply", "https://keyreply.com/"], + ["dato", "https://dato.com"], + ["kip", "http://kipthis.com"], + ["wonderflow", "http://www.wonderflow.co"], + ["foxtype", "https://foxtype.com"] + ], + [ + ["synapsify", "http://www.gosynapsify.com"], + ["stitchfix", "https://www.stitchfix.com/"], + ["wayblazer", "http://wayblazer.com"] + ] + ] }, "robots": { @@ -16,19 +35,8 @@ "asides": false }, - "team": { - "title": "Team" - }, - - "legal": { - "title": "Legal & Imprint", - "sidebar": true, - "asides": true - }, - "styleguide": { "title" : "Styleguide", - "standalone" : true, "asides": true, "sidebar": { diff --git a/website/_fabfile.py b/website/_fabfile.py deleted file mode 100644 index d31ea67eb..000000000 --- a/website/_fabfile.py +++ /dev/null @@ -1,94 +0,0 @@ -from __future__ import print_function - -from fabric.api import local -import os -import hashlib -import mimetypes -import shutil - -import boto.s3.connection - - -mimetypes.init() - -buckets = { - 'staging': 'staging.spacy.io', - 'production': 'spacy.io', -} - - -def compile(): - shutil.rmtree('www') - local('NODE_ENV=s3 harp compile') - - -def publish(env='staging', site_path='www'): - os.environ['S3_USE_SIGV4'] = 'True' - conn = boto.s3.connection.S3Connection(host='s3.eu-central-1.amazonaws.com', - calling_format=boto.s3.connection.OrdinaryCallingFormat()) - bucket = conn.get_bucket(buckets[env], validate=False) - - keys = {k.name: k for k in bucket.list()} - keys_left = set(keys) - - for root, dirnames, filenames in os.walk(site_path): - for dirname in dirnames: - target = os.path.relpath(os.path.join(root, dirname), site_path) - source = os.path.join(target, 'index.html') - - if os.path.exists(os.path.join(root, dirname, 'index.html')): - redirect = '//%s/%s' % (bucket.name, target) - key = bucket.lookup(source) - if not key: - key = bucket.new_key(source) - key.set_redirect(redirect) - print('setting redirect for %s' % target) - elif key.get_redirect() != redirect: - key.set_redirect(redirect) - print('setting redirect for %s' % target) - - if source in keys_left: - keys_left.remove(source) - - for filename in filenames: - source = os.path.join(root, filename) - - if filename == 'index.html': - target = os.path.normpath(os.path.relpath(root, site_path)) - if target == '.': - target = filename - else: - target = os.path.normpath(os.path.join(os.path.relpath(root, site_path), filename)) - if target.endswith('.html'): - target = target[:-len('.html')] - - content_type = mimetypes.guess_type(source)[0] - cache_control = 'no-transform,public,max-age=300,s-maxage=300' - checksum = hashlib.md5(open(source).read()).hexdigest() - - if (target not in keys - or keys[target].etag.replace('"', '') != checksum): - - key = bucket.new_key(target) - if content_type: - key.content_type = content_type - key.set_contents_from_filename(source, - headers={'Cache-Control': cache_control}) - print('uploading %s' % target) - - elif content_type: - key = bucket.lookup(target) - if (key - and (key.content_type != content_type - or key.cache_control != cache_control)): - key.copy(key.bucket, key.name, preserve_acl=True, - metadata={'Content-Type': content_type, - 'Cache-Control': cache_control}) - print('update headers %s' % target) - - if target in keys_left: - keys_left.remove(target) - - for key_name in keys_left: - print('deleting %s' % key_name) - bucket.delete_key(key_name) diff --git a/website/_harp.json b/website/_harp.json index 6510f73cf..1ceb54023 100644 --- a/website/_harp.json +++ b/website/_harp.json @@ -1,85 +1,29 @@ { "globals": { "title": "spaCy.io", - "sitename": "spaCy", - "slogan": "Industrial-strength Natural Language Processing", "description": "spaCy is a free open-source library featuring state-of-the-art speed and accuracy and a powerful Python API.", - "url": "https://spacy.io", - "email": "contact@spacy.io", - "company": "spaCy GmbH", - "team_members": [ "henning", "matt", "wolfgang", "elmar", "ines" ], - "navigation": { "Docs": "docs", "Demos": "demos", "Team": "team", "Blog": "blog" }, - "profiles": { "twitter": "spacy_io", "github": "spacy-io", "reddit": "spacynlp", "medium": "spacy" }, - "google_analytics": "UA-58931649-1", + "SITENAME": "spaCy", + "SLOGAN": "Industrial-strength Natural Language Processing", + "SITE_URL": "https://spacy.io", + "EMAIL": "contact@explosion.ai", - "stylesheets": { "default": "style", "blog": "style_blog" }, - "scripts" : [ "main", "prism" ], - "feed": "feed.xml", - "image_sizes" : { "small" : "640", "medium": "1440", "large": "2000" }, - "default_syntax" : "python", + "COMPANY": "Explosion AI", + "COMPANY_URL": "https://explosion.ai", + "DEMOS_URL": "https://demos.explosion.ai", - "spacy_version": "0.100.6", - "spacy_stars": "1500", - "github_settings": { "user": "spacy-io", "repo": "spacy" }, - - "apis": { - "displacy": "https://displacy.spacy.io/", - "sense2vec": "https://sense2vec.spacy.io/api/similarity/reddit/" + "SOCIAL": { + "twitter": "spacy_io", + "github": "explosion", + "reddit": "spacynlp" }, - "authors" : { - "matt" : { - "name" : "Matthew Honnibal", - "title": "CTO", - "description" : "is co-founder and CTO of spaCy. He studied linguistics as an undergrad, and never thought he'd be a programmer. By 2009 he had a PhD in computer science, and in 2014 he left academia to write spaCy. He's from Sydney and lives in Berlin.", - "links": { - "twitter": [ "https://twitter.com/honnibal", "Twitter" ], - "website": [ "https://www.semanticscholar.org/search?q=Matthew%20Honnibal", "Semantic Scholar" ] - } - }, + "SCRIPTS" : [ "main", "prism" ], + "DEFAULT_SYNTAX" : "python", + "ANALYTICS": "UA-58931649-1", - "henning": { - "name": "Henning Peters", - "title": "CEO", - "description": "is co-founder and CEO of spaCy. He holds a MSc in computer science and has been co-founder and CTO of Skoobe and Absolventa. His passions are uncommon languages and backcountry skiing.", - "links": { - "twitter": [ "https://twitter.com/henningpeters", "Twitter"], - "linkedin": [ "https://de.linkedin.com/in/hepeters", "LinkedIn"], - "github": [ "https://github.com/henningpeters", "GitHub"] - } - }, - - "ines": { - "name": "Ines Montani", - "title": "Front-End", - "description": "As Head of Front-End, Ines is in charge of showing people what spaCy can do. She develops, designs and implements our interactive demos and the spacy.io website. Ines has a degree in media, linguistics and communications, and over ten years experience in web development.", - "links": { - "twitter": [ "https://twitter.com/_inesmontani", "Twitter" ], - "codepen": [ "https://codepen.io/inesmontani", "Codepen"], - "github": [ "https://github.com/inesmontani", "GitHub"], - "website": [ "http://ines.io", "Blog" ] - } - }, - - "wolfgang": { - "name": "Wolfgang Seeker", - "title": "NLP Engineer", - "description": "is a computational linguist from Germany. He is fascinated with the complexity and variety of human language, and spent his PhD looking for ways to make NLP work well with any kind of language in the world. He joined spaCy to build effective and truly multilingual NLP software.", - "links": { - "website": [ "https://www.semanticscholar.org/search?q=Wolfgang%20Seeker", "Semantic Scholar" ] - } - }, - - "elmar": { - "name": "Elmar Haußmann", - "title": "NLP Engineer", - "description": "is an NLP engineer at spaCy, passionate about deep learning. He has a background in both, academic research, with a PhD in computer science, and industry, as a former consultant and software engineer at IBM. Originally from Stuttgart, the avid snowboarder and mountain biker doesn't only ride powder and trails but also covers distances via plane between the spaCy office in Berlin and his new home in Beijing.", - "links": { - "github": [ "https://github.com/elmar-haussmann", "GitHub"], - "twitter": [ "https://twitter.com/elhaussmann", "Twitter" ] - } - } - } + "SPACY_VERSION": "0.101.0", + "SPACY_STARS": "2300", + "GITHUB": { "user": "explosion", "repo": "spacy" } } } diff --git a/website/_includes/_analytics.jade b/website/_includes/_analytics.jade deleted file mode 100644 index ab322b800..000000000 --- a/website/_includes/_analytics.jade +++ /dev/null @@ -1,7 +0,0 @@ -if environment != 'development' - script. - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) - })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); - ga('create', '#{google_analytics}', 'auto'); ga('send', 'pageview'); diff --git a/website/_includes/_article.jade b/website/_includes/_article.jade deleted file mode 100644 index e39bd3649..000000000 --- a/website/_includes/_article.jade +++ /dev/null @@ -1,34 +0,0 @@ -include ../_includes/_mixins - -//- Article -//- ============================================================================ - -article.article(id=current.source) - - header.article-header - +h2.article-title=title - .article-meta - if author - | by #[a.link(href=(authors[author].url || url) target='_blank')=authors[author].name] on - | #[+date(date)] - - .article-body!=yield - - footer.article-footer - - +grid('padding', 'align-right', 'valign-center') - +tweet(title) - - if links - for link, index in links - div: +button('primary', 'small', index.toLowerCase())(href=link target='_blank') - +icon(index.toLowerCase(), 'medium', 'secondary') - | Discussion on #{index} - - if author - +divider - - !=partial('_profile', { label: 'About the Author', style: 'alt' }) - -!=partial('_newsletter', { divider: 'both' }) -!=partial('_latest-posts', { max: 2, _section: _section } ) diff --git a/website/_includes/_footer.jade b/website/_includes/_footer.jade index 017cdfa86..bd7688bfb 100644 --- a/website/_includes/_footer.jade +++ b/website/_includes/_footer.jade @@ -1,14 +1,17 @@ +//- ---------------------------------- +//- 💫 INCLUDES > FOOTER +//- ---------------------------------- + include _mixins -//- Footer -//- ============================================================================ +footer.o-footer.o-inline-list.u-pattern.u-text-center.u-text-label.u-text-strong + span © #{new Date().getFullYear()} #[+a(COMPANY_URL, true)=COMPANY] -footer.footer - span © #{new Date().getFullYear()} #{company} - a(href='/legal') Legal / Imprint + +a(COMPANY_URL + "/legal", true) Legal / Imprint + a(href="mailto:#{EMAIL}") #[+icon("mail", 16)] - a(href='https://twitter.com/' + profiles.twitter target='_blank' aria-label="Twitter") - +icon('twitter', 'secondary') + +a("https://twitter.com/" + SOCIAL.twitter)(aria-label="Twitter") + +icon("twitter", 20) - a(href='/feed.xml' target='_blank' aria-label="RSS Feed") - +icon('feed', 'secondary') + +a("https://github.com/" + SOCIAL.github + "/spaCy")(aria-label="GitHub") + +icon("github", 20) diff --git a/website/_includes/_functions.jade b/website/_includes/_functions.jade index b58eea883..a191b330d 100644 --- a/website/_includes/_functions.jade +++ b/website/_includes/_functions.jade @@ -1,101 +1,11 @@ -//- Functions -//- ============================================================================ +//- ---------------------------------- +//- 💫 INCLUDES > FUNCTIONS +//- ---------------------------------- -//- Full page title - -- function getPageTitle() { -- if(current.path[0] == 'blog' && current.source != 'index') title += ' | Blog'; -- return (current.path[0] == 'index') ? sitename + ' | ' + slogan : title + ' | ' + sitename; -- } - - -//- Get current URL - current - [string] current path - -- function getCurrentUrl() { -- var base = current.path; -- if(current.source == 'index') base.pop(); -- return url + '/' + base.join('/'); -- } - - -//- Assign flexbox order, elements are assigned negative values to always move - them to the start of a flexbox in the correct order (i.e. -3, -2, -1) - counter - [integer] index of current item - max - [integer] amount of items in total - start - [integer] index of start position, i.e. 0 -> oder: -1 (optional) - -- function assignOrder(counter, max, start) { -- if(counter >= 0 && counter < max) return "order: -" + (max - counter + (start || 0)); -- } - - -//- Create Twitter share URL - current - [string] current path - tweet - [string] text to be shared with link - -- function twitterShareUrl(current, tweet) { -- return "https://twitter.com/share?text=" + tweet + "&url=" + getCurrentUrl(current) + ";via=" + profiles.twitter; -- } - - -//- Add prefix to each item in an array (used for modifier CSS classes) - array - [array] array of strings, taken from mixin arguments - prefix - [string] class prefix (i.e. 'button--') +//- Add prefixes to items of an array (for modifier CSS classes) - function prefixArgs(array, prefix) { -- for(var i = 0; i < array.length; i++) { -- array[i] = prefix + array[i]; -- } -- return array.join(' '); -- } - - -//- Convert date to human readable and timestamp format - input - [string] date in the format YYYY-MM-DD - -- function convertDate(input) { -- var dates = []; -- var months = [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ]; -- var date = new Date(input); -- dates.full = months[date.getMonth()] + ' ' + date.getDate() + ', ' + date.getFullYear(); -- dates.timestamp = JSON.parse(JSON.stringify(date)); -- return dates; -- } - - -//- Convert date to valid RSS pubDate - input - [string] date in the format YYYY-MM-DD - -- function convertPubDate(input) { -- var date = new Date(input); -- var pieces = date.toString().split(' '); -- var offsetTime = pieces[5].match(/[-+]\d{4}/); -- var offset = (offsetTime) ? offsetTime : pieces[5]; -- var parts = [ pieces[0] + ',', pieces[2], pieces[1], pieces[3], pieces[4], offset ]; -- return parts.join(' '); -- } - - -//- Compile scrset attribute for hero images - image - [object] article image object from _data.json - path - [string] relative path to image folder - -- function getScrset(image, path) { -- var scrset = path + image.file + ' ' + image_sizes.medium + 'w'; -- if(image.file_small) scrset += ', ' + path + image.file_small + ' ' + image_sizes.small + 'w'; -- if(image.file_large) scrset += ', ' + path + image.file_large + ' ' + image_sizes.large + 'w'; -- return scrset; -- } - - -//- Get meta image - -- function getMetaImage() { -- if(current.path[0] == 'blog' && image && image.file) { -- return url + '/blog/img/' + image.file; -- } -- else { -- return url + '/assets/img/social.png'; -- } +- return array.map(function(arg) { +- return prefix + '--' + arg; +- }).join(' '); - } diff --git a/website/_includes/_head.jade b/website/_includes/_head.jade deleted file mode 100644 index 96c4d0154..000000000 --- a/website/_includes/_head.jade +++ /dev/null @@ -1,31 +0,0 @@ -include _mixins - -- var is_blog = (_section == 'blog') - - -//- Head -//- ============================================================================ - -head - title=getPageTitle() - - meta(charset='utf-8') - meta(name="viewport" content="width=device-width, initial-scale=1.0") - meta(name='referrer' content='always') - - meta(property='og:type' content='website') - meta(property='og:site_name' content=sitename) - meta(property='og:url' content=getCurrentUrl()) - meta(property='og:title' content=title) - meta(property='og:description' content=description) - meta(property='og:image' content=getMetaImage()) - - meta(name='twitter:card' content='summary_large_image') - meta(name='twitter:site' content='@' + profiles.twitter) - meta(name='twitter:title' content=title) - meta(name='twitter:description' content=description) - meta(name='twitter:image' content=getMetaImage()) - - link(rel='icon' type='image/x-icon' href='/assets/img/favicon.ico') - link(href='/assets/css/' + ((is_blog) ? stylesheets.blog : stylesheets.default) + '.css' rel='stylesheet') - link(href='/' + feed rel='alternate' type='application/rss+xml' title='RSS') diff --git a/website/_includes/_header.jade b/website/_includes/_header.jade deleted file mode 100644 index 345073c71..000000000 --- a/website/_includes/_header.jade +++ /dev/null @@ -1,21 +0,0 @@ -include _mixins - -//- Header -//- ============================================================================ - -header.header(class=(image) ? 'hero' : '') - - if image - img(srcset=getScrset(image, 'img/') alt=image.alt sizes='100vw') - - if image.credit - .hero-credit - if image.url - a(href=image.url target='_blank')=image.credit - - else - !=image.credit - - else - if !is_article && headline != false - h1.header-title=title diff --git a/website/_includes/_latest-posts.jade b/website/_includes/_latest-posts.jade deleted file mode 100644 index f4289866b..000000000 --- a/website/_includes/_latest-posts.jade +++ /dev/null @@ -1,17 +0,0 @@ -include _mixins - -- var post_counter = 0 -- var is_docs = (_section == 'docs') - - -//- Latest Posts -//- ============================================================================ - -+grid('padding') - each post, slug in ( (_section == 'docs' ) ? public.docs.tutorials._data : public.blog._data) - if slug != 'index' && slug != current.source && post_counter < (max || 3) - - +grid-col('space-between', ((max > 2 && max % 3 == 0) ? 'third' : 'half')) - !=partial('_teaser', { teaser: post, slug: slug, _root: (is_docs) ? '/docs/tutorials/' : '/blog/' }) - - - post_counter++ diff --git a/website/_includes/_logo.jade b/website/_includes/_logo.jade index b5d2698af..a315e681b 100644 --- a/website/_includes/_logo.jade +++ b/website/_includes/_logo.jade @@ -1,5 +1,6 @@ -//- Logo -//- ============================================================================ +//- ---------------------------------- +//- 💫 INCLUDES > LOGO +//- ---------------------------------- -svg.logo(class=(logo_size) ? 'logo--' + logo_size : '' viewBox='0 0 675 215' width='500') - path(d='M83.6 83.3C68.3 81.5 67.2 61 47.5 62.8c-9.5 0-18.4 4-18.4 12.7 0 13.2 20.3 14.4 32.5 17.7 20.9 6.3 41 10.7 41 33.3 0 28.8-22.6 38.8-52.4 38.8-24.9 0-50.2-8.9-50.2-31.8 0-6.4 6.1-11.3 12-11.3 7.5 0 10.1 3.2 12.7 8.4 5.8 10.2 12.3 15.6 28.3 15.6 10.2 0 20.6-3.9 20.6-12.7 0-12.6-12.8-15.3-26.1-18.4-23.5-6.6-43.6-10-46-36.1C-1 34.5 91.7 32.9 97 71.9c.1 7.1-6.5 11.4-13.4 11.4zm110.2-39c32.5 0 51 27.2 51 60.8 0 33.7-17.9 60.8-51 60.8-18.4 0-29.8-7.8-38.1-19.8v44.5c0 13.4-4.3 19.8-14.1 19.8-11.9 0-14.1-7.6-14.1-19.8V61.3c0-10.6 4.4-17 14.1-17 9.1 0 14.1 7.2 14.1 17v3.6c9.2-11.6 19.7-20.6 38.1-20.6zm-7.7 98.4c19.1 0 27.6-17.6 27.6-38.1 0-20.1-8.6-38.1-27.6-38.1-19.8 0-29 16.3-29 38.1 0 21.2 9.2 38.1 29 38.1zM266.9 76c0-23.4 26.9-31.7 52.9-31.7 36.6 0 51.7 10.7 51.7 46v34c0 8.1 5 24.1 5 29 0 7.4-6.8 12-14.1 12-8.1 0-14.1-9.5-18.4-16.3-11.9 9.5-24.5 16.3-43.8 16.3-21.3 0-38.1-12.6-38.1-33.3 0-18.4 13.2-28.9 29-32.5 0 .1 51-12 51-12.1 0-15.7-5.5-22.6-22-22.6-14.5 0-21.9 4-27.5 12.7-4.5 6.6-4 10.6-12.7 10.6-6.9-.1-13-4.9-13-12.1zm43.6 70.2c22.3 0 31.8-11.8 31.8-35.3v-5c-6 2-30.3 8-36.8 9.1-7 1.4-14.1 6.6-14.1 14.9.1 9.1 9.4 16.3 19.1 16.3zM474.5 0c31.5 0 65.7 18.8 65.7 48.8 0 7.7-5.8 14.1-13.4 14.1-10.3 0-11.8-5.5-16.3-13.4-7.6-13.9-16.5-23.3-36.1-23.3-30.2-.2-43.7 25.6-43.7 57.8 0 32.4 11.2 55.8 42.4 55.8 20.7 0 32.2-12 38.1-27.6 2.4-7.1 6.7-14.1 15.6-14.1 7 0 14.1 7.2 14.1 14.8 0 31.8-32.4 53.8-65.8 53.8-36.5 0-57.2-15.4-68.5-41-5.5-12.2-9.1-24.9-9.1-42.4-.1-49.2 28.6-83.3 77-83.3zm180.3 44.3c8 0 12.7 5.2 12.7 13.4 0 3.3-2.6 9.9-3.6 13.4L625.1 173c-8.6 22.1-15.1 37.4-44.5 37.4-14 0-26.1-1.2-26.1-13.4 0-7 5.3-10.6 12.7-10.6 1.4 0 3.6.7 5 .7 2.1 0 3.6.7 5 .7 14.7 0 16.8-15.1 22-25.5l-37.4-92.6c-2.1-5-3.6-8.4-3.6-11.3 0-8.2 6.4-14.1 14.8-14.1 9.5 0 13.3 7.5 15.6 15.6l24.7 73.5L638 65.5c3.9-10.5 4.2-21.2 16.8-21.2z') +svg.o-logo(class=(logo_size) ? "o-logo--" + logo_size : "" viewBox="0 0 675 215" width="500") + path(d="M83.6 83.3C68.3 81.5 67.2 61 47.5 62.8c-9.5 0-18.4 4-18.4 12.7 0 13.2 20.3 14.4 32.5 17.7 20.9 6.3 41 10.7 41 33.3 0 28.8-22.6 38.8-52.4 38.8-24.9 0-50.2-8.9-50.2-31.8 0-6.4 6.1-11.3 12-11.3 7.5 0 10.1 3.2 12.7 8.4 5.8 10.2 12.3 15.6 28.3 15.6 10.2 0 20.6-3.9 20.6-12.7 0-12.6-12.8-15.3-26.1-18.4-23.5-6.6-43.6-10-46-36.1C-1 34.5 91.7 32.9 97 71.9c.1 7.1-6.5 11.4-13.4 11.4zm110.2-39c32.5 0 51 27.2 51 60.8 0 33.7-17.9 60.8-51 60.8-18.4 0-29.8-7.8-38.1-19.8v44.5c0 13.4-4.3 19.8-14.1 19.8-11.9 0-14.1-7.6-14.1-19.8V61.3c0-10.6 4.4-17 14.1-17 9.1 0 14.1 7.2 14.1 17v3.6c9.2-11.6 19.7-20.6 38.1-20.6zm-7.7 98.4c19.1 0 27.6-17.6 27.6-38.1 0-20.1-8.6-38.1-27.6-38.1-19.8 0-29 16.3-29 38.1 0 21.2 9.2 38.1 29 38.1zM266.9 76c0-23.4 26.9-31.7 52.9-31.7 36.6 0 51.7 10.7 51.7 46v34c0 8.1 5 24.1 5 29 0 7.4-6.8 12-14.1 12-8.1 0-14.1-9.5-18.4-16.3-11.9 9.5-24.5 16.3-43.8 16.3-21.3 0-38.1-12.6-38.1-33.3 0-18.4 13.2-28.9 29-32.5 0 .1 51-12 51-12.1 0-15.7-5.5-22.6-22-22.6-14.5 0-21.9 4-27.5 12.7-4.5 6.6-4 10.6-12.7 10.6-6.9-.1-13-4.9-13-12.1zm43.6 70.2c22.3 0 31.8-11.8 31.8-35.3v-5c-6 2-30.3 8-36.8 9.1-7 1.4-14.1 6.6-14.1 14.9.1 9.1 9.4 16.3 19.1 16.3zM474.5 0c31.5 0 65.7 18.8 65.7 48.8 0 7.7-5.8 14.1-13.4 14.1-10.3 0-11.8-5.5-16.3-13.4-7.6-13.9-16.5-23.3-36.1-23.3-30.2-.2-43.7 25.6-43.7 57.8 0 32.4 11.2 55.8 42.4 55.8 20.7 0 32.2-12 38.1-27.6 2.4-7.1 6.7-14.1 15.6-14.1 7 0 14.1 7.2 14.1 14.8 0 31.8-32.4 53.8-65.8 53.8-36.5 0-57.2-15.4-68.5-41-5.5-12.2-9.1-24.9-9.1-42.4-.1-49.2 28.6-83.3 77-83.3zm180.3 44.3c8 0 12.7 5.2 12.7 13.4 0 3.3-2.6 9.9-3.6 13.4L625.1 173c-8.6 22.1-15.1 37.4-44.5 37.4-14 0-26.1-1.2-26.1-13.4 0-7 5.3-10.6 12.7-10.6 1.4 0 3.6.7 5 .7 2.1 0 3.6.7 5 .7 14.7 0 16.8-15.1 22-25.5l-37.4-92.6c-2.1-5-3.6-8.4-3.6-11.3 0-8.2 6.4-14.1 14.8-14.1 9.5 0 13.3 7.5 15.6 15.6l24.7 73.5L638 65.5c3.9-10.5 4.2-21.2 16.8-21.2z") diff --git a/website/_includes/_mixins.jade b/website/_includes/_mixins.jade index cb1207673..04faf8993 100644 --- a/website/_includes/_mixins.jade +++ b/website/_includes/_mixins.jade @@ -1,381 +1,9 @@ +//- ---------------------------------- +//- 💫 INCLUDES > MIXINS +//- ---------------------------------- + include _functions -//- Mixins -//- ============================================================================ - -//- Sections for content pages - id - [string] id, can be headline id as it's being prefixed (optional) - block - section content (block and inline elements) - -mixin section(id) - section.section(id=(id) ? 'section-' + id : '')&attributes(attributes) - block - - -//- Flexbox grid to align children elements - ...style - [strings] flexbox CSS classes without prefix (optional) - block - container content (block and inline elements) - -mixin grid(...style) - .grid(class=prefixArgs(style, 'grid--'))&attributes(attributes) - block - -mixin grid-col(...style) - .grid-col(class=prefixArgs(style, 'grid-col--'))&attributes(attributes) - block - - -//- Aside - headline - [string] Headline of aside (optional) - block - aside content (inline elements) - -mixin aside(headline) - span.aside(data-label=headline)&attributes(attributes) - span.aside-body - block - - -//- Paragraphs - block - paragraph content (inline elements) - -mixin lead - p.text-lead&attributes(attributes) - block - - -//- Various text styles - block - text (inline elements) - -mixin example - p.text-example&attributes(attributes) - block - -mixin source - span.text-source&attributes(attributes) - block - -mixin label(...style) - span(class=(style != '') ? prefixArgs(style, 'label-') : 'label')&attributes(attributes) - block - - -//- Headings with optional permalinks - id - [string] unique id (optional, no permalink without id) - source - [string] link for source button (optional) - block - headline text (inline elements) - -mixin headline(level, id, source) - if level == 2 - +h2(id, source) - block - - else if level == 3 - +h3(id, source) - block - - else if level == 4 - +h4(id, source) - block - - else if level == 5 - +h5(id, source) - block - - else - +h6(id, source) - block - -mixin h1(id, source) - h1(id=id)&attributes(attributes) - +permalink(id, source) - block - -mixin h2(id, source) - h2(id=id)&attributes(attributes) - +permalink(id, source) - block - -mixin h3(id, source) - h3(id=id)&attributes(attributes) - +permalink(id, source) - block - -mixin h4(id, source) - h4(id=id)&attributes(attributes) - +permalink(id, source) - block - -mixin h5(id, source) - h5(id=id)&attributes(attributes) - +permalink(id, source) - block - -mixin h6(id, source) - h6(id=id)&attributes(attributes) - +permalink(id, source) - block - -mixin permalink(id, source) - if id - a.permalink(href='#' + id) - block - - else - block - - if source - +button('secondary', 'small', 'source')(href=source target='_blank') Source - - -//- Button - element - [string] specifies HTML element, 'button' or 'link' - ...style - [strings] button CSS classes without prefix (optional) - block - button text (inline elements) - -mixin button(type, ...style) - - var classname = 'button-' + type + ' ' + ((style) ? prefixArgs(style, 'button--') : '') - - a.button(class=classname)&attributes(attributes) - block - -mixin form-button(type, ...style) - - var classname = 'button-' + type + ' ' + ((style) ? prefixArgs(style, 'button--') : '') - button(class=classname)&attributes(attributes) - block - - -//- Input - placeholder - [string] placeholder for input field (optional) - value - [string] value of input field (optional) - -mixin input(placeholder, value) - input.input(placeholder=placeholder value=value)&attributes(attributes) - - -//- Icon - name - [string] icon name, refers to CSS classes - size - [string] 'medium' or 'large' (optional) - type - [string] 'button' (optional) - block - description, if as a text node to the icon element it prevents line - breaks between icon and text (inline elements) - -mixin icon(type, ...style) - span(class='icon-' + type + ' ' + prefixArgs(style, 'icon--') aria-hidden="true")&attributes(attributes) - block - - -//- Image for illustration purposes - file - [string] file name (in /img) - alt - [string] descriptive alt text (optional) - caption - [string] image caption (optional) - -mixin image(file, alt, caption) - figure.image-container&attributes(attributes) - img(src='img/' + file alt=alt) - - if caption - figcaption.text-caption=caption - - block - - -//- Illustrated code view - title - [string] title of window - -mixin code-demo(title) - .x-terminal&attributes(attributes) - .x-terminal-icons: span - .x-terminal-title=title - +code.x-terminal-code - block - - -//- Data table - head - [array] column headings (optional, without headings no table - head is displayed) - ...style - [strings] table CSS classes without prefix (optional) - block - only +row (tr) - -mixin table(head, ...style) - table.table(class=prefixArgs(style, 'table--'))&attributes(attributes) - - if head - tr.table-row - each column in head - th.table-head-cell=column - - block - - -//- Data table row - block - only +cell (td) - -mixin row(...style) - tr.table-row(class=prefixArgs(style, 'table-cell--'))&attributes(attributes) - block - - -//- Data table cell - block - table cell content (inline elements) - -mixin cell(...style) - td.table-cell(class=prefixArgs(style, 'table-cell--'))&attributes(attributes) - block - - -//- General list (ordered and unordered) - type - [string] 'numbers', 'letters', 'roman' (optional) - start - [integer] starting point of list (1 = list starts at 1 or A) - block - only +item (li) - -mixin list(type, start) - if type - ol.list(class='list--' + type style=(start === 0 || start) ? 'counter-reset: li ' + (start - 1) : '')&attributes(attributes) - block - - else - ul.list.list--bullets&attributes(attributes) - block - - -//- List item - block - item text (inline elements) - -mixin item - li.list-item&attributes(attributes) - block - - -//- Blockquote - source - [string] quote source / author (optional) - link - [string] link to quote source (only with source, optional) - block - quote text (inline elements) - -mixin quote(source, link) - blockquote.quote&attributes(attributes) - p.quote-text - block - - if source && link - | #[a.quote-source(href=link target='_blank')=source] - - else if source && !link - .quote-source !{source} - - -//- Pullquotes with optional 'tweet this' function - tweet - [string] text to be tweeted (optional) - block - pullquote text (inline elements, only shown if no tweet text) - -mixin pullquote(tweet) - blockquote.quote&attributes(attributes) - - p.quote-text-strong - if tweet - | !{tweet} #[a.quote-source(href=twitterShareUrl(current.path, tweet) target='_blank') Tweet this] - - else - block - - -//- Code block - use as +code(args). to preserve whitespace and prevent code interprettion - language - [string] language for syntax highlighting (optional, default: - 'python', see Prism for options: http://prismjs.com) - label - [string] code block headline (optional) - block - code text (inline elements) - - -mixin code(language, label) - pre.code-block(class='lang-' + (language || default_syntax) data-label=label)&attributes(attributes) - code.code-inline - block - - -//- Infobox for notes and alerts - label - [string] infobox headline (optional) - block - infobox text (inline and block elements) - -mixin infobox(label) - .box.box--info(data-label=label)&attributes(attributes) - p.box-body - block - - -//- Alerts for notes and updates - -mixin alert(button) - .alert&attributes(attributes) - block - - if button - +form-button('primary', 'small')(onclick='this.parentNode.parentNode.removeChild(this.parentNode);')=button - - else - button.alert-close(onclick='this.parentNode.parentNode.removeChild(this.parentNode);') - - - -//- Embeds - border - [boolean] add border to embed container - caption - [string] embed caption - block - embed content (inline and block elements) - -mixin embed(border, caption) - figure.embed(class=(border) ? 'embed--border' : '')&attributes(attributes) - block - - if caption - figcaption.embed-caption=caption - - -//- displaCy - filename - [string] name of file in displacy folder (no .html) - caption - [string] caption (optional) - height - [integer] iframe height in px (optional) - -mixin displacy(filename, caption, height) - +embed(true, caption).embed--displacy - iframe(src='/blog/displacy/' + filename height=height) - - -//- Logo, imports SVG - size - [string] 'tiny', 'small', 'regular' or 'large' - -mixin logo(size) - !=partial('/_includes/_logo', { logo_size: size }) - - -//-