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

Hardcoded cover.png #11

Closed
salim-b opened this issue Oct 19, 2023 · 3 comments
Closed

Hardcoded cover.png #11

salim-b opened this issue Oct 19, 2023 · 3 comments

Comments

@salim-b
Copy link
Contributor

salim-b commented Oct 19, 2023

In latest seo/opengraph.html partial the image file path assets/cover.png is hardcoded. This results in the following warnings if the file doesn't exist:

WARN  [Hugo SEO] Missing default image for og:image - assets/cover.png does not exist. Use a high-quality image with dimensions of at least 1200 x 630 pixels, while keeping the file size under 8 MB.
WARN  [Hugo SEO] Missing default image for og:image - Add 'images: ['cover.png']' to your hugo.yaml

Why would you instruct the user to set images: ['cover.png'] in their hugo.yaml when cover.png is hardcoded in the partial? And why would you hardcode the image file path in the first place?

Also I have a hard time to understand the purpose of the the first 11 lines:

https://github.com/gethyas/seo/blob/903b0e4d9da38d18bb9740141cef4babd28ab10f/layouts/partials/seo/opengraph.html#L1-L11

Maybe you could shed some light on this @h-enk ? Thanks!

@h-enk
Copy link
Member

h-enk commented Oct 19, 2023

I agree that there's room for improvement — to be picked up in a next round

@h-enk
Copy link
Member

h-enk commented Oct 19, 2023

Together w/ #9

@h-enk
Copy link
Member

h-enk commented Mar 15, 2024

Dropped the lines w/ v2.2.0 — now fully in line w/ Hugo's template (no warning if a user forgot to add an image)

Maybe re-adding it at a later date, but making it flexible — like how it's done with favicons

@h-enk h-enk closed this as completed Mar 15, 2024
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

No branches or pull requests

2 participants