Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add webp to processable formats #540

Merged
merged 3 commits into from
Oct 22, 2021
Merged

Add webp to processable formats #540

merged 3 commits into from
Oct 22, 2021

Conversation

danielfdickinson
Copy link
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 <20735818+danielfdickinson@users.noreply.github.com>
@adityatelange
Copy link
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
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
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
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 <20735818+danielfdickinson@users.noreply.github.com>
@danielfdickinson danielfdickinson marked this pull request as ready for review September 2, 2021 07:39
@danielfdickinson
Copy link
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).

@sonarcloud
Copy link

sonarcloud 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