diff --git a/components/PostLayout.js b/components/PostLayout.js index 31e41e8..ae8994d 100644 --- a/components/PostLayout.js +++ b/components/PostLayout.js @@ -9,7 +9,6 @@ const components = { h4: (props) => , h5: (props) => , h6: (props) => , - img: (props) => {props.alt}, code: (props) => ( + +此处使用了 Next.js 的 `Image` 组件。优点包括: + +- 在构建时图片预先被转换成多种分辨率,根据用户设备大小返回相应的分辨率图片。 + +- 提升加载速度。 + +- 在未加载完整图片是显示一个模糊的预览图。 + +- 防止 *加载时布局移动* + +export default ({children}) => {children}