From 9e67a9dc22ee042cecffa0ab40f11c09b8a49669 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sun, 24 Nov 2019 17:38:41 +0800 Subject: [PATCH] Lazy load the image of posts. --- _includes/head.html | 2 ++ _layouts/post.html | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/_includes/head.html b/_includes/head.html index 7aeda16..b5609c1 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -64,6 +64,8 @@ + + {% if jekyll.environment == 'production' %} diff --git a/_layouts/post.html b/_layouts/post.html index 8cd19d7..e1f9ea9 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -42,12 +42,21 @@ layout: default {% endif %} + {% capture post_content %}