diff --git a/website/meta/universe.json b/website/meta/universe.json index 0fde2d612..ba770a3fd 100644 --- a/website/meta/universe.json +++ b/website/meta/universe.json @@ -141,7 +141,8 @@ "website": "https://www.nr.no/~plison" }, "category": ["pipeline", "standalone", "research", "training"], - "tags": [] + "tags": [], + "spacy_version": 3 }, { "id": "numerizer", diff --git a/website/src/templates/universe.js b/website/src/templates/universe.js index cfc8fdd0e..10f2520d9 100644 --- a/website/src/templates/universe.js +++ b/website/src/templates/universe.js @@ -8,10 +8,11 @@ import Title from '../components/title' import Grid from '../components/grid' import Button from '../components/button' import Icon from '../components/icon' +import Tag from '../components/tag' import CodeBlock, { InlineCode } from '../components/code' import Aside from '../components/aside' import Sidebar from '../components/sidebar' -import Section from '../components/section' +import Section, { Hr } from '../components/section' import Main from '../components/main' import Footer from '../components/footer' import { H3, H5, Label, InlineList } from '../components/typography' @@ -121,6 +122,18 @@ const UniverseContent = ({ content = [], categories, theme, pageContext, mdxComp )} +
+

Found a mistake or something isn't working?

+

+ If you've come across a universe project that isn't working or is + incompatible with the reported spaCy version, let us know by{' '} + + opening a discussion thread + + . +

+
+

Submit your project

@@ -168,25 +181,41 @@ UniverseContent.propTypes = { mdxComponents: PropTypes.object, } +const SpaCyVersion = ({ version }) => { + const versions = !Array.isArray(version) ? [version] : version + return versions.map((v, i) => ( + <> + spaCy v{v}{' '} + + )) +} + const Project = ({ data, components }) => ( <> - {data.github && ( + {(data.github || data.spacy_version) && ( <p> - <Link to={`https://github.com/${data.github}`} hidden> - {[ - `release/${data.github}/all.svg?style=flat-square`, - `license/${data.github}.svg?style=flat-square`, - `stars/${data.github}.svg?style=social&label=Stars`, - ].map((url, i) => ( - <img - style={{ borderRadius: '1em', marginRight: '0.5rem' }} - key={i} - src={`https://img.shields.io/github/${url}`} - alt="" - /> - ))} - </Link> + {data.spacy_version && <SpaCyVersion version={data.spacy_version} />} + {data.github && ( + <Link to={`https://github.com/${data.github}`} hidden> + {[ + `release/${data.github}/all.svg?style=flat-square`, + `license/${data.github}.svg?style=flat-square`, + `stars/${data.github}.svg?style=social&label=Stars`, + ].map((url, i) => ( + <img + style={{ + borderRadius: '1em', + marginRight: '0.5rem', + verticalAlign: 'middle', + }} + key={i} + src={`https://img.shields.io/github/${url}`} + alt="" + /> + ))} + </Link> + )} </p> )} @@ -335,6 +364,7 @@ const query = graphql` url github description + spacy_version pip cran category