Load images lazily
This commit is contained in:
parent
9173392cf0
commit
f9894558e2
3 changed files with 11 additions and 2 deletions
|
|
@ -4,9 +4,10 @@ const pluginSyntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight')
|
|||
|
||||
// extra features for markdown
|
||||
const markdownIt = require('markdown-it')
|
||||
const anchors = require('markdown-it-anchor')
|
||||
const abbrs = require('markdown-it-abbr')
|
||||
const anchors = require('markdown-it-anchor')
|
||||
const footnotes = require('markdown-it-footnote')
|
||||
const lazyLoading = require('@junwatu/markdown-it-lazy-loading')
|
||||
|
||||
const { DateTime } = require('luxon')
|
||||
const header = require('./src/_includes/filters/header')
|
||||
|
|
@ -33,9 +34,10 @@ module.exports = function (config) {
|
|||
|
||||
config.setLibrary("md",
|
||||
markdownIt(mdOptions)
|
||||
.use(abbrs)
|
||||
.use(anchors)
|
||||
.use(footnotes)
|
||||
.use(abbrs)
|
||||
.use(lazyLoading, { img: 'lazy' })
|
||||
)
|
||||
|
||||
// template filters
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue