docs: add hero image for social media preview #683

This commit is contained in:
Sören Weber 2023-10-11 13:16:34 +02:00
parent 06ab152752
commit 94af0c1a98
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
4 changed files with 7 additions and 6 deletions

View file

@ -209,6 +209,7 @@ title = "Hugo Relearn Documentation"
# settings specific to this theme's features; choose to your likings and
# consult this documentation for explaination
[params]
images = ["images/hero.png"]
editURL = "https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content/"
description = "Documentation for Hugo Relearn Theme"
author = "Sören Weber"

View file

@ -31,7 +31,7 @@ The content should be:
- Hugo Themes info: https://themes.gohugo.io/themes/hugo-theme-relearn/ _1000 x 1500 @ 1_
**Page URL**: [Screenshot Link]({{% relref "/shortcodes/include" %}})
**Page URL**: [Screenshot Link]({{% relref "/shortcodes/notice" %}})
**Creation**:
@ -41,7 +41,7 @@ The content should be:
The location is mandatory due to Hugo's theme site builder.
### Preview `images/screenshot.png`
**Preview** `images/screenshot.png`:
![Screenshot](/images/screenshot.png?width=100%25&height=100%25)
@ -63,7 +63,7 @@ The content should be:
- GitHub project site: https://github.com/McShelby/hugo-theme-relearn _1280 x 640_
- GitHub social media preview: https://github.com/McShelby/hugo-theme-relearn/settings _1280 x 640_
**Page URL**: [Hero Image Link]({{% relref "/shortcodes/include" %}})
**Page URL**: [Hero Image Link]({{% relref "/shortcodes/notice" %}})
**Creation**:
@ -78,10 +78,10 @@ The content should be:
The location of `images/tn.png` is mandatory due to Hugo's theme site builder.
### Preview `images/hero.png`
**Preview** `images/hero.png`:
![Hero](/images/hero.png?width=100%25&height=100%25)
### Preview `images/tn.png`
**Preview** `images/tn.png`:
![tn](/images/tn.png?width=100%25&height=100%25)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 MiB

After

Width:  |  Height:  |  Size: 551 KiB

View file

@ -1,3 +1,3 @@
{{- $content := .content }}
{{- $indention := .indention }}
{{- replaceRE "(\\r\\n|\\r|\\n)" (printf "$1%s" $indention) (replaceRE "^" $indention (trim $content " \n\r")) | safeHTML }}
{{- replaceRE "(\\r\\n|\\r|\\n)" (printf "$1%s" $indention) (replaceRE "^" $indention (trim $content " \n\r\t")) | safeHTML }}