From e51e754e592fe140c3eb581d2be64d9f0fd8d91d Mon Sep 17 00:00:00 2001 From: Leilukin Date: Wed, 30 Apr 2025 01:55:19 +0800 Subject: [PATCH] Configure YouTube embed options --- eleventy.config.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/eleventy.config.js b/eleventy.config.js index 092656af..c0685daa 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -20,7 +20,15 @@ export default function(eleventyConfig) { eleventyConfig.addPlugin(pluginRss); eleventyConfig.addPlugin(pluginEleventyNavigation); eleventyConfig.addPlugin(pluginSyntaxHighlight, { preAttributes: { tabindex: 0 } }); - eleventyConfig.addPlugin(pluginEmbedEverything, { add: ['soundcloud'] }); + eleventyConfig.addPlugin(pluginEmbedEverything, { + youtube: { + options: { + lazy: true, + lite: true, + recommendSelfOnly: true, + } + } + }); eleventyConfig.addPlugin(pluginWordcount); eleventyConfig.addPlugin(pluginTOC, { tags: ['h2', 'h3', 'h4', 'h5', 'h6'], @@ -47,4 +55,4 @@ export default function(eleventyConfig) { input: "src" } }; -}; \ No newline at end of file +};