sapper-markdown-image-lazyload Svelte Themes

Sapper Markdown Image Lazyload

Testing Lazy Loading of Images from Markdown Files in Svelte Sapper Applications

sapper-markdown-image-lazyload

A Sapper template that uses Markdown to store blog posts.

It's code for this post: 在Svelte Sapper应用中实现延迟加载Markdown文件内的图片.

Usage

Install dependencies

yarn

For development

yarn dev

Open your browser on http://localhost:3000

Or Visit directly to http://localhost:3000/blog/sample-post-with-images. Press F12 on network TAB to see how the image loads.

What's different compared to the official Sapper template?

Instead of persisting blog posts in a JSON file at src/routes/blog/_posts.js, this template here uses Markdown files in src/posts.

Top categories

svelte logo

Need a Svelte website built?

Hire a professional Svelte developer today.
Loading Svelte Themes