From 91594fe6717783bf124c0bfe0a02e155ccdf2063 Mon Sep 17 00:00:00 2001 From: ines Date: Tue, 7 Nov 2017 12:56:36 +0100 Subject: [PATCH] Update legacy docs --- website/_data.json | 4 ---- website/_harp.json | 6 +++--- website/_includes/_functions.jade | 1 + website/_includes/_navigation.jade | 3 +-- website/_includes/_page-docs.jade | 12 +++++++++++- website/index.jade | 2 -- website/robots.txt | 2 ++ website/robots.txt.jade | 5 ----- 8 files changed, 18 insertions(+), 17 deletions(-) create mode 100644 website/robots.txt delete mode 100644 website/robots.txt.jade diff --git a/website/_data.json b/website/_data.json index 525c70d80..42c13b110 100644 --- a/website/_data.json +++ b/website/_data.json @@ -25,10 +25,6 @@ ] }, - "robots.txt": { - "layout": false - }, - "404": { "title": "404 Error", "landing": true diff --git a/website/_harp.json b/website/_harp.json index 5a44f1a81..3bcc914b8 100644 --- a/website/_harp.json +++ b/website/_harp.json @@ -12,10 +12,10 @@ "COMPANY_URL": "https://explosion.ai", "DEMOS_URL": "https://demos.explosion.ai", - "SPACY_VERSION": "1.9", + "SPACY_VERSION": "2.0", "LATEST_NEWS": { - "url": "/docs/usage/models", - "title": "The first official Spanish model is here!" + "url": "https://alpha.spacy.io", + "title": "Try spaCy v2.0!" }, "SOCIAL": { diff --git a/website/_includes/_functions.jade b/website/_includes/_functions.jade index 754ae1a4f..27d33a84e 100644 --- a/website/_includes/_functions.jade +++ b/website/_includes/_functions.jade @@ -19,5 +19,6 @@ //- Generate GitHub links - function gh(repo, filepath, branch) { +- if (repo == "spacy") branch = 'v1.x'; - return 'https://github.com/' + SOCIAL.github + '/' + repo + (filepath ? '/blob/' + (branch || 'master') + '/' + filepath : '' ); - } diff --git a/website/_includes/_navigation.jade b/website/_includes/_navigation.jade index d319ef2c9..76841ebd0 100644 --- a/website/_includes/_navigation.jade +++ b/website/_includes/_navigation.jade @@ -5,8 +5,7 @@ include _mixins nav.c-nav.u-text.js-nav(class=landing ? "c-nav--theme" : null) a(href='/') #[+logo] - if SUBSECTION != "index" - .u-text-label.u-padding-small.u-hidden-xs=SUBSECTION + .u-text-label.u-padding-small.u-hidden-xs Legacy ul.c-nav__menu each url, item in NAVIGATION diff --git a/website/_includes/_page-docs.jade b/website/_includes/_page-docs.jade index 72db134cd..fb27a2f42 100644 --- a/website/_includes/_page-docs.jade +++ b/website/_includes/_page-docs.jade @@ -10,6 +10,16 @@ main.o-main.o-main--sidebar.o-main--aside if tag +tag=tag + +infobox("⚠️ Important note") + | You are viewing the #[strong v1.x legacy documentation]. + | #[+a("https://spacy.io", true) Go here] for the latest + | documentation of the new version. spaCy v2.0 comes with a lot + | of improvements around training, serialization and processing + | pipeline management, as well as new convolutional neural network + | models for several languages. See + | #[+a("https://spacy.io/usage/v2") this page] for more details and + | a migration guide. + !=yield +grid.o-content.u-text @@ -21,7 +31,7 @@ main.o-main.o-main--sidebar.o-main--aside span #[strong.u-text-label Read next:] #[+a(next).u-link=data.title] +grid-col("half").u-text-right - .o-inline-list + //-.o-inline-list +button(gh("spacy", "website/" + current.path.join('/') + ".jade"), false, "secondary").u-text-tag Suggest edits #[+icon("code", 14)] +gitter("spaCy chat") diff --git a/website/index.jade b/website/index.jade index 5ce00e2c1..02efb38b2 100644 --- a/website/index.jade +++ b/website/index.jade @@ -11,8 +11,6 @@ include _includes/_mixins h2.c-landing__title.o-block.u-heading-1 | in Python - +landing-badge(gh("spaCy") + "/releases/tag/v2.0.0-alpha", "v2alpha", "Try spaCy v2.0.0 alpha!") - +grid.o-content +grid-col("third").o-card +h(2) Fastest in the world diff --git a/website/robots.txt b/website/robots.txt new file mode 100644 index 000000000..1f53798bb --- /dev/null +++ b/website/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / diff --git a/website/robots.txt.jade b/website/robots.txt.jade deleted file mode 100644 index 8159ab664..000000000 --- a/website/robots.txt.jade +++ /dev/null @@ -1,5 +0,0 @@ -//- 💫 ROBOTS.TXT - -if environment != "deploy" - | User-agent: * - | Disallow: /