From ab5bb96c27dae05d187a566d56d2ff4adafada51 Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Mon, 20 Apr 2020 17:19:48 +0800 Subject: Apply lazyload to images in markdown content --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index fafcc5c..01d4502 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,22 @@ If you want to generate your site, just run: $ hugo --minify ``` +## Advance configration + +You can create the files below in your site to adjust the markdown render hook, see [Hugo's Official Docs](https://gohugo.io/getting-started/configuration-markup#markdown-render-hooks). + +You can use ```layouts/_default/_markup/render-link.html``` to decide whether or not links in the markdown content will open in new tab: + +```html +{{ .Text | safeHTML }} +``` + +You can use ```layouts/_default/_markup/render-image.html``` to change the lazyload placeholder: + +```html +

{{ .Text }}

+``` + ## Update the theme Inside the folder of your Hugo site run: -- cgit v1.2.3