From 9c5abbe7fa6ce4767ca88e9384aba41fb418d480 Mon Sep 17 00:00:00 2001 From: Niek Blankers Date: Thu, 22 Oct 2020 16:05:14 +0200 Subject: [PATCH] Update documentation of cover images (#53) --- content/posts/papermod/papermod-features.md | 18 +++++++++++++++++- content/posts/papermod/papermod-variables.md | 7 ++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/content/posts/papermod/papermod-features.md b/content/posts/papermod/papermod-features.md index df3590b2..37ecb493 100644 --- a/content/posts/papermod/papermod-features.md +++ b/content/posts/papermod/papermod-features.md @@ -126,6 +126,22 @@ cover: caption: '' ``` +When you include images in the [Page Bundle](https://gohugo.io/content-management/page-bundles/), multiple sizes of the image will automatically be provided using the HTML5 `srcset` field. + +To reduce generation time and size of the site, you can disable this feature using +```yml +params: + cover: + responsiveImages: false +``` + +To enable hyperlinks to the full image size on post pages, use +```yml +params: + cover: + linkFullImages: true +``` + --- ### Share Buttons on post @@ -209,4 +225,4 @@ Displays a Scroll-to-Top button in right-bottom corner #### RSS feeds -#### Multilingual Support \ No newline at end of file +#### Multilingual Support diff --git a/content/posts/papermod/papermod-variables.md b/content/posts/papermod/papermod-variables.md index 9ab09be9..293be4f3 100644 --- a/content/posts/papermod/papermod-variables.md +++ b/content/posts/papermod/papermod-variables.md @@ -17,6 +17,8 @@ Below are variables used with this theme... | ShowReadingTime | boolean | true \| false | | defaultTheme | string | light \| dark \| auto | | ShowShareButtons | boolean | true \| false | +| cover.linkFullImages | boolean | true \| false | +| cover.responsiveImages | boolean | true \| false | ### Page Variables @@ -24,4 +26,7 @@ Below are variables used with this theme... | - | - | - | | showtoc | boolean | true \| false | | tocopen | boolean | true \| false | -| hidemeta | boolean | true \| false | \ No newline at end of file +| hidemeta | boolean | true \| false | +| cover.image | string | `'featured.jpg'` | +| cover.caption | string | `''` | +| cover.alt | string | `''` |