nuxt-modules / og-image

Generate OG Images with Vue templates in Nuxt.
https://nuxtseo.com/og-image
400 stars 25 forks source link

Nuxt baseURL is ignored (og-image v3) #186

Closed williarin closed 5 months ago

williarin commented 6 months ago

Hello,

Nuxt app.baseURL config seems ignored and twitter:image is missing absolute URL.

Minimal reproduction: https://stackblitz.com/edit/nuxt-starter-u245dw?file=nuxt.config.ts Then navigate to /myapp/ and edit source.

Actual output:

<meta property="og:image" content="https://example.com/__og-image__/image/og.png">
<meta name="twitter:image" content="/__og-image__/image/og.png">
<meta name="twitter:image:src" content="https://example.com/__og-image__/image/og.png">

Expected output:

<meta property="og:image" content="https://example.com/myapp/__og-image__/image/og.png">
<meta name="twitter:image" content="https://example.com/myapp/__og-image__/image/og.png">
<meta name="twitter:image:src" content="https://example.com/myapp/__og-image__/image/og.png">

nuxt-og-image: 3.0.0-rc.47 Nuxt: 3.11.1

harlan-zw commented 5 months ago

Hi @williarin, thank you for the issue & reproduction.

This appears to be fixed in v3.0.0-rc.48.