codefortulsa / website

Code For Tulsa Website Update 2022
https://www.figma.com/file/maf7XD1XhbIKlJn77P2tIS/Code-for-Tulsa-Website?node-id=0%3A1
8 stars 10 forks source link

Refactor/markdown engine #119

Closed helmturner closed 2 years ago

helmturner commented 2 years ago

Since it is not feasible to require content contributors to specify the height and width of each image, I've gone the 'static import' route by transforming markdown files as part of the bundling process using @mdx-js/loader and @next/mdx. This is only half of a solution, though; I also had to develop recma-next-static-images, a custom plugin used with @mdx-js/loader that fetches and caches images before transforming the output to use static imports for image src attributes.

Yes, see 'What changes does this PR introduce?', above.

helmturner commented 2 years ago

This is ready for review - looks like the failing tests are due to the missing /blog index path.

helmturner commented 2 years ago

shipped