Page MenuHomeElementl

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

Authored by yuhan on Mar 25 2021, 7:54 AM.



depends on D7207

this diff implements an imageTransformer which converts ![alt](path/to/img) to nextjs's Image component. details about 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

Diff Detail

R1 dagster
Lint Not Applicable
Tests Not Applicable

Event Timeline

todo: lint + parse existing Image?

yuhan requested review of this revision.Mar 25 2021, 8:28 AM
yuhan edited the test plan for this revision. (Show Details)
yuhan added a reviewer: sashank.

Very well done! This should speed up the site significantly.

This revision is now accepted and ready to land.Mar 31 2021, 11:12 PM