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

feat: og images for error pages #81

Open
dargmuesli opened this issue Sep 11, 2023 · 2 comments
Open

feat: og images for error pages #81

dargmuesli opened this issue Sep 11, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@dargmuesli
Copy link
Contributor

dargmuesli commented Sep 11, 2023

Clear and concise description of the problem

I'd like nuxt-og-image to render og images for error pages. Currently https://creal.jonas-thelemann.de/does-not-exist/__og_image__/og.png (you cannot click on the link, must copy and paste) shows
image
instead of an image (I'll fix the layout, I promise)

Suggested solution

An image should show up with the error page's title and description, like

image

Alternative

No response

Additional context

An internal $fetch errors because /does-not-exist does not exist, thus throwing a 500 on the og.png route itself.

@dargmuesli dargmuesli added the enhancement New feature or request label Sep 11, 2023
@harlan-zw
Copy link
Collaborator

Good idea 👍

@affemaen
Copy link

Hi any progress on this one? I have some pages with archived content where I set the response code to 404.

I get an error for og-img

Error: [GET] "/og-image/image/.../og.json": 500 [Nuxt OG Image] Failed to read the path /... for og-image extraction. [GET] "/...": 404 .

It's the same behaviour for my error pages.

I've tried using defineOgImage(false) to disable og image on these pages but it gives the same result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants