Skip to content

Add webp to processable formats#540

Merged
adityatelange merged 3 commits intoadityatelange:masterfrom
danielfdickinson:pr-add-webp-processable-format
Oct 22, 2021
Merged

Add webp to processable formats#540
adityatelange merged 3 commits intoadityatelange:masterfrom
danielfdickinson:pr-add-webp-processable-format

Conversation

@danielfdickinson
Copy link
Copy Markdown
Contributor

What does this PR change? What problem does it solve?
It adds webp as cover image 'processable format' so that webp images can also be responsive.

Was the change discussed in an issue or in the Discussions before?
No.

PR Checklist

  • This change adds/updates translations and I have used the template present here.
  • I have enabled maintainer edits for this PR.
  • This change adds a Social Icon which has a permissive license to use it.
  • This change does not include any CDN resources/links.
  • This change does not include any unrelated scripts such as bash and python scripts.
  • This change updates the overridden internal templates from HUGO's repository.

Signed-off-by: Daniel F. Dickinson <[email protected]>
@adityatelange
Copy link
Copy Markdown
Owner

"Note that you need the extended version of Hugo to encode to WebP."
~ https://gohugo.io/news/0.83.0-relnotes/

PaperMod which in this case is free from the Extended Version of Hugo, which is why it is not included

@danielfdickinson
Copy link
Copy Markdown
Contributor Author

danielfdickinson commented Aug 31, 2021

Ah, ok. Feel free to close then (or would it be okay to add it as a configurable item)?
Or use a {{ if .IsExtended }} ... around webp? (there is a mechanism like that now).

@danielfdickinson
Copy link
Copy Markdown
Contributor Author

danielfdickinson commented Aug 31, 2021

According to Hugo Functions hugo.IsExtended was added in v0.83.0. To save time, I will update the PR using it, and if you don't want the PR, you can close it.

@danielfdickinson danielfdickinson marked this pull request as draft September 1, 2021 13:59
@danielfdickinson
Copy link
Copy Markdown
Contributor Author

Moved to draft as changes required that will require testing.

This keeps PaperMod from having a hard dependency on Hugo extended.

Signed-off-by: Daniel F. Dickinson <[email protected]>
@danielfdickinson danielfdickinson marked this pull request as ready for review September 2, 2021 07:39
@danielfdickinson
Copy link
Copy Markdown
Contributor Author

danielfdickinson commented Sep 2, 2021

That was far easier than expected. Do note this does bump the minimum required Hugo version to 0.83.0 (not part of this PR).

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Sep 5, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@adityatelange adityatelange merged commit 10141e2 into adityatelange:master Oct 22, 2021
kylethedeveloper pushed a commit to kylethedeveloper/hugo-PaperMod that referenced this pull request Feb 21, 2023
* Add webp format only if using Hugo extended

This keeps PaperMod from having a hard dependency on Hugo extended.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants