From 92436c0663bfa3d2612a99f605581d0d6ae9b1eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Bl=C3=A4ttermann?= Date: Thu, 17 Nov 2022 18:25:10 +0100 Subject: [PATCH] Fix problem with image inside link in MDX --- website/docs/usage/101/_vectors-similarity.mdx | 5 ++++- website/docs/usage/layers-architectures.mdx | 5 ++++- website/docs/usage/projects.mdx | 6 +++++- website/docs/usage/rule-based-matching.mdx | 6 +++++- website/docs/usage/spacy-101.mdx | 6 +++++- website/docs/usage/training.mdx | 6 +++++- website/docs/usage/v3-1.mdx | 6 +++++- website/docs/usage/v3.mdx | 2 +- website/src/components/embed.js | 4 ++-- website/src/remark.js | 6 ++++++ 10 files changed, 42 insertions(+), 10 deletions(-) diff --git a/website/docs/usage/101/_vectors-similarity.mdx b/website/docs/usage/101/_vectors-similarity.mdx index 341d7d57b..1c03b0689 100644 --- a/website/docs/usage/101/_vectors-similarity.mdx +++ b/website/docs/usage/101/_vectors-similarity.mdx @@ -134,7 +134,10 @@ useful for your purpose. Here are some important considerations to keep in mind: -[![](/images/sense2vec.jpg)](https://github.com/explosion/sense2vec) + [`sense2vec`](https://github.com/explosion/sense2vec) is a library developed by us that builds on top of spaCy and lets you train and query more interesting and diff --git a/website/docs/usage/layers-architectures.mdx b/website/docs/usage/layers-architectures.mdx index 13144ea08..c60365c8b 100644 --- a/website/docs/usage/layers-architectures.mdx +++ b/website/docs/usage/layers-architectures.mdx @@ -111,7 +111,10 @@ If you're using a modern editor like Visual Studio Code, you can custom Thinc plugin and get live feedback about mismatched types as you write code. -[![](/images/thinc_mypy.jpg)](https://thinc.ai/docs/usage-type-checking#linting) + diff --git a/website/docs/usage/projects.mdx b/website/docs/usage/projects.mdx index aa4b6a9fc..2294eecac 100644 --- a/website/docs/usage/projects.mdx +++ b/website/docs/usage/projects.mdx @@ -885,7 +885,11 @@ commands: > #### Example train curve output > -> [![Screenshot of train curve terminal output](/images/prodigy_train_curve.jpg)](https://prodi.gy/docs/recipes#train-curve) +> src="/images/prodigy_train_curve.jpg" +> href="https://prodi.gy/docs/recipes#train-curve" +> alt="Screenshot of train curve terminal output" +> /> The [`train-curve`](https://prodi.gy/docs/recipes#train-curve) recipe is another cool workflow you can include in your project. It will run the training with diff --git a/website/docs/usage/rule-based-matching.mdx b/website/docs/usage/rule-based-matching.mdx index b85fa7bb6..6fac65778 100644 --- a/website/docs/usage/rule-based-matching.mdx +++ b/website/docs/usage/rule-based-matching.mdx @@ -208,7 +208,11 @@ you need to describe fields like this. -[![Matcher demo](/images/matcher-demo.jpg)](https://explosion.ai/demos/matcher) +Matcher demo The [Matcher Explorer](https://explosion.ai/demos/matcher) lets you test the rule-based `Matcher` by creating token patterns interactively and running them diff --git a/website/docs/usage/spacy-101.mdx b/website/docs/usage/spacy-101.mdx index 9cb3e2c4a..439409a37 100644 --- a/website/docs/usage/spacy-101.mdx +++ b/website/docs/usage/spacy-101.mdx @@ -30,7 +30,11 @@ quick introduction. -[![Advanced NLP with spaCy](/images/course.jpg)](https://course.spacy.io) +Advanced NLP with spaCy In this course you'll learn how to use spaCy to build advanced natural language understanding systems, using both rule-based and machine learning approaches. It diff --git a/website/docs/usage/training.mdx b/website/docs/usage/training.mdx index 1a8c021f7..12859e808 100644 --- a/website/docs/usage/training.mdx +++ b/website/docs/usage/training.mdx @@ -21,7 +21,11 @@ menu: -[![Prodigy: Radically efficient machine teaching](/images/prodigy.jpg)](https://prodi.gy) +Prodigy: Radically efficient machine teaching If you need to label a lot of data, check out [Prodigy](https://prodi.gy), a new, active learning-powered annotation tool we've developed. Prodigy is fast diff --git a/website/docs/usage/v3-1.mdx b/website/docs/usage/v3-1.mdx index db9ebafbc..8f30e09d9 100644 --- a/website/docs/usage/v3-1.mdx +++ b/website/docs/usage/v3-1.mdx @@ -76,7 +76,11 @@ This project trains a span categorizer for Indonesian NER. -[![Prodigy: example of the new manual spans UI](/images/prodigy_spans-manual.jpg)](https://support.prodi.gy/t/3861) +Prodigy: example of the new manual spans UI The upcoming version of our annotation tool [Prodigy](https://prodi.gy) (currently available as a [pre-release](https://support.prodi.gy/t/3861) for all diff --git a/website/docs/usage/v3.mdx b/website/docs/usage/v3.mdx index c3637aa36..6511592aa 100644 --- a/website/docs/usage/v3.mdx +++ b/website/docs/usage/v3.mdx @@ -492,7 +492,7 @@ format for documenting argument and return types. -[![Library architecture](/images/architecture.svg)](/api) +Library architecture diff --git a/website/src/components/embed.js b/website/src/components/embed.js index 4b3295c74..15587ff95 100644 --- a/website/src/components/embed.js +++ b/website/src/components/embed.js @@ -79,7 +79,7 @@ Iframe.propTypes = { height: PropTypes.number, } -const Image = ({ src, alt, title, ...props }) => { +const Image = ({ src, alt, title, href, ...props }) => { // This is only needed for image types that are NOT handled by // gatsby-remark-images, i.e. mostly SVGs. The plugin adds formatting // and support for captions, so this normalises that behaviour. @@ -87,7 +87,7 @@ const Image = ({ src, alt, title, ...props }) => { const markdownComponents = { code: InlineCode, p: Fragment, a: Link } return (
- + {alt} {title && ( diff --git a/website/src/remark.js b/website/src/remark.js index 775915c76..49be3f0a9 100644 --- a/website/src/remark.js +++ b/website/src/remark.js @@ -77,6 +77,12 @@ export const remarkComponents = { Integration, IntegrationLogo, + /** + * This is readded as `Image` it can be explicitly used in MDX files. + * For regular img elements it is not possible to pass properties + */ + Image, + Label, Logos, Colors,