HomeElementl

[docs-infra] auto convert md images to next/image

Description

[docs-infra] auto convert md images to next/image

Summary:
depends on D7207

this diff implements an imageTransformer which converts ![alt](path/to/img) to nextjs's Image component. details about next/image: https://nextjs.org/docs/api-reference/next/image

  • note: next/image requires width and height so we use the imageTransformer to automatically inject the w/h based on the given image's size, see [1]

we include it as part of the yarn snapshot script, together with the code transformer and lint format step.

Test Plan:
yarn snapshot

image.png (506×2 px, 166 KB)

previews in https://github.com/dagster-io/dagster/pull/3944

Reviewers: sashank

Reviewed By: sashank

Differential Revision: https://dagster.phacility.com/D7138

Details

Provenance
yuhanAuthored on Mar 25 2021, 7:54 AM
Reviewer
sashank
Differential Revision
D7138: [docs-infra] auto convert md images to next/image
Parents
R1:04309072b6b3: [docs-infra] set up mdx prettier `yarn format`
Branches
Unknown
Tags
Unknown